E.D. Posted March 4, 2013 Share Posted March 4, 2013 (edited) Which is equivalent the getShipping method in PS 1.4 (and under)? I wrote a module in PS 1.5, but not working in PS 1.4 because the getShipping methot is not exist in PS 1.4. Edited March 5, 2013 by E.D. (see edit history) Link to comment Share on other sites More sharing options...
E.D. Posted March 4, 2013 Author Share Posted March 4, 2013 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now