Template Tags: Cart Tags
This page is an index of CartThrob cart-related tags for managing items, displaying cart data, and reporting on purchases.
Add, Update, and Remove Cart Items
Use these form tags to add products, update line items, and capture customer details during cart edits.
- add_to_cart_form Add one item to the cart with a form submission.
- update_cart_form Update one or more cart items and customer fields in one request.
- multi_add_to_cart_form Add multiple items to the cart from a single form.
- save_customer_info_form Save customer fields like name and address without modifying line items.
- delete_from_cart_form Submit a form to remove a specific cart row.
- cart_form Output a legacy/general cart wrapper form for custom cart templates.
Use these parameter-driven tags to change cart state from a page visit or URL request.
- add_to_cart Add one item to the cart using tag parameters.
- clear_cart Clear items, coupon codes, shipping info, and totals; optionally clear customer/custom data with
clear_customer_info. - new_cart Reset the cart to defaults and remove cart configuration overrides.
- delete_from_cart Remove one item by
row_id, or remove one matching item byentry_idand optionalitem_options. - duplicate_item Duplicate an existing cart item row for alternate configuration.
- change_quantity Set a specific quantity for one cart item row.
Cart Contents and Customer Data
Use these tags to list current cart contents, selected options, and saved customer/session data.
- cart_items_info Output cart line-item details, pricing, subtotals, and related values.
- item_options Output selected and selectable options for cart or stored items.
- package Output package/sub-item data from a cart row or product package field (legacy helper).
- cart_entry_ids Return cart item entry IDs as a pipe-delimited string.
- customer_info Output saved customer data for pre-filling forms and checkout steps.
- has_shippable_items Return whether the active cart contains at least one shippable item.
Cart Totals and Counts
Use these tags to output subtotal, shipping, tax, total, weight, and item count values.
- cart_subtotal Output subtotal excluding shipping, tax, and discounts.
- cart_subtotal_plus_shipping Output subtotal plus shipping, excluding tax.
- cart_subtotal_plus_tax Output subtotal plus tax.
- cart_subtotal_minus_discount Output subtotal after discount adjustments.
- cart_shipping Output shipping total for the active cart.
- cart_shipping_plus_tax Output shipping total including shipping tax.
- cart_tax Output tax total for the active cart.
- cart_tax_rate Output the active cart tax rate value (rate, not tax amount).
- cart_total Output final cart total including shipping, tax, and discounts.
- cart_weight Output combined weight for all cart items.
- is_in_cart Check conditionally whether a specific item is currently in the cart.
- is_in_stock Check conditionally whether a product entry is currently in stock.
- has_tax Return
TRUEwhen the cart has tax andFALSEwhen tax is zero. - has_shipping Return
TRUEwhen the cart has shipping andFALSEwhen shipping is zero. - total_items_count Output total quantity count across all line items.
- unique_items_count Output count of unique line items (ignores quantity).
- cart_info Output customer info plus cart totals and counts in one tag pair.
Past and Related Purchases
Use these tags to report on completed orders and surface related products from purchase history.
- order_totals Filter and output aggregate order values for reporting.
- order_items Output purchased item rows tied to one or more orders.
- also_purchased List products frequently purchased with a target item.
- most_purchased Output entry IDs ordered by highest purchase counts (legacy reporting helper).
- purchased_entry_ids Output purchased entry IDs as tag-pair rows (legacy purchase-history helper).
- is_purchased_item Check conditionally whether the current customer purchased an item before.
- get_items_in_range Return entry IDs for items within a specific price range.