refactor: rename shopLayoutData to storefrontLayoutData
Some checks failed
Some checks failed
Align Alpine.js base component naming with storefront terminology. Updated across all storefront JS, templates, and documentation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -146,7 +146,7 @@ window.CATEGORY_SLUG = '{{ category_slug | default("") }}';
|
||||
|
||||
document.addEventListener('alpine:init', () => {
|
||||
Alpine.data('shopCategory', () => ({
|
||||
...shopLayoutData(),
|
||||
...storefrontLayoutData(),
|
||||
|
||||
// Data
|
||||
categorySlug: window.CATEGORY_SLUG,
|
||||
|
||||
@@ -218,7 +218,7 @@ window.STORE_ID = {{ store.id }};
|
||||
|
||||
document.addEventListener('alpine:init', () => {
|
||||
Alpine.data('productDetail', () => {
|
||||
const baseData = shopLayoutData();
|
||||
const baseData = storefrontLayoutData();
|
||||
|
||||
return {
|
||||
...baseData,
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
<script>
|
||||
document.addEventListener('alpine:init', () => {
|
||||
Alpine.data('shopProducts', () => ({
|
||||
...shopLayoutData(),
|
||||
...storefrontLayoutData(),
|
||||
products: [],
|
||||
loading: true,
|
||||
filters: {
|
||||
@@ -205,7 +205,7 @@ document.addEventListener('alpine:init', () => {
|
||||
this.loadProducts();
|
||||
},
|
||||
|
||||
// formatPrice is inherited from shopLayoutData() via spread operator
|
||||
// formatPrice is inherited from storefrontLayoutData() via spread operator
|
||||
|
||||
async addToCart(product) {
|
||||
console.log('[SHOP] Adding to cart:', product);
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
<script>
|
||||
document.addEventListener('alpine:init', () => {
|
||||
Alpine.data('shopSearch', () => ({
|
||||
...shopLayoutData(),
|
||||
...storefrontLayoutData(),
|
||||
|
||||
// Search state
|
||||
searchInput: '',
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
<script>
|
||||
document.addEventListener('alpine:init', () => {
|
||||
Alpine.data('shopWishlist', () => ({
|
||||
...shopLayoutData(),
|
||||
...storefrontLayoutData(),
|
||||
|
||||
// Data
|
||||
items: [],
|
||||
|
||||
Reference in New Issue
Block a user