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.
cart_total describes the cart’s current server-side state. It is not
always the final amount a checkout will charge. A checkout_form can
apply fixed tax, shipping, exemption, or price parameters, and submitted
address, shipping-option, coupon, or permitted-user values can trigger a
later recalculation.
Inside checkout_form, use {checkout_total} when you need a preview
that includes known checkout tag parameters. For location-sensitive or
otherwise interactive checkouts, collect and save the relevant customer
information before presenting a total as final.
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
- Base value comes from
cart->total(). - Normal calculation path is:
subtotal_with_tax + shipping + shipping_tax - discount - discount_tax
- Result is clamped to
0if the computed value is negative. :numericreturns the raw numeric value; default output is formatted text.- 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}