Jump to content

Hide Default Currency?


Xarf

Recommended Posts

Hi,

 

I want to hide the default currency and show only a different currency.

 

The problem I am facing here is sell price on my shop has to be in Euros but the base price I have is in a different currency.

 

The only current option (if I am not missing something) is to have both currencies shown, but I don't want to show the base currency as it does not make any sense to have an Asian currency on a european Shop.

 

That meansmy only option is to use Euro as a base price and manually change prices everytime there is a currency change. :wacko:

 

When it would be very easy if I have my product catalogue stored in a base currency and simply change the currency rate whenever needed.

 

 

Thanks in advance

 

 

 

I have not found anything related on the forums but this... http://www.prestashop.com/forums/topic/206667-multistore-different-invoice-templates-currency-restrictions/  And if I did not understand correctly, it is not quite the same.

 

 

Link to comment
Share on other sites

this is very simple to accomplish (depending on the number of countries you do business in).

 

back office-->preferences-->geo localizition

 

enable it (follow the built in instructions)

 

back office-->localization-->countries

 

edit each county you offer at registration, or all countries that you want to see the non-default currency

 

set those countries default currency...

 

note: you may (probably should) apply this fix

http://forge.prestashop.com/browse/PSCFV-10328

  • Like 1
Link to comment
Share on other sites

So simple!?   :blink: Great!   :P

 

Thank you so much! :wub:

 

I see I was not looking on the right direction... I could not find anything  :(

 

By the way I am using "PrestaShop™ 1.5.5.0" and did not have to apply any fix, or at least I haven't noticed the need of it.

 

how to test if you need fix.  back office-->localizatioin-->countries

 

edit your default country and set default currency to non-eu

 

clear your browser  cookies and cache

 

navigate to your front office (index.php), assuming you are in your shops default country (IP)

 

if the featured products and other prices are in that  countries defined are in the other currency you set as default for this country you may not need to apply the fix..

 

that being said, check that your release has the fix, if not back up your file and apply the fix...

Link to comment
Share on other sites

Sorry Patron,

 

I have done the testing in a hurry this morning and it really seemed to me everything was fine and working as I wanted to work:

 

- While Dollar is the shop's default

- EURO (Spain's default) was automatically selected when I open http://www.tailandiaunica.es , from Spain

- AND... Dollar was not even available to be selected

 

But now... I always get DOLAR selected and both currencies appear in the dropbox :(

 

And the "only" thing I have done is to change shop's default currency to THB and disable Dollar. Then I always got THB... I tried changing back to Dollar and Euro, but I still get Dollar.

 

I tested the geo location by removing Spain from the list of countries from which you can see the catalogue and it works correctly. I get a message stating I cannot access the catalogue. So the geo locator is working, but Spain's defaults seem not to be working at all.

 

I have also tried to apply the fix you mention, but the code on my classes/controller/FrontController.php is not the same as in https://github.com/PrestaShop/PrestaShop/commit/4e1d6de9b03e771758f804ba38145e10bbec9eea. And as I am not very "technical" I do not know what to modify (or if it has to be done)

 

Having said all this, my questions are two:

 

- If the suggested configuration works correctly, will I get ONLY "Country's default currency"? Or will I have the "Country's default currency" automatically selected and still be able to select the "Shop's default currency"?

 

- How can I make this thing work? I cannot see why it is not working :(

 

 

Thank you very very much in advanced

 

 

 

I attach screenshots on several configurations and copy a piece of the frontcontroler.php

 

 

// Init cookie language

// @TODO This method must be moved into switchLanguage
Tools::setCookieLanguage($this->context->cookie);
 
$currency = Tools::setCurrency($this->context->cookie);
 
 
$useSSL = ((isset($this->ssl) && $this->ssl && Configuration::get('PS_SSL_ENABLED')) || Tools::usingSecureMode()) ? true : false;
 
$link = new Link($protocol_link, $protocol_content);
$this->context->link = $link;
 
if ($id_cart = (int)$this->recoverCart())
$this->context->cookie->id_cart = (int)$id_cart;
 
if ($this->auth && !$this->context->customer->isLogged($this->guestAllowed))
Tools::redirect('index.php?controller=authentication'.($this->authRedirection ? '&back='.$this->authRedirection : ''));
 
/* Theme is missing */
if (!is_dir(_PS_THEME_DIR_))
die(sprintf(Tools::displayError('Current theme unavailable "%s". Please check your theme directory name and permissions.'), basename(rtrim(_PS_THEME_DIR_, '/\\'))));
 
if (Configuration::get('PS_GEOLOCATION_ENABLED'))
if (($newDefault = $this->geolocationManagement($this->context->country)) && Validate::isLoadedObject($newDefault))
$this->context->country = $newDefault;
 
if (isset($_GET['logout']) || ($this->context->customer->logged && Customer::isBanned($this->context->customer->id)))
{
$this->context->customer->logout();
 
Tools::redirect(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : null);
}
elseif (isset($_GET['mylogout']))
{
$this->context->customer->mylogout();
Tools::redirect(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : null);
}
 
 
geo.jpg

 

 

Default.jpg

 

Spain.jpg

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

  • 3 weeks later...

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