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 number
Sample: 3
{{cart.total}}anycart.jsCart subtotal (formatted with currency) currency
Sample: ₹ 4,500
{{cart.subtotal_raw}}anycart.jsCart subtotal (raw number) number
Sample: 4500
{{cart.total_items}}anycart.jsDistinct line items in the cart number
Sample: 2
{{cart.is_empty}}anycart.js"Yes" when the cart has no items boolean
Sample: No

Tips

  • 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.