Jump to content

Cheapest Carrier Price Based On Customer IP


mozack

Recommended Posts

Hi to all,

 

Hope someone can help me here. I'm trying to understand how shipping is calculated and where. I have a custom module that when customer enter in store it saves 3/4 cookies based on customer location (by IP).

 

So, when customer arrives the module detects his location (Country Iso Code and State Name) and the script goes to DB and check the following data:

 

id_country

id_state (LIKE)

 After it saves in cookie the following:

 

$cookie->id_country
$cookie->id_state

$cookie->id_zone (based on country or state)

 

OK. But now, when no address available how can we check the cheapest carrier based on cookie saved before?

 

I have also the module localizedshipping installed, which file should i change to get correct shipping cost based on user $cookie->id_country?

 

I'm checking where is the code that saves the cart data, i thought to put there the cheapest carrier id, but where to modify the code?

 

Thanks

 

Mozack

 

Link to comment
Share on other sites

Hi Bellini13,

 

This is not integrated in localized shipping, not even in PrestaShop. When someone reach your store from somewhere in the world what is the shipping cost that appear in your cart?

 

That's the problem, you can set up the default carrier with lowest shipping cart but if customer is out of your country/zone which cost appear to them? Is it right?

 

I think that prestashop (to get customers) should have this as feature an estimate shipping cost until they dont know the correct address of customer (guest) based on customer location...

And that what i'm asking. Is there someone that know how to apply shipping cost to cart? I can get correct cheapest shipping cost based on user location, but how to apply globally? 

 

I can also put in shipping cost but the problem is that in total, when we have 1 product, the total is not correctly calculated...

 

Thanks for your comment.

 

Regards

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...