Total Items Count
{exp:cartthrob:total_items_count} outputs the sum of item quantities in the cart.
Example: if product A has quantity 4 and product B has quantity 5, this returns 9.
If you need the number of unique cart rows instead of quantity totals, use unique_items_count.
Parameters
This tag has no parameters.
Output and Behavior
- Returns the cart quantity sum (
count_all()). - This is quantity-based, not unique-item-based.
- Output is a numeric count.
Examples
{exp:cartthrob:total_items_count}
{if "{exp:cartthrob:total_items_count}" > 0}
You have items in your cart.
{/if}