Is this really the version you are looking for? Kentico 8.1 documentation is no longer updated. Use the switch in the header to choose your Kentico version.

Shopping cart totals

When you create a shopping cart special page in your on-line store, Kentico E-Commerce Solution offers several possible options on how to display total prices of your shopping cart. Total values are displayed in the selected currency if the currency selector on the site is available, or in the main currency if the currency selector is not available.

Shopping cart totals are displayed with a web part called Shopping cart totals. You can combine them to achieve your desired appearance.

To make a shopping cart total in general:

  1. Place the Shopping cart totals web part on your shopping cart page. If the Shopping cart totals are already on the page, open the configuration dialog.
  2. In Total to display, select your desired type of the shopping cart totals.
  3. In case you chose Buy X Get Y and Order discounts summary, you have to choose Buy X Get Y transformation name.
  4. Click Save & Close.

The system now adds a new shopping cart total or edits the current one according to your selection and shows the new total in shopping carts.

Types of shopping cart totals

  • Products total – total price of all products in the shopping cart without any order discounts. Discounts of the items and taxes 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 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 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.

Buy X Get Y transformations

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

  1. Place the Shopping cart totals web part on your shopping cart page. If the Shopping cart totals are already on the page, open the configuration dialog.
  2. Click on Edit value next to the Visible property and paste the following macro. This ensures that the web part is visible only when there is a Buy X Get Y discount applied to items in the shopping cart:

    {% ECommerceContext.CurrentShoppingCart.OrderRelatedDiscountSummaryItems.Any() #%}
  3. In Total to display, select Buy X Get Y and Order discounts summary.
  4. Click Select next to Buy X Get Y transformation name.
  5. Under Buy X Get Y transformation name, choose E-commerce site - Transformations (EcommerceSite.Transformations).
  6. Click on EcommerceSite.Transformations.OrderDiscountSummary.

The transformation displays the name of the discount and the amount saved. You can see this example implemented on the sample E-commerce site.

Changing the transformation template

If you press Edit after clicking Selection next to Buy X Get Y transformation name as is in the previous instructions, you can edit the original transformation template. You can also create a new transformation template.

Using HTML code and macros you can achieve your desired display. You can use the original template as an example. 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, e.g., 50 % of the price of a product.