Name

subtotal — display total cost of products within cart

ATTRIBUTES

Attribute Pos. Req. Default Description
[ name | cart ] Yes No main cart name
noformat Yes No No Output plain number instead of formatting it according to the currency locale?
display     symbol Display currency as symbol, text or not at all?
interpolate     0 interpolate output?
hide     0 Hide the tag return value?

DESCRIPTION

[subtotal] returns the total cost of the products within a cart, formatted according to the currency settings.

BEHAVIOR

This tag does not appear to be affected by, or affect, the rest of Interchange.

EXAMPLES

Example: Basic example

[subtotal]

NOTES

AVAILABILITY

subtotal is available in Interchange versions:

4.6.0-5.7.0 (cvs-head)

SOURCE

Interchange 5.7.0:

Source: code/SystemTag/subtotal.coretag
Lines: 22


# Copyright 2002-2007 Interchange Development Group and others
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.  See the LICENSE file for details.
# 
# $Id: subtotal.coretag,v 1.7 2007/03/30 23:40:49 pajamian Exp $

UserTag subtotal            Order        name noformat
UserTag subtotal            attrAlias    cart name
UserTag subtotal            attrAlias    space discount_space
UserTag subtotal            addAttr
UserTag subtotal            PosNumber    2
UserTag subtotal            Version      $Revision: 1.7 $
UserTag subtotal            Routine      <<EOR
sub {
my($cart, $noformat, $opt) = @_;
return currency( subtotal($cart, $opt->{discount_space}),
  $noformat, undef, $opt);
}
EOR

AUTHORS

Interchange Development Group

SEE ALSO

currency(7ic), total-cost(7ic)

DocBook! Interchange!