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

Unique Items Count

{exp:cartthrob:unique_items_count} outputs the number of unique cart rows.

Example: if product A has quantity 4 and product B has quantity 5, this returns 2.

If you need the total quantity of all items, use total_items_count.

Parameters

This tag has no parameters.

Output and Behavior

  1. Returns the number of cart rows (count()), not the quantity sum.
  2. Output is a numeric count.
  3. Quantity changes on a row do not change this value unless rows are added/removed.

Examples

{exp:cartthrob:unique_items_count}