I created a custom module delivery/carrier, but I need to pass the weight of products, the ZIP Code of delivery and the order value for the webservice. I am not succeeding in taking this information into my module.
The following piece of code I'm using, actually, I'm following this example.
http://doc.prestashop.com/display/PS16/Creating+a+carrier+module
public function getOrderShippingCost($params, $shipping_cost)
{ // here I call my webservice }
I believe that this information is within $params
, but do not know how to handle them or what they are.
It was pretty simple to fix, just use the following command.
$address = new Address ($params->id_address_delivery); $zip = $address->postcode;
I can pick up any object parameter $address above.