ZangZang Posted February 8, 2015 Share Posted February 8, 2015 (edited) Hi, I have an issue where the shipping price is not reflecting in the pdf invoice or in admin at all. E.g When I'm about checkout with the following: Item price = 1000 USD Shipping = 150USD Total = 1150 USD So I get paid 1150 USD confirmed in my account. However when looking at the order in admin and invoice pdf: Item price = 1000 USD Shipping = 5USD //<----- Something went wrong here! Total = 1005 USD I would appreciate some advice where or which file to start looking at or if something I have missed??? Thanks! Edited February 8, 2015 by ZangZang (see edit history) Link to comment Share on other sites More sharing options...
doekia Posted February 8, 2015 Share Posted February 8, 2015 There is actually some ongoing fixes regarding calculations ... You may well be affected by those in your scenario. Can you anonimyze and post your invoice so we can have a closer look? PS version and fact you have upgraded from a previous one may also help narrow the culprit. Further talk about calculations: https://www.prestashop.com/forums/topic/395261-next-release-16012/ Best, Link to comment Share on other sites More sharing options...
ZangZang Posted February 8, 2015 Author Share Posted February 8, 2015 (edited) Hi, Im running version 1.6.0.6. The thing is that I have modified in order to suit my carrier system. All weights > x kg I will take the value of that certain range and multiply with the weight. I got it all correct, all displays correctly in the shopping cart and even for payment. I checked my paypal account, everything is correct. Only in backoffice I can see the shipping price totally wrong, and I could see in table "ps_order_invoice" in database have the incorrect value saved. So the correct values are not stored when payment is finished. This is what I changed in Cart.php: public function getDeliveryOptionList(Country $default_country = null, $flush = false) { . . foreach ($package_list as $id_address => $packages) { ... // 1. Foreach packages, get the carriers with best price, best position and best grade foreach ($packages as $id_package => $package) { .... foreach ($package['carrier_list'] as $id_carrier) { $price_without_tax = $this->getPackageShippingCost($id_carrier, false, $country, $package['product_list']); // This part has been added by me --------------- $weight = $this->getTotalWeight($product_list); if( $weight >= 25) $price_without_tax = $price_without_tax * $weight; // ----------------------------------------------------------- } } } } Edited February 8, 2015 by ZangZang (see edit history) Link to comment Share on other sites More sharing options...
ZangZang Posted February 12, 2015 Author Share Posted February 12, 2015 I found the issue, I had to make the modifications in getPackageShippingCost. Link to comment Share on other sites More sharing options...
Recommended Posts