Page 1 of 1

Default Currency Checkout

Posted: Fri Sep 17, 2010 4:19 am
by FabioSwiss
Hi,
I live in Switzerland. I'd like to sell to customers in Europe. My shop has Swiss Francs as Default Currency. Is there a way to add other currencies (like EUR, GBP, ..) BUT JUST INDICATIVE? Because I want the currency for payments in Checkout to be only and always Swiss Francs, but customers should have an idea of prices in their currency.
I'm not very good in English, I hope I was clear of what I mean. :choke:
I use v. 1.3.2.
Thanks!

Re: Default Currency Checkout

Posted: Fri Sep 17, 2010 4:39 am
by Qphoria
So you want people to be able to shop in their own currency, but have the payment switch to francs?
It depends on which payment gateway you use. Some of them support currency switching. Others that don't can be easily edited to convert the currency

Re: Default Currency Checkout

Posted: Fri Sep 17, 2010 5:46 am
by FabioSwiss
Well, I just need the checkout page to show always the swiss currency, even if the customers had select Eur or GBP from the currency menu (to see the products' prices in their own currency).Customers must always pay in Swiss Francs, because for payments I use bank transfer to a Swiss Francs account and PayPal payment to a PayPal Swiss Francs Account too.

thanks

Re: Default Currency Checkout

Posted: Mon Sep 20, 2010 3:28 am
by FabioSwiss
No answers?! :D please...

Re: Default Currency Checkout

Posted: Mon Sep 20, 2010 7:46 am
by billyggla
You could try switching the currency in /catalog/controller/payment/

like in paypal standard try changing this

Code: Select all

// Check for supported currency, otherwise convert to USD.
        $currencies = array('AUD','CAD','EUR','GBP','JPY','USD','NZD','CHF','HKD','SGD','SEK','DKK','PLN','NOK','HUF','CZK','ILS','MXN','MYR','BRL','PHP','PLN','TWD','THB');
        if (in_array($this->order_info['currency'], $currencies)) {
            $currency = $this->order_info['currency'];
        } else {
            $currency = 'USD';
        } 
to this

Code: Select all

// Check for supported currency, otherwise convert to USD.
        $currencies = array('CHF');
        if (in_array($this->order_info['currency'], $currencies)) {
            $currency = $this->order_info['currency'];
        } else {
            $currency = 'CHF';
        } 
remember to backup first...

Re: Default Currency Checkout

Posted: Mon Sep 20, 2010 5:25 pm
by FabioSwiss
Thanks. I'll try and let you know.

Re: Default Currency Checkout

Posted: Mon Sep 20, 2010 11:37 pm
by billyggla
Sorry.. that code will just force the default currency to paypal it wont display it.

in /catalog/model/total

total.php

find

Code: Select all

'text'       => $this->currency->format(max(0,$total)),
 
and replace with

Code: Select all

'text'       => 'CHF ' . max(0,$total), 
This should force the default currency to show in the cart only at the total line, You will need to do this for the rest of the files in the total folder if you want them to show the default currency (sub total, tax, shipping, etc etc).

Any problems, let me know..

Re: Default Currency Checkout

Posted: Tue Sep 21, 2010 1:25 am
by Qphoria
that won't work even a little bit, and that is only for display purposes.

Just follow this as it has been done a while back:
http://forum.opencart.com/viewtopic.php ... ncy#p39245

This will always covert the currency to your currency on the confirmation page.

Re: Default Currency Checkout

Posted: Tue Sep 21, 2010 1:34 am
by billyggla
Qphoria wrote:that won't work even a little bit, and that is only for display purposes.

Just follow this as it has been done a while back:
http://forum.opencart.com/viewtopic.php ... ncy#p39245

This will always covert the currency to your currency on the confirmation page.

It does work..try it..
and as he said it is only for display purposes in the cart.

Re: Default Currency Checkout

Posted: Tue Sep 21, 2010 3:49 am
by FabioSwiss
Thank you to both of you!

I used Qphoria solution, and it worked. I'm sure billy's one would have worked either.
Thank you very much! :joker:

Re: Default Currency Checkout

Posted: Wed Jan 21, 2015 11:47 am
by udanasr
I have a similar issue but I'm using opencart 2

I have installed opencart on an arvixe hosting platform. I want to use skrill as the payment gateway and my local currency Sri Lankan Rupee (LKR) is not supported by the payment gateway. So when someone prompt for payment it shows an error message saying invalid currency. How can I avoid this and convert the currency to dollars automatically at the payment gateway. Thanks.

Re: Default Currency Checkout

Posted: Wed Jan 27, 2016 5:38 pm
by Gollumnz
And did you find a solution for Opencart 2. To retain the local currency at checkout?

Re: Default Currency Checkout

Posted: Fri Jan 29, 2016 2:15 pm
by Qphoria
My link still applies to 2.x