CartThrob 9 documentation for ExpressionEngine commerce teams Visit CartThrob.com
CartThrob.com

Cart Total

{exp:cartthrob:cart_total} outputs the final cart total.

In normal cart calculation, this total includes subtotal, tax, shipping, and discounts. This is usually the main total shown on cart and checkout pages.

See also:

Parameters

This tag has no tag-specific parameters.

Default output is formatted through ExpressionEngine’s number formatter. Use :numeric when you need a raw numeric value.

Modifiers

To get a raw numeric value for the cart total:

{exp:cartthrob:cart_total:numeric}

Output and Behavior

  1. Base value comes from cart->total().
  2. Normal calculation path is:
    • subtotal_with_tax + shipping + shipping_tax - discount - discount_tax
  3. Result is clamped to 0 if the computed value is negative.
  4. :numeric returns the raw numeric value; default output is formatted text.
  5. In advanced setups, CartThrob hooks/manual total overrides can affect the final returned total.

Example

Basic cart total

{exp:cartthrob:cart_total}

Raw numeric total

{exp:cartthrob:cart_total:numeric}