> ## Documentation Index
> Fetch the complete documentation index at: https://developers.loyaltylion.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Points for cart

<Note>Available on the **Advanced plan** and above.</Note>

Use this component to display how many points a customer would earn for their entire cart.

## 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 }}`

<Note>
  The points shown by this component only includes points awarded for the purchase rule.

  It does not factor in [collection exclusions](https://help.loyaltylion.com/en/articles/1965585-activity-make-a-purchase#h_531103629b),
  [point modifiers](https://help.loyaltylion.com/en/articles/6777829-points-modifier) or [bonus
  points](https://help.loyaltylion.com/en/articles/3459309-promotion-bonus-points-on-a-product-collection).

  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).
</Note>

***

## Code

### Example for Shopify

```html theme={null}
<!-- points customer will earn for entire cart -->
<span data-lion-points-for="{{ cart.total_price }}"></span>
```

`{{ 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](/sdk/live-updating).

### Example for custom value

```html theme={null}
<!-- points customer will earn for spending $125.00 -->
<span data-lion-points-for="12500"></span>
```

<Note>
  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](/sdk/live-updating) in order for LoyaltyLion
  elements to refresh upon change.
</Note>
