tskalar Posted October 10, 2014 Share Posted October 10, 2014 Witam, Czy jest możliwość ustawienia domyślnej waluty do kraju? Dla polski PLN dla DE Euro. Bez konieczności wybierania waluty przez klienta. Link to comment Share on other sites More sharing options...
tskalar Posted October 10, 2014 Author Share Posted October 10, 2014 Nieprzetestowane ale powinno działać. Tylko dla 2 języków Tools.php public static function setCurrency($cookie, $id_lang = null, Context $context = null) { if (Tools::isSubmit('SubmitCurrency')) if (isset($_POST['id_currency']) && is_numeric($_POST['id_currency'])) { $currency = Currency::getCurrencyInstance($_POST['id_currency']); if (is_object($currency) && $currency->id && !$currency->deleted && $currency->isAssociatedToShop()) $cookie->id_currency = (int)$currency->id; } if (!$context) $context = Context::getContext(); if (!$id_lang) $id_lang = $context->language->id; $currency = null; /*(int)$cookie->id_currency*/ if($id_lang == 1 && (int)$cookie->id_currency) $currency = Currency::getCurrencyInstance(1); if ($id_lang == 2 && (int)$cookie->id_currency) $currency = Currency::getCurrencyInstance(2); if (!Validate::isLoadedObject($currency) || (bool)$currency->deleted || !(bool)$currency->active) $currency = Currency::getCurrencyInstance(Configuration::get('PS_CURRENCY_DEFAULT')); $cookie->id_currency = (int)$currency->id; if ($currency->isAssociatedToShop()) return $currency; else { // get currency from context $currency = Shop::getEntityIds('currency', Context::getContext()->shop->id, true, true); if (isset($currency[0]) && $currency[0]['id_currency']) { $cookie->id_currency = $currency[0]['id_currency']; return Currency::getCurrencyInstance((int)$cookie->id_currency); } } return $currency; } Link to comment Share on other sites More sharing options...
tskalar Posted October 10, 2014 Author Share Posted October 10, 2014 ...można dodać w css #currencies-block-top{display:none!important;} nie ma potrzeby aby się wyświetlał. Link to comment Share on other sites More sharing options...
hatak Posted October 11, 2014 Share Posted October 11, 2014 .... i wyobraz sobie polke zarabiajaca w funtach....albo zmieni jezyk albo nie zaplaci 1 Link to comment Share on other sites More sharing options...
tskalar Posted October 12, 2014 Author Share Posted October 12, 2014 Zapewniam Cię, Polka zarabiająca w Funtach jest bardziej angielska niż polska.... Link to comment Share on other sites More sharing options...
tskalar Posted October 12, 2014 Author Share Posted October 12, 2014 ...ale już rozumiem dlaczego brak gotowych rozwiązań na tym forum.... Link to comment Share on other sites More sharing options...
endriu107 Posted October 12, 2014 Share Posted October 12, 2014 To może powiedz dlaczego na forum "brak gotowych rozwiązań". Link to comment Share on other sites More sharing options...
ArturK Posted May 2, 2016 Share Posted May 2, 2016 Witam, Ja trochę z innym problemem, wystawiam produkty w złotówkach ale ich cena uzależniona jest od kursu euro w danym dniu. Czy jest jakiś moduł lub inna kombinacja "zasysająca" z zewnątrz aktualny kurs waluty (w tym przypadku euro) i przeliczająca na złotówki? Z góry dziękuję za pomoc. Link to comment Share on other sites More sharing options...
endriu107 Posted May 2, 2016 Share Posted May 2, 2016 Wejdź do zakładki lokalizacja > Waluty tam masz narzędzie do tego. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now