Jump to content

[Solved] Which Is Equivalent The Getshipping Method In Ps 1.4 (And Under)?


E.D.

Recommended Posts

I solved the problem:

 

$shipments = array();
   if (_PS_VERSION_ < 1.5 )
 {
 $carrier = new Carrier((int)$order->id_carrier);
 $shipments[0]['state_name'] = $carrier->name;
 $shipments[0]['shipping_tax_rate'] = round($order->carrier_tax_rate,0);
 $shipments[0]['shipping_cost_tax_excl'] = $order->total_shipping/(($order->carrier_tax_rate/100)+1);
 $shipments[0]['shipping_cost_tax_incl'] = $order->total_shipping;
 }
   else
 {
 $shipments = $order->getShipping();
 }

 

But! If someone know a better solution, please write to me.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...