Jump to content

Prices and GeoLocation


hanisnl

Recommended Posts

I'm using Prestashop 1.6.1.7 .

I'm having trouble with the prices and shipping options ... for some reason, the prices show up in a different currency then my local currency and this is a new problem that I never had before.

I would like to have the SAME prices and the SAME currency for all website visitors, regarding of their location / IP .

How do I do that ?

Link to comment
Share on other sites

I think all prices including shipping fee and product prices are based on the current selection of currency of the customer.

It will be confusing if you display product price in one currency but shipping fee price in different currency.

 

I the GeoLocation may automatically set user's currency, but all prices should be in same currency. 

Link to comment
Share on other sites

Well, i didn't make any changes .. I don't know what changed .

But the prices are NOT shown based on my location, I get a different prices and different currency .

I've looked in the backend dashboard of the website ... but it seems I can not locate an option that will let me do this .

The main problem is that the products are in EURO in the backend and prestashop should convert the currency to my local currency, as it did before, or I would have just deleted every other currency except my local currency .

The question remains : how do I set only one currency and the same prices for everybody ? I don't care if the user's IP is from another country or not .

Also I don't care about the shipping address since the shop only delivers to local customers .

Edited by hanisnl (see edit history)
Link to comment
Share on other sites

I think I found the problem !

In the FrontEndController I get this error from the error_log :
 

[25-Sep-2016] PHP Warning: preg_match(): Unknown modifier '3' in /home/website/classes/controller/FrontController.php on line 1247

 

Looking the php file at the 1247 line, this is located, and related to the IP and this must be the problem .. but I don't know how to fix it ...

 

                if (!empty($ip) && preg_match('/^'.$ip.'.*/', $user_ip)) {
                    $allowed = true;
                }
 
this error was solved by removing some IPV6 ip's from the permission list in the backend area . the other problems still persist .
Edited by hanisnl (see edit history)
Link to comment
Share on other sites

and I also have this error
 

[25-Sep-2016] PHP Fatal error:  Uncaught  --> Smarty: unable to write file /home/cache/smarty/cache/af/d2/e2/wrt57e7cbfc196335_32434904 <-- 
  thrown in /home/tools/smarty/sysplugins/smarty_internal_write_file.php on line 46
 
this error was Solved my making the cache folder 775 . other problems persist .
Edited by hanisnl (see edit history)
Link to comment
Share on other sites

If you only install one currency, then it should be displayed on only one currency.

 

Check following menu and try to delete other currencies that you do not want to use. keep only one currency that you want to use.

 

Back office - Localization - Currencies tab 

I can NOT set only one currency . the owner of the website imports products in EURO and needs to convert them to local currency .

 

The only thing I don't understand is why is this suddenly a problem ... it worked without problems for over a year ... I must say I did update to the latest prestashop version 1.6.1.7 ...

Link to comment
Share on other sites

not sure what changes in PrestaShop 1.6.1.7 that affected your problem.

If you are not using GeoLocation function you may consider to disable it.

 

If you cannot delete the unused currency, you can also try to disable it?

 

The smarty error some happens because of concurrent file  access, but if it happens all the time, then it must be some problem with your file/folder access permission.

Link to comment
Share on other sites

not sure what changes in PrestaShop 1.6.1.7 that affected your problem.

If you are not using GeoLocation function you may consider to disable it.

 

If you cannot delete the unused currency, you can also try to disable it?

 

The smarty error some happens because of concurrent file  access, but if it happens all the time, then it must be some problem with your file/folder access permission.

 

I can not disable the EURO currency since the products are imported in EURO and is needed for currency conversion .

Also, the main currency can NOT be disabled and I can not change the main currency since the products are in that currency .

 

Further inspection on that matter shows that Geolocation DOES NOT work .. and I have no errors .

I know it does not work since I now also get a message on the Front Page that says I can not order products from my country : Europe .... and since when is Europe a country ? ...  

Link to comment
Share on other sites

Another clue that the Geolocation is not working as it should is this : after I add products to cart, I have no payment options . Payment options are available only for my country so this tells me it's clearly a Geolocation issue and the website thinks I'm in some other country .

Link to comment
Share on other sites

Thanks for the suggestion .. but I already did that ... downloaded a new Geo database ... disabled / enabled geo IP location .

It seems this is somehow related to my IP address  ... I used a phone with another IP and I seem to get the prices in my currency and all works fine .. I'm totally disoriented at this point ...

Link to comment
Share on other sites

for native prestashop geo location (non-logged) and logged (address is taken from default address)  a bit different in that currency is not 'changed' to match their address country, just any price by country product specific price.

 

price by country 

bo-->catalog-->products-->edit product-->prices-->specific prices, i.e. a price set 'by country'

 

for currency 

bo-->locallzation-->countries-->edit a country-->here you can set/check default country currency.

 

Note: when using native Geo Location, it is important to remember if IP 'does not resolve', this most often leads to PS disallowing 1) view of shop or 2) they can see shop but are not allowed to 'add to cart', or otherwise shop.

 

See: Geo Targeting Pro Module that addresses caveats in native feature.

 

Hope this helps, el.

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...