Available on the Advanced plan and above.
Explanation
The attribute value should be the total server-side value of the current cart. If you’re using Shopify, you can get this value in Liquid using{{ cart.total_price }}
The points shown are worked out the same way as the points for an order of
this amount, including the customer’s tier and any campaign that applies to
every product. The amount names no products, so collection
exclusions,
point modifiers
and bonus
points
aren’t included. Neither is the rule that buying a gift card earns nothing
where your program gives points for spending gift cards instead, so an
amount that includes one can show more than the order earns.A customer who isn’t signed in sees the points they’d earn on joining, at
your default tier. Campaigns with a minimum spend aren’t included for them,
and a change to your rules or campaigns can take up to an hour to show.The attribute value should be in cents, as the component divides the amount
by 100 before applying the purchase rule multiplier (This applies even for
currencies without subunits, this component is not currency aware. If your
currency doesn’t have subunits, please multiply amounts by 100).
Code
Example for Shopify
{{ cart.total_price }} value is only set by Shopify on initial render on the server. If you use an ajax cart, or other functionality to dynamically update the DOM, please see the section on live updating.
Example for custom value
If you have a dynamic cart, a single page app, or anything that changes the
DOM containing loyaltylion UI components without a full page reload, you might
need to trigger a UI refresh in order for LoyaltyLion
elements to refresh upon change.