Previous in Contents Next in Contents

TableShippingADO

The TableShippingADO 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.

Remarks

The combination of the Key, Apply when, and Method fields determine whether the shipping charge should be applied to the order.

The TableShippingADO 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, which retrieves the shipping charge from the database column specified in Column. The component then computes the shipping charge.

The Parameter List is used to specify parameters to the query, which usually include a basis for the table lookup. The basis can be total cost of the order, or a merchant-defined value such as weight.

For parameters, you can use any of the following values.

Basis Item Key prefix Description
order.fieldname The value of the specified field, where fieldname is a property on the order form.
sum.fieldname The sum of value of the specified field for each item, where fieldname is a property in the item list.
sumq.fieldname The sum of value of the specified field for each item, where fieldname is a property in the item list, times the quantity of that item.
count The number of line items in the order form. (Does not depend on quantity of each item.)

The following table illustrates some useful values for Basis Item Key:

Example Basis Item Key Result
order._oadjust_subtotal Subtotal on the order form.
sum.quantity Sum of all quantities (total number of items ordered).
sum._oadjust_adjustedprice Sum of adjusted prices.
sumq._iadjust_currentprice Sum of current price times quantity for all items in the order.
sumq._product_weight Total weight of order. (Assumes that the weight column exists in the product table, and that the query used by QueryProdInfoADO includes this field.)

For example, if sumq._product_weight is specified, and if the order has two items, one item weighing 2 pounds with a quantity of 3 and the other item weighing 4 pounds with a quantity of 1, then the basis value is 10 pounds.

Related Topics


© 1997-2000 Microsoft Corporation. All rights reserved.