Jump to content

Own carrier module, problem with retrieving products from getOrderShippingCost()


Recommended Posts

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 by Czcibor Piotr (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...