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:
@@ -56,7 +56,7 @@ Session ID not properly initialized in Alpine.js components.
|
||||
|
||||
**How it Works:**
|
||||
- Cart uses session ID stored in localStorage as `cart_session_id`
|
||||
- `shopLayoutData()` base component initializes `sessionId` in its `init()` method
|
||||
- `storefrontLayoutData()` base component initializes `sessionId` in its `init()` method
|
||||
- Child components (product, cart) must call parent `init()` to get `sessionId`
|
||||
- If parent init isn't called, `sessionId` is `undefined`
|
||||
|
||||
@@ -295,7 +295,7 @@ Child component doesn't call parent `init()` method.
|
||||
**Solution:**
|
||||
```javascript
|
||||
// Store reference to parent
|
||||
const baseData = shopLayoutData();
|
||||
const baseData = storefrontLayoutData();
|
||||
|
||||
return {
|
||||
...baseData,
|
||||
|
||||
Reference in New Issue
Block a user