4.48. nitems

Returns the total number of items ordered. Uses the current cart if none specified.

4.48.1. Summary

    [nitems name]
Parameters Description Default
compare Regular expression the specified qualifier attribute's value must match to be counted. This replaces the truth value comparison.
  • Default: None (uses truth value of the specified qualifier attribute)
DEFAULT_VALUE
name Cart name
  • Default: current cart
DEFAULT_VALUE
qualifier An item attribute that must be true in order to count the item.
  • Default: None
DEFAULT_VALUE
Attributes Default
interpolate (reparse) No
Other_Characteristics  
Invalidates cache YES
Container tag No
Has Subtags No
Nests Yes

Tag expansion example:

    [nitems name]
---
    TODO: (tag result)

ASP-like Perl call:

   $Tag->nitems(  { name => VALUE_name
}, $body  );

or similarly with positional parameters,

    $Tag->nitems(name, $attribute_hash_reference, $body);

4.48.2. Description

Expands into the total number of items ordered so far. Takes an optional cart name as a parameter.

4.48.2.1. compare

Regular expression the specified qualifier attribute's value must match to be counted. This replaces the truth value comparison.

4.48.2.2. name

Cart name

4.48.2.3. qualifier

An item attribute that must be true in order to count the item.