Different default currency in front office and differernt in back office

Hello ! I have a question ! You have some module or trick for my probleme ! In the back office currency is EUR ( because i have a syncronization with BigBuy for the products ) and on the front office show the prices in RON and EUR , and i want to show only RON , but i cant change the backoffice currency...what is this issue resolvation ? i use 1.7




PrestaShop expert answer
Hello,
If you will just disable EUR currency (not remove, just disable) the bigbuy integration does not work ? That's correct?
In your case the best will be a some module that changes the default currency for front office and that does not allow to switch the currency. Unfortunately i do not have any module like this.

But there are some possibilities to make it work as you wish without module.
  • Firstly - it will be required to disable module that is responsible for currencies switcher, go to shop's back office modules section and disable/uninstall "currency block" addon. Customers will not have possibility to switch the currencies.
  • Then it will be required to add a little piece of code to "front controller":
    /classes/controllers/front/FrontController.php

    There is a line:
    $currency = Tools::setCurrency($this->context->cookie);

    replace it with:
    $currency = Currency::getCurrencyInstance(2);
    if (is_object($currency) && $currency->id && !$currency->deleted && $currency->isAssociatedToShop()) {
    $cookie->id_currency = (int)$currency->id;
    }

    Please focus on line: $currency = Currency::getCurrencyInstance(2)
    2 - is an ID of currency, front office will be forced to use it. Replce 2 with ID of RON currency in your shop
after these two steps your front office will always use one currency, and all front office pages will be forced to use this currency.
Share on Google Plus

About VEKIA

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment

1 comments:

  1. Cześć
    A czy jest możliwość wyświetlania cen w BO w innej walucie niż domyślna waluta sklepu?
    Dla przykładu ceny na front office są w INR, ceny w backoffice są w INR ale waluta domyślna sklepu jest w USD.
    Wyjaśnienie, PayPal nie przyjmuje płatności w INR, jedyną znaną mi opcją przyjmowania płatności przez PayPal jest ustawienie waluty domyślnej sklepu na np. USD wówczas klient widzi ceny w INR ale płaci w USD.

    Czy jest jakaś opcja rozwiązania tego problemu?
    Dzięki :)

    ReplyDelete