Name

total-cost — display total cost of electronic cart, including all adjustments

ATTRIBUTES

Attribute Pos. Req. Default Description
name | cart Yes Yes main Electronic cart name.
noformat Yes Yes 0 Do not format the displayed price?
space | discount_space Yes   Default space Name of the discount "space".
locale       Format price according to the specified locale.
display     symbol Display currency as symbol, text or not at all?
interpolate     0 interpolate output?
hide     0 Hide the tag return value?

DESCRIPTION

The tag displays the total monetary value of the user's electronic cart, including all price adjustments such as quantity pricing, discounts, handling, shipping and taxing.

BEHAVIOR

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

EXAMPLES

Example: Basic example

[total-cost]

NOTES

Handling and shipping costs are not applied to the total cost if the corresponding values (mv_shipmode resp. mv_handling) are empty. This can happen if you use [assign] to set the costs and there are no defaults for the values.

AVAILABILITY

total-cost is available in Interchange versions:

4.6.0-5.9.0 (git-head)

SOURCE

Interchange 5.9.0:

Source: code/SystemTag/total_cost.coretag
Lines: 21


# 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: total_cost.coretag,v 1.7 2007-03-30 23:40:49 pajamian Exp $

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

AUTHORS

Interchange Development Group

SEE ALSO

subtotal(7ic), salestax(7ic)

DocBook! Interchange!