Template Tags: Cart Tags
The tags listed on this page are used to manipulate the cart and view cart information. You can also watch a tutorial video on adding items to the cart.
- Adding, updating and deleting items from the cart
- Cart contents
- Cart Totals
- Past and Related Purchases
Adding, updating and deleting items from the cart
The following tags output forms that you can use to manipulate the contents of the cart.
- add_to_cart_form Adds a single item to the cart
- update_cart_form Updates one ore more items in the cart
- multi_add_to_cart_form Adds one or more items to the cart
- save_customer_info_form Saves customer information like names and addresses. The other tags above also save customer information.
These parameter driven tags automatically update the cart. Parameter based tags are useful for forcing items in or out of the cart based on visiting a specific page.
- add_to_cart Adds a single item to the cart
- clear_cart Clears the cart of all items and optionally all customer information
- new_cart Clears the cart of all items and all customer information and returns the cart to its default state, removing any configuration overrides that have been set
- delete_from_cart Delete one or all cart items
- duplicate_item Duplicates an item in the cart
- change_quantity Change the quantity of one item in the cart
These tags output information about the items in the cart and customer information.
- cart_items_info Outputs information about items in the cart, including item subtotals and prices with tax
- item_options Outputs selectable and selected options for items in the cart, or stored items
- cart_entry_ids lists entry ids of items in the cart separated by a pipe | character
- customer_info Outputs customer information. Generally you can use cart items info instead, as long as there is at least one item in the cart
These tags output item counts and cart totals.
- is_in_cart Used as a conditional to check whether an item is in the cart or not.
- total_items_count Total count of all items (items plus quantities)
- unique_items_count Total count of all unique items (does not include quantities)
- cart_info Outputs customer info, cart counts and totals
Past and related purchases
Get information about past purchases, and information about items similar to those already in the cart
- order_totals Useful for generating custom reports. Can be used similar to a channel:entries tag to filter and output information about past purchases
- order_items Outputs information about items connected with a specific order. Can be used similar to a channel:entries tag to simplify the output of purchased items
- also_purchased Lists items that others have purchased related to a specific item
- is_purchased_item Used as a conditional to test whether the current customer has purchased this item in the past
- get_items_in_range Gets a list of entry_ids of items that are in a specific price range