Post by FabioSwiss » Fri Sep 17, 2010 4:19 am

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!

Newbie

Posts

Joined
Fri Sep 17, 2010 4:06 am

Post by Qphoria » Fri Sep 17, 2010 4:39 am

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

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by FabioSwiss » Fri Sep 17, 2010 5:46 am

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

Newbie

Posts

Joined
Fri Sep 17, 2010 4:06 am

Post by FabioSwiss » Mon Sep 20, 2010 3:28 am

No answers?! :D please...

Newbie

Posts

Joined
Fri Sep 17, 2010 4:06 am

Post by billyggla » Mon Sep 20, 2010 7:46 am

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

Active Member

Posts

Joined
Mon Sep 20, 2010 7:05 am

Post by FabioSwiss » Mon Sep 20, 2010 5:25 pm

Thanks. I'll try and let you know.

Newbie

Posts

Joined
Fri Sep 17, 2010 4:06 am

Post by billyggla » Mon Sep 20, 2010 11:37 pm

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

Active Member

Posts

Joined
Mon Sep 20, 2010 7:05 am

Post by Qphoria » Tue Sep 21, 2010 1:25 am

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.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by billyggla » Tue Sep 21, 2010 1:34 am

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.

Active Member

Posts

Joined
Mon Sep 20, 2010 7:05 am

Post by FabioSwiss » Tue Sep 21, 2010 3:49 am

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:

Newbie

Posts

Joined
Fri Sep 17, 2010 4:06 am

Post by udanasr » Wed Jan 21, 2015 11:47 am

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.

Newbie

Posts

Joined
Wed Jan 21, 2015 11:44 am

Post by Gollumnz » Wed Jan 27, 2016 5:38 pm

And did you find a solution for Opencart 2. To retain the local currency at checkout?

Newbie

Posts

Joined
Wed Jan 27, 2016 3:55 pm

Post by Qphoria » Fri Jan 29, 2016 2:15 pm

My link still applies to 2.x

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am
Who is online

Users browsing this forum: No registered users and 62 guests