Properties
Properties you can read inside data-next-show and data-next-hide expressions, grouped by namespace.
Cart Properties
Booleans
| Property | Description |
|---|---|
cart.isEmpty | true when the cart has no items |
cart.hasItems | true when the cart has at least one item |
cart.hasDiscount | true when a discount or coupon is applied |
cart.hasCoupon | true when a coupon code is applied |
cart.hasShipping | true when shipping is being charged |
Numbers
| Property | Description |
|---|---|
cart.total | Grand total |
cart.subtotal | Subtotal before shipping/tax |
cart.shipping | Shipping cost |
cart.tax | Tax amount |
cart.discount | Discount amount applied |
cart.totalQuantity | Total number of units in the cart |
cart.itemCount | Number of distinct line items |
Functions
| Function | Description |
|---|---|
cart.hasItem(packageId) | true when that package is in the cart |
cart.hasPackage(packageId) | Alias for hasItem |
<div data-next-show="cart.hasItem(123)">
Package 123 is in your cart
</div>Package Properties
Read properties of a specific package by ID. Replace [id] with the package's ref_id.
| Property | Description |
|---|---|
package.[id].inStock | Boolean |
package.[id].hasDiscount | Boolean |
package.[id].hasSavings | Boolean |
package.[id].quantity | Quantity in cart |
package.[id].price | Numeric price |
<div data-next-show="package.123.inStock">
In stock and ready to ship
</div>Order Properties
Available on post-purchase pages where the order has been loaded via ?ref_id=.
| Property | Description |
|---|---|
order.exists | Order loaded successfully |
order.isLoading | Order is being fetched |
order.hasError | Order failed to load |
order.completed | Order is complete |
order.hasItems | Order has at least one line |
order.hasShipping | Shipping was charged |
order.hasTax | Tax was charged |
order.hasDiscounts | Discounts were applied |
order.hasUpsells | Order has upsell line items |
order.supportsUpsells | The order can accept post-purchase upsells |
order.isTest | Test order |
order.total | Numeric total |
See Order Data for the full list of order display fields.
Profile Properties
Read profile state for A/B testing and customer segmentation.
| Property | Description |
|---|---|
profile.active | The active profile ID (string) |
profile.exists | true when a profile is active |
profile.is(name) | true when the active profile matches name |
<div data-next-show="profile.active === 'premium'">
Premium member exclusive
</div>
<div data-next-show="profile.is('vip')">
VIP perks
</div>There are also dedicated profile attributes — data-next-show-if-profile and data-next-hide-if-profile — that take a comma-separated list:
<div data-next-show-if-profile="vip,premium,gold">
Member benefits apply
</div>URL Parameter Properties
Access URL query parameters as param.<name>. See URL Parameters for the full lifecycle.
<div data-next-show="param.variant == 'a'">
Variant A only
</div>
<div data-next-show="param.preview">
Shows whenever ?preview is in the URL, regardless of value
</div>Selection Properties
When you have a selector with data-next-selector-id="<id>", read its current selection via selection.<id>.<property>.
| Property | Description |
|---|---|
selection.<id>.hasSelection | At least one card is selected |
selection.<id>.hasSavings | The selected package has savings |
selection.<id>.isBundle | The selected package is a multi-pack |
selection.<id>.total | Numeric total for the selected package |
See Selection for the full property list.
Null Safety
The conditional parser is null-safe. If you reference a property on something that does not exist (e.g., package.999.price when package 999 is not in the campaign), the expression evaluates to false and the element stays hidden — no console errors, no crashes.
<!-- Safe even if package 999 doesn't exist -->
<div data-next-show="package.999.price > 0"></div>Next Steps
- All operators: Operators
- All attribute names: Reference → Attributes