![]() |
| > Home > Documentation > Latest documentation > Interchange tags > shipping |
|
shippingReturns the shipping cost, exclusive of sales tax, of all the items placed in the named cart so far. Summary
ExamplesTag expansion example
Perl example
or similarly with positional parameters:
DescriptionReturns the shipping cost, exclusive of sales tax, of all the items placed in the named cart so far. The calculation is performed using the specified shipping mode, which is usually set in the [value mv_shipmode]. This tag also provides options to build a selection widget (usually select or radio types) with embedded cost data.
ParametersmodeWhitespace, null or comma delimited list of modes upon which to calculate shipping cost. This parameter overrides the [value mv_shipmode] (or [value mv_handling] if handling is set true). addSpecify extra shipping data. cartComma-separated list of cart names to calculate shipping cost for. Defaults to the current cart (usually "main"). check_validityReturn a true value if the shipping data is valid. convertConvert the amount according to the PriceDivide value for the current locale. See the [currency] tag for a usage example. country_varSpecify a [value] variable name to use to find the user-selected shipping country. The default is "country. I.e. [value country]. defaultReset the shipping mode to the default value set in [[[tags/value mv_shipmode]. fileSpecify a filename to read shipping from. The default is the usual shipping file (i.e. "shipping.asc"). formatIf label is true then the shipping value is returned in the specified format. For example:
The default format is "<option value="%M"%S>%D (%F)</option>". handlingUse [value mv_handling] rather than [value mv_shipping] as the first default for the mode parameter. This attribute is only used if you do not specify a mode.
hideSuppress output. hide_errorSuppress error messages. labelReturn an <option> widget unless overridden using format. By default this cases a HTML <option> widget to be returned for each of the shipping mode(s), including the description and the cost. You can override the widget with the format parameter. Usage example:
noformatIf true then suppress currency formatting from the amount.
no_setIf true then don't set the user's [value mv_shipmode] to the current mode. no_stateBypasses the state lookup for "widget=TYPE" and "possible=1". output_optionsSets the default format to "%M=%D (%F)". possibleReturns all possible modes for the selected country and state, based upon the "country" and "state" tables. This performs a query to find the "shipmodes" column of the state, based upon the users's [value state] and/or the "shipmodes" column of the country based on the user's [value country]. You can set the following additional parameters, although most will use the Interchange defaults:
reset_messageBlanks the session's current shipping message. ($Session->{ship_message}). reset_modesClears list of modes in $Vend::Cfg->{Shipping_line}. resolveReturns the one shipping mode to set as a default, based upon the best information available. Usually selects the first in the list based upon the country state_varSpecify a [value] variable name to use to find the user-selected shipping state (county/area/etc.). The default is "state. I.e. [value state]. tableWhitespace-delimited list of tables containing shipping data required for perl calculations (i.e. in the "perl" column of your shipping table). You must specify the tables to get past the Perl
Safe
Safe widgetReturns a pre-configured widget for shipping mode selection. This will select the modes using "possible=1", but will also do shipping calculations to see if they are valid. If there is no weight, zip, country, or other required data then it will return "not enough information". In other words, [shipping widget=select] might return the following:
|
| Home | Legal nonsense | Privacy policy | Contact us |