commerceserver2007 - How to make a discount apply to only one shipping method in Commerce Server 2007? -


I searched and searched for this simple question in Commerce Server 2007, but found nothing useful. Something looks like that should be possible. How can a discount on only one shipping method in Commerce Server 2007? Prior to this problem, I had a scenario where standard delivery options were only one which would never be reduced and the next day and international options would always be the full price.

In this example I wrote a custom pipeline component, which removed any shipping discount, if any other shipping method other than the standard was selected.

I have all the following pipeline shipping discount update components, this is a bit of a hack because I hardcoded the standard delivery id, but he would never be able to change it so that I could remove it :

 Function MSCSExecute (config, orderform, reference, flags) Due shipment 'Simple list of shipment in basket' lamp shipment ' Ount Save (As shipping has been written by Diskountadit) If not (Ordrformkvalu ( "shipments")) if shipments set = Ordrformkvalu ( "shipments") (SShipmentID = shipment of each shipment in the shipment " shipping_method_id ") Next If sShipmentI D & lt;"> {00000000-0000-0000-0000-005719007655} "and orderForm.value (" _ cy_shipping_discounts_total ")> 0 then orderform.value (" _ shipping_discount_description ") =" "shipment In order of order, each shipment orderForm.value ("_cy_shipping_total") = orderForm.value ("__s_shipping_total" ) + Shipmentkvlyue ( "_ cy_shipping_discounts_subtotal") shipment.value ( "_ cy_shipping_discounts_subtotal") = 0 Next Ordrfarmkvlyue ( "_ cy_shipping_discounts_total") = 0 End If End If MSCSExecute = 1 end function sub Mssisopan (config) End Sub Sub MSCSClose () End Sub 

Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -