Czcibor Piotr Posted November 14, 2012 Share Posted November 14, 2012 (edited) Hello, I am developing carrier module for Prestashop 1.5.2 following example: http://www.prestasho..._configuration/ Strange situation happens while in function getOrderShippingCost() I call Context::getContext()->cart->getProducts(). public function getOrderShippingCost() { var_dump( Context::getContext()->cart->getProducts() ); ... } For example I have one product in cart, but function returns the same product multiplied. Analogously for more products in cart. Anyone have idea where to look for? I'm stuck. If anyone would like to test the module, do not forget to configure module after instalation. Thanks for any answer. Edited November 15, 2012 by Czcibor Piotr (see edit history) Link to comment Share on other sites More sharing options...
Czcibor Piotr Posted November 15, 2012 Author Share Posted November 15, 2012 (edited) This was beacuse of var_dump. Returning cost as a number of products works well. public function getOrderShippingCost() { return (float)Context::getContext()->cart->nbProducts(); } . Edited December 9, 2012 by Czcibor Piotr (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts