Data
Placeholder values
Values available to {…} placeholders and directives in index.html. store values depend on the selected store and are empty until one is chosen — wrap them in <!-- IF … -->.
| Name | Type | Scope | Description | Source |
|---|---|---|---|---|
{WEBSITENAME} | string | page | Store name (or the host name when the store has none). | server.js:650 |
{STORE_NAME} | string | page | Store name from the store record. | server.js:651 |
{DESCRIPTION} | string | page | Store description, else template.json website.description. | server.js:652 |
{THEME} | string | page | Name of the active template folder. | server.js:653 |
{CURRENCY} | string | page | Store currency code (e.g. NGN). | server.js:654 |
{CURRENCY_SYMBOL} | string | page | Store currency symbol. | server.js:655 |
{USER_JSON} | string | page | JSON of the signed-in customer (or null). | server.js:656 |
{DAYS_ONLINE} | number | page | Days since the store record was created. | server.js:657 |
{TEMPLATE_IMAGES} | array | page | Array of { name, url } for the files directly inside image/. Use with FOREACH. | server.js:658 |
{STORE_ADDRESS} store | string | page | Selected store's address line (empty when no store is selected). | server.js:659 |
{STORE_CITY} store | string | page | Selected store's city. | server.js:660 |
{STORE_STATE} store | string | page | Selected store's state. | server.js:661 |
{STORE_PHONE} store | string | page | Selected store's phone. | server.js:662 |
{STORE_PHONE_LINK} store | string | page | Phone digits for tel: links. | server.js:663 |
{STORE_EMAIL} store | string | page | Selected store's email. | server.js:664 |
{STORE_HOURS} store | string | page | Opening hours joined with " · ". | server.js:665 |
{STORE_HOURS_STATUS} store | string | page | "Open now" / "Closed now · opens …". | server.js:666 |
{USER} | object | page | Signed-in customer object { id, username, name, email, role } or null (use in IF). | server.js:673 |
{MENU_ITEMS} | array | page | Menu items for the signed-in customer ([] when signed out). | server.js:674 |
{PRODUCTS} | array | page | Always [] — catalogue data is loaded in the browser through the store-scoped APIs. | server.js:675 |
{TESTIMONIALS} | array | page | Always [] (kept for compatibility; use content.testimonials). | server.js:676 |
{YEAR} | number | page | Current year. | server.js:656 |
{FEATURED_PRODUCTS} | array | page | Always [] (kept for compatibility). | server.js:675 |
{CATEGORIES} | array | page | Always [] (kept for compatibility). | server.js:675 |
{SOCIAL_LINKS} | array | page | Always [] (kept for compatibility; use template.json social). | server.js:676 |
{RECENT_PRODUCTS} | array | page | Always [] (kept for compatibility). | server.js:676 |
{ITEM} | any | FOREACH | Current item inside FOREACH. | template-engine.js:322 |
{INDEX} | number | FOREACH | 1-based index inside FOREACH. | template-engine.js:323 |
{EVEN_ODD} | string | FOREACH | "even" / "odd" inside FOREACH. | template-engine.js:324 |
{LOOP_INDEX} | number | LOOP | 1-based index inside LOOP. | template-engine.js:334 |
Data loaded in the browser
Catalogue, cart, checkout and account data reach the page through these endpoints, called by engine.js (window.Storefront.api). Catalogue endpoints are scoped to the selected store.
| Method | Endpoint |
|---|---|
GET | /api/store/config |
GET | /api/stores |
POST | /api/store/select |
GET | /api/user/data |
GET | /api/user/me |
GET | /api/user/profile |
GET | /api/user/activity |
GET | /api/brands |
GET | /api/products |
GET | /api/products/featured |
GET | /api/products/search |
GET | /api/catalog/facets |
GET | /api/products/:id |
GET | /api/categories |
GET | /api/subcategories |
GET | /api/wishlist |
POST | /api/wishlist |
DELETE | /api/wishlist |
POST | /api/wishlist/toggle |
GET | /api/payment-gateways |
GET | /api/shipping-options |
GET | /api/shipping-locations |
GET | /api/shipping-fee |
GET | /api/cart |
POST | /api/cart/add |
PUT | /api/cart/update |
DELETE | /api/cart/remove |
POST | /api/cart/clear |
POST | /api/cart/coupon |
DELETE | /api/cart/coupon |
POST | /api/cart/merge |
POST | /api/checkout/quote |
GET | /api/checkout/state |
PUT | /api/checkout/state |
DELETE | /api/checkout/state |
POST | /api/checkout/place-order |
POST | /api/checkout/dismiss-order |
GET | /api/orders |
GET | /api/orders/:id |
POST | /api/orders/:id/cancel |
GET | /api/user/addresses |
POST | /api/user/addresses |
PUT | /api/user/addresses/:id |
DELETE | /api/user/addresses/:id |
POST | /api/newsletter/subscribe |
POST | /api/user/change-password |