# Cart Data

### Cart

The `{{cart}}` handlebar can be used to fetch information about the products present in a User's cart, or about the cart itself, such as currency used. It has the following syntax:

```javascript
{{cart.[***]}}
```

#### Displaying the total of a User's Cart in a Journey

If you wish to show the total price of items in a User's cart during a Journey, we can call the journey.steps handlebar to display the Cart's total:

```
{{journey.steps.[0].[cart.total]}} {{journey.steps.[0].[cart.currency]}}
```

This can be used to send a reciept after an order, or a reminder if the cart is abandoned.

#### Displaying products in a User's current cart

We can use the cart with [Product Helper Functions](/data-and-engagement-platform/messages/personalization/product-helper-functions.md) to display details of the products in a User's Cart.

```
{{#includeProducts '{
    "eventProducts": {
        "events": ["Added Product"],
       "eventTimes": ["-2 weeks","now"],
        "operator": "n-th last",
        "operand": 1}
    }
'}}


    {{#findProduct [cart.products.0.sku]}}
             {{[properties.name]}}
             {{[properties.smallImageLink]}}
    {{/findProduct}}


{{/includeProducts}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.crossengage.io/data-and-engagement-platform/messages/personalization/import-data/cart-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
