For more information... RTFM!
NAVIGATION
PAGES THAT LINK HERE
ACCOUNT LOGIN

You are not logged in

Powered by Interchange version 5.7.0

nitems

Returns the total number of items in the cart.

Summary

  • [nitems name]

Parameter Description Default
name The name of the cart you would like to tally. Current cart
compare Provide a regex to test the "qualifier" value against. None
qualifier The name of an item attribute that must have a true value, or match the "compare" regex, in order for the item to be counted. None

Examples

Tag expansion example

[nitmes cartname]
5

Perl example

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

or similarly with positional parameters:

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

Description

Returns the total number of items in the named cart, or the number of items that meet the specified criteria.

Parameters

name

The name of the cart you would like to tally.  If no cart name is provided then the current cart will be used.

compare

The specified "qualifier" attribute's value must match this regex to be counted.  If a "qualifier" is specified, but no "compare" regex is given, then the comparison will be based upon a straight true or false test of the "qualifier" attribute's value.

qualifier

The name of an item attribute that must have a true value, or match the "compare" regex, in order for the item to be counted.

Category:  Interchange tags
Last modified by: Kevin Walsh
Modification date: Saturday 15 September 2007 at 10:08 PM (CDT)
Home  |  Legal nonsense  |  Privacy policy  |  Donations  |  Contact us