Short codes
Cart
5 tokens under the cart.* namespace. Drop these anywhere the SSR layer can see them — HTML, attribute values, JS, or CSS.
Overview
5 tokens under the cart.* scope. Resolves on every page.
Usage
Drop a token anywhere the SSR layer will see it — HTML body, attribute value, inline JS, or inline CSS.
Inline in markup
<mmm-pdp-title>{{cart.count}}</mmm-pdp-title>
<!-- rendered -> -->
<mmm-pdp-title>3</mmm-pdp-title>Inside attribute values
<a href="/p/{{pdp.slug}}" title="Buy {{pdp.title}} for {{pdp.price}}">Shop</a>Identity & flags 5
TokenPage bindingComponentDescription & sample
{{cart.count}}anycart.jsNumber of items in the user's cart at page load numberSample:
3{{cart.total}}anycart.jsCart subtotal (formatted with currency) currencySample:
₹ 4,500{{cart.subtotal_raw}}anycart.jsCart subtotal (raw number) numberSample:
4500{{cart.total_items}}anycart.jsDistinct line items in the cart numberSample:
2{{cart.is_empty}}anycart.js"Yes" when the cart has no items booleanSample:
NoTips
- Tokens are case-sensitive —
{{cart.title}}resolves;{{CART.TITLE}}does not. - Whitespace inside the braces is tolerated:
{{ cart.title }}works identically. - Unresolvable tokens fall through as empty strings rather than rendering the raw placeholder, so missing-data states stay clean.