TableShipping
The TableShipping component, which appears in the Shipping stage of an order processing pipeline, sets the value of _shipping_total
on the order form by using values retrieved from the database.
Note
The TableShipping component is included in Commerce Server 3.0 only for backward compatibility with sites created in Commerce Server 2.0. Commerce Server 3.0 sites should use TableShippingADO.
-
υKey. (Read-only) The name of a property on the order form used to specify shipping method. The value of this property is compared to the string specified in the Method field to determine whether to apply the shipping charge to the order.
-
υApply when. Specifies when to apply the shipping charge.
-
υEqual to Method. Specifies that the shipping charge should be applied if the value of the field specified for Key is the same as the string specified in the Method field.
-
υHas Any Value. Specifies that the shipping charge should be applied when the value of the field specified for Key has any value on the order form. If you select this option, the Method field should be left blank.
-
υAlways. Specifies that the shipping charge is always applied to the order.
-
υMethod. If Equal to Method is selected, specifies a string that the component compares with the value of shipping_method on the order form to determine whether to apply the shipping charge to the order. The shipping charge will be applied only if there is an exact match.
-
υBasis Item Key. Specifies the property of the item that is used to compute the shipping charge. The component computes the charge by multiplying the value retrieved by the database query by the sum of the property specified for Basis Item Key. For example, you might base the shipping charge on the quantity of the items, and the Basis Item Key might be sum.quantity. If the order contains two items, one item with a quantity of four and the other item with a quantity of two, then the basis sum is six. The component multiplies the shipping charge by six. See Specifying the Basis Item Key.
-
υQuery. Specifies either the full SQL text of the query that is executed by this component or the name of a query whose full SQL text is stored in the Content object.
-
υOrder Key. Specifies the property of the order as a whole that is used to compute the shipping charge. This key is the name of a column in a database table that specifies a per-order handling charge. This parameter is optional; if none is specified, it defaults to
ship_to_zip
.
-
υItem Key. Specifies the property of each item that is used to compute the shipping charge. This key is the name of a column in a database table that specifies a per-item handling charge. This parameter is optional; if none is specified, it defaults to
cost
.
Remarks
The combination of the Key, Apply when, and Method fields determine whether the handling should be applied to the order.
The TableHandling component first checks the Apply when value. If it is set to Always, the shipping charge is always applied to the order. If Apply when is set to Has any value, the shipping charge is applied to the order whenever the order form contains any value for shipping_method. If Apply when is set to Equal to Method, the component does a comparison between the value of shipping_method on the order form and the text string in the Method field on this property page. If there is a match, the shipping charge is applied.
If the component determines that the shipping charge should be applied, it then executes the query specified in Query. This query retrieves the per-item and per-order shipping charges from the database, and then uses the value of the Basis Item Key to compute the shipping charge.
Related Topics
© 1997-1998 Microsoft Corporation. All rights reserved.