Name

shipping-desc — displays shipping mode description

ATTRIBUTES

Attribute Pos. Req. Default Description
mode Yes shipping mode
key Yes description
interpolate     0 interpolate output?
hide     0 Hide the tag return value?

DESCRIPTION

[shipping-desc] allows access to arbitrary keys in the shipping configuration.

BEHAVIOR

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

EXAMPLES

Example: Display shipping modes and corresponding information

The following snippet out of shipping.asc contains additional information which can be displayed with [shipping-desc].

usps: USPS 1st class
        crit        [onlyitems]
        min         0
        max         0
        cost        e No shipping needed!
        at_least    0
        adder       0
        p_time      1-2 business days
        s_time      3-7 business days

        min         1
        max         6
        cost        4.00

        min         7
        max         12
        cost        7.00

[loop list="[shipping possible=1]"]
Shipping Mode:   [shipping-desc mode="[loop-code]"]
Processing time: [shipping-desc mode="[loop-code]" key=p_time]
Shipping time:   [shipping-desc mode="[loop-code]" key=s_time]
Cost:            [shipping mode="[loop-code]"]
[/loop]

NOTES

AVAILABILITY

shipping-desc is available in Interchange versions:

4.6.0-5.9.0 (git-head)

SOURCE

Interchange 5.9.0:

Source: code/SystemTag/shipping_desc.coretag
Lines: 14


# 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: shipping_desc.coretag,v 1.6 2007-09-21 16:15:48 kwalsh Exp $

UserTag shipping-description Alias       shipping-desc

UserTag shipping-desc        Order       mode key
UserTag shipping-desc        Version     $Revision: 1.6 $
UserTag shipping-desc        MapRoutine  Vend::Ship::tag_shipping_desc

Source: lib/Vend/Ship.pm
Lines: 1288

sub tag_shipping_desc {
my $mode =   shift;
my $key = shift || 'description';
$mode = $mode || $::Values->{mv_shipmode} || 'default';
return errmsg($Vend::Cfg->{Shipping_hash}{$mode}{$key});
}

AUTHORS

Interchange Development Group

SEE ALSO

shipping(7ic)

DocBook! Interchange!