cart

Cart

Load specific values from the cart such as cart total

Example

[%cart id:'total_items'/%]

Usage

The cart function loads specific data from the cart depending on the ID selected.

Keep in mind that this prints the value when the page is rendered, meaning it won't reflect updates made in the cart via Ajax, so if a customer updates their cart the details won't be updated until the page is refreshed.

Data tag shortcut tip

You can call any of the values as a data tag with the following format [@cart:product_total@]. This is a faster and easier way to load the values and can be used with other tags such as if.

Parameters

Name Options Description
id:'' discount_total, grand_total, payment_method, payment_method_id, product_discount, product_total, shipping_cost, shipping_discount, shipping_method, shipping_method_id, shipping_total, total_items, voucher_credit The ID to target for the cart data

Options

Option Example Description
discount_total 155.2 Total of product and shipping discounts
grand_total 1356.8 Grand total of the order
payment_method MasterCard Selected payment method
payment_method_id 5 Selected payment method ID number
product_discount 150.2 Product discount
product_total 1502 Product total prior to discount
shipping_cost 10 Shipping cost for the selected method
shipping_discount 5 Shipping discount total
shipping_method Standard Shipping Selected shipping method name
shipping_method_id 22 Selected shipping method ID number
shipping_total 5 Shipping cost after discount has been applied
total_items 2 Total number of products on the order
voucher_credit 50 Gift Voucher credit applied to order

Was this article useful?

Be notified when this page is updated. Optional.