---
title: Configuring the Shopping cart totals web part
related:
  - https://docs.kentico.com/k10/e-commerce-features/configuring-your-store/checkout-process.md
  - https://docs.kentico.com/k10/e-commerce-features/managing-your-store/discounts/working-with-buy-x-get-y-discounts.md
  - https://docs.kentico.com/k10/developing-websites/developing-websites-using-the-portal-engine/using-and-configuring-web-parts.md
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

When you create the [checkout process](https://docs.kentico.com/k10/e-commerce-features/configuring-your-store/checkout-process.md) in your on-line store, the Kentico E-commerce Solution offers several possible options on how to display total prices or other total values of your shopping cart. All the possible options are available according to the settings of the **Shopping cart totals** web part. You can place more **Shopping cart totals** web parts on a page to combine them and achieve your desired appearance.

To add the **Shopping cart totals** web part to your checkout process and to configure the web part:

1. [Place](https://docs.kentico.com/k10/developing-websites/developing-websites-using-the-portal-engine/using-and-configuring-web-parts.md) the **Shopping cart totals** web part on your shopping cart page. If the **Shopping cart totals** web part is already on the page, [open the configuration dialog](https://docs.kentico.com/k10/developing-websites/developing-websites-using-the-portal-engine/using-and-configuring-web-parts.md).
2. In **Total to display**, select your desired [type of the shopping cart totals](#types-of-shopping-cart-totals).

   ![](https://docs.kentico.com/docsassets/k10/configuring-the-shopping-cart-totals-web-part/total_to_display.png)
3. If you selected _Buy X Get Y and Order discounts summary_, select **Buy X Get Y transformation name**.
4. Click **Save & Close**.

The system now adds the **Shopping cart totals** web part or edits the existing web part and displays the total in the checkout process.

## Types of shopping cart totals

In the **Total to display** field, you can select one of the following options:

- **Products total** – total price of all [products](https://docs.kentico.com/k10/e-commerce-features/managing-your-store/products.md) in the shopping cart without any [order discounts](https://docs.kentico.com/k10/e-commerce-features/managing-your-store/discounts/working-with-order-discounts.md). [Discounts](https://docs.kentico.com/k10/e-commerce-features/managing-your-store/discounts.md) of the items and [taxes](https://docs.kentico.com/k10/e-commerce-features/configuring-your-store/configuring-taxes.md) are included.
- **Products excl. tax total** – total price of all products in the shopping cart without any order discounts and without taxes. Discounts of the items are included.
- **Products tax total** – total taxes of all products in the shopping cart.
- **Shipping total** – total price of shipping, taxes are included.
- **Shipping excl. tax total** – total price of [shipping](https://docs.kentico.com/k10/e-commerce-features/configuring-your-store/configuring-shipping-options.md) without taxes.
- **Shipping tax total** – total taxes of shipping.
- **Buy X Get Y and Order discounts total** – total saved price by [the Buy X Get Y discounts](https://docs.kentico.com/k10/e-commerce-features/managing-your-store/discounts/working-with-buy-x-get-y-discounts.md) and the order discounts.
- **Buy X Get Y and Order discounts summary** – more complex total summary of the Buy X Get Y discounts and the order discounts using transformations.
- **Discounts total** – total saved price by all available discounts.
- **Total** – the final total price of the shopping cart, after including everything (discounts, taxes, etc.).
- **Tax total** – total tax of items in the shopping cart and shipping.
- **Weight total** – total weight of the items in the shopping cart.

> **Tip:** If the total is a monetary value, i.e. the total is expressed in a currency, the currency is specified with [theCurrency selectionweb part](https://docs.kentico.com/k10/e-commerce-features/configuring-your-store/checkout-process/reference-checkout-process-web-parts.md) if available (otherwise, the [main currency](https://docs.kentico.com/k10/e-commerce-features/configuring-your-store/configuring-currencies.md) is used).

## Buy X Get Y transformations for the Shopping cart totals web part

You can either choose the prepared transformation or you can create your own transformation. For example, to display how much a customer saved with a Buy X Get Y discount in the shopping cart:

1. [Place](https://docs.kentico.com/k10/developing-websites/developing-websites-using-the-portal-engine/using-and-configuring-web-parts.md) the **Shopping cart totals** web part on your shopping cart page. If the **Shopping cart totals** web part is already on the page, [open the configuration dialog](https://docs.kentico.com/k10/developing-websites/developing-websites-using-the-portal-engine/using-and-configuring-web-parts.md).
2. To ensure that the web part with Buy X Get Y discount savings is visible only when a Buy X Get Y discount was applied to the shopping cart items, click **Edit value** ()at the **Visible** field and paste the following macro:

   ```csharp

   {% ECommerceContext.CurrentShoppingCart.OrderRelatedDiscountSummaryItems.Any() %}

   ```
3. In **Total to display**, select _Buy X Get Y and Order discounts summary_.
4. Click **Select** at the **Buy X Get Y** **transformation name** field.
5. Select the desired transformation. For example:
   - On the _Dancing Goat_ sample site, select _Page type_ in **Class type**, _Checkout step (Ecommerce.CheckoutStep)_ in **Page type** and then select _Ecommerce.CheckoutStep.CartDiscountSummary_.
   - On the _E-commerce site_, select _Page type_ in **Class type**, _E-commerce site - Transformations (EcommerceSite.Transformations)_ in **Page type** and then select _EcommerceSite.Transformations.OrderDiscountSummary_.
6. Click **Save & Close**.

The transformation displays the name of the discount and the amount saved.

> **Tip:** See examples on [theE-commerce siteandDancing Goatsample sites](https://docs.kentico.com/k10/e-commerce-features/configuring-your-store/installing-the-e-commerce-sample-sites.md).

### Changing the transformation template

If you create a new transformation or edit an existing transformation, achieve your desired display using HTML code and macros. You can use the following properties:

- **Name** – the name of the discount as specified in the **Buy X Get Y discounts** application.
- **Value** – the amount saved after applying the discount. To format the value, you can use the following macro which formats the value into [the format string of the currency](https://docs.kentico.com/k10/e-commerce-features/configuring-your-store/configuring-currencies.md):

  ```csharp

  Value.Format(ECommerceContext.CurrentCurrency.CurrencyFormatString)

  ```

![Transformation for Bux Y Get Y discounts](https://docs.kentico.com/docsassets/k10/configuring-the-shopping-cart-totals-web-part/transformation_for_buy_x_get_y_discounts.png "Transformation for Bux Y Get Y discounts")
