Jump to content

How to modify an order shipping method from BO


Recommended Posts

  • 6 months later...
  • 4 months later...
UPDATE ps_orders o, ps_order_carrier oc SET
o.payment='Bank wire',
o.module='bankwire',
o.total_shipping='',
o.total_shipping_tax_incl='',
o.total_shipping_tax_excl='',
o.total_paid=o.total_paid+'',
o.total_paid_tax_incl=o.total_paid_tax_incl+'',
o.total_paid_tax_excl=o.total_paid_tax_excl+'',
o.total_paid_real=o.total_paid_real+'',
oc.id_carrier='51',
oc.shipping_cost_tax_incl='',
oc.shipping_cost_tax_excl=''
WHERE o.id_order = oc.id_order AND o.id_order = '';
---------------------------
UPDATE ps_orders o, ps_order_carrier oc SET
o.payment='Cash on delivery (COD)',
o.module='cashondelivery',
o.total_shipping='0',
o.total_shipping_tax_incl='0',
o.total_shipping_tax_excl='0',
o.total_paid=o.total_paid-oc.shipping_cost_tax_incl,
o.total_paid_tax_incl=o.total_paid_tax_incl-oc.shipping_cost_tax_incl,
o.total_paid_tax_excl=o.total_paid_tax_excl-oc.shipping_cost_tax_excl,
o.total_paid_real=o.total_paid_real-oc.shipping_cost_tax_incl,
oc.id_carrier='52'
WHERE o.id_order = oc.id_order AND o.id_order = '';

UPDATE ps_orders o, ps_order_carrier oc SET
oc.shipping_cost_tax_incl='0',
oc.shipping_cost_tax_excl='0'
WHERE o.id_order = oc.id_order AND o.id_order = '';

I have wrote the above code to do it in SQL.  1st 1 is free shipping to postage. 2nd 1 is postage to free shipping.

 

I appreciate feedbacks.

 

Thanks,

Samuel

Link to comment
Share on other sites

×
×
  • Create New...