php - Prestashop shipping cost when user has more address -


i have created prestashop shipping module in php, distance between 2 locations calculated based on google maps api.

when user has 1 address, ok, when has 2 or more addresses , select second 1 deliver package, shipping cost calculated first address ($customer_address[0]).

i want right result. when select second item combo box, shipping cost calculated based on second item address.

i've tried after obtain results database, isn't working.

here code!

you must address cart:

$customer_address = $params->id_address_delivery; 

when customer select address saved addresses prestashop use address calculate shipping cost.


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -