The mgiSBShippingCost Tag
Tag Behavior
The mgiSBShippingCost tag determines the shipping method used with hard-coded
and database-driven shopping baskets.
Tag Syntax
The mgiSBShippingCost tag has 2 required parameters for all shipping
methods and 1 optional parameter for all shipping methods. In addition,
the mgiSBShippingCost tag has required and optional parameters for specific
shipping methods. The tag form is:
<mgiSBShippingCost name="Name" method="Method"
minimumShippingCost="Decimal Number">
Required Parameters for All Shipping Methods:
- name="Name" where "Name" is the unique name
of the mgiSBShippingCost tag. This name is used only by MGI and is not
visible to visitors.
- method="Method" where "Method" is the shipping
method used with the shopping basket. The available shipping methods are:
- "BasePlusPerItem" - where shipping charges are a base
shipping cost for each order and/or a shipping cost for each item. Available
for hard-coded and database-driven shopping baskets. See
the 18 optional parameters below.
- "Weight" - where shipping charges are based on the
total weight of items in an order. Requires database-driven shopping basket.
See 2 required parameters below.
- "Percentage" - where shipping charges are a percentage
of the order subtotal price. Requires database-driven shopping basket.
See the required parameter below.
- "TotalItems" - where shipping charges are based on
the total quantity of items in an order. Requires database-driven shopping
basket. See the required parameter below.
Optional Parameter for All Shipping Methods:
- minimumShippingCost="Decimal Number" where "Decimal
Number" is the minimum shipping charge for each order. The minimum
shipping cost or the shipping cost calculated from the chosen method,
whichever is greater, is used. The default minimum shipping cost is "0.00".
Optional Parameters for the BasePlusPerItem Shipping Method:
- baseShippingCost="Decimal Number" where "Decimal
Number" is the base shipping charge for each order. The default base
shipping cost is "0.00".
- shippingCostFieldName="Database Field" where "Database
Field" is the database field name which contains the shipping charge
for each item. The default shipping cost for each item is "0.00".
- quantityFieldName2 ... quantityFieldName9="Database Field"
where "Database Field" is the database field name which contains
each quantity level for shipping price breaks. Shipping price breaks are
determined by the quantity that is greater than or equal to the quantity
in each of these database fields. The database field names are case-sensitive.
- shippingCostFieldName2 ... shippingCostFieldName9="Database
Field" where "Database Field" is the database field
name which contains each shiping cost level for shipping price breaks.
The database field names are case-sensitive.
Required Parameters for the Weight Shipping Method:
- weightFieldName="Database Field" where "Database
Field" is the database field name which contains the weight of each
item. The database field name is case-sensitive.
- costPerPound="Decimal Number" where "Decimal
Number" is the price of each pound in an order.
Required Parameter for the Percentage Shipping Method:
- percentage="Decimal Number" where "Decimal Number"
is the percentage of the order subtotal price that constitutes the shipping
charge.
Required Parameter for the TotalItems Shipping Method:
- shippingPerItem="Decimal Number" where "Decimal
Number" is the shipping charge for each item in an order.
Example Usage and Output
<mgiSBShippingCost name="Shipping" method="Percentage"
percentage=".10">
In this example, the shipping charge is determined by a percentage of
the order subtotal. If the subtotal is $100.00, then the shipping charge
will be $10.00 for a total price of $110.00 plus tax.
<mgiSBShippingCost name="Shipping" method="BasePlusPerItem"
baseShippingCost="5.00">
In this example, the shipping charge is the same for all orders. Each
order will be charged $5.00 for shipping. If the order subtotal is $20.00,
then the shipping charge is $5.00 for a total price of $25.00 plus tax.
If the order subtotal is $50.00, then the shipping charge is $5.00 for a
total price of $55.00 plus tax.
Suggested Usage
- Hard-Coded Shopping Baskets
- Database-Driven Shopping Baskets
|