Microsoft KB Archive/229784

= How to Charge No Shipping for an Item Using the Linear Shipping Component =

Article ID: 229784

Article Last Modified on 6/24/2004

-

APPLIES TO


 * Microsoft Site Server 3.0 Commerce Edition

-



This article was previously published under Q229784



SUMMARY
Commerce administrators may want to charge no shipping costs for a specific item or items, such as a product catalog.

When using the Linear Shipping component, which charges shipping per-item and per the method of shipping chosen, you can exclude shipping charges for a single item or items with the following script (inserted as a scriptor after the linear shipping components).

This scriptor compares the SKU of the items in the order form, and if the SKU is for an item that shipping should not be charged for, total shipping charges are adjusted to account for this.

function MSCSExecute(config, orderform, context, flags) y=0 z=0 adjust = 0

for each x in orderform.items select case x.sku case 001      'this is one sku for which no shipping is charged y = y+1 case 005      'this is another sku for which no shipping is charged y = y+1 end select next

select case orderform.shipping_method case "standard_shipping" z=50 case "2nd_day_air" z=300 case "first_class" z=200 case "pal_apo" z=150 case "canadian" z=300 case "foreign" z=900 end select

adjust = y * z orderform.[_shipping_total] = orderform.[_shipping_total] - adjust

MSCSExecute = 1 end function

Keywords: KB229784

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.