Post by Qphoria » Fri Dec 10, 2010 3:32 am

If you want to offer multiple currencies on your store, but your sagepay account requires you to only use one currency for checkout, you can force the currency this way. (This can be used for most payment modules)

If using OpenCart 1.4.x

1. EDIT: catalog/controller/payment/<somepayment>.php file

2. FIND:

Code: Select all

$order_info['currency'];
3. REPLACE WITH (Include the quotes!):

Code: Select all

"GBP"
4. FIND:

Code: Select all

$order_info['value'];
5. REPLACE WITH:

Code: Select all

false

If using OpenCart 1.5.x

1. EDIT: catalog/controller/payment/<somepayment>.php file

2. FIND:

Code: Select all

$order_info['currency_code']; 
3. REPLACE WITH (Include the quotes!):

Code: Select all

"GBP"
4. FIND

Code: Select all

$order_info['currency_value'] 
5. REPLACE WITH:

Code: Select all

false

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Melanie » Fri Dec 10, 2010 10:24 am

Thank you so much!
Wored a treat.

:)

New member

Posts

Joined
Tue Mar 30, 2010 9:39 am

Post by mattys » Thu Nov 14, 2013 2:59 am

i tried this, edited the worldpay.php page:

On line 18 i have this code:

Code: Select all

$this->data['amount'] = $this->currency->format($order_info['total'], $order_info['currency_code'], $order_info['currency_value'], false);
so, as per instructions i replaced

Code: Select all

$order_info['currency_value']
with

Code: Select all

false
so now looks like:

Code: Select all

$this->data['amount'] = $this->currency->format($order_info['total'], $order_info['currency_code'], false, false);
but i still get the same thing, reach worldpay and the only thing that changes is the currency sign, so, if i purchase something for 100 euros (sorry, i dont have euro sign on laptop), on worldpay it just displays as £150

New member

Posts

Joined
Thu Apr 26, 2012 4:51 pm

Post by Qphoria » Sat Nov 16, 2013 1:46 am

mattys wrote: so now looks like:

Code: Select all

$this->data['amount'] = $this->currency->format($order_info['total'], $order_info['currency_code'], false, false);
but i still get the same thing, reach worldpay and the only thing that changes is the currency sign, so, if i purchase something for 100 euros (sorry, i dont have euro sign on laptop), on worldpay it just displays as £150
You didn't follow the steps. I said replace $order_info['currency_code'] with "GBP"

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by mattys » Sun Nov 17, 2013 5:51 pm

oh, sorry, missed that, seems to work fine, thank you, i really appreciate that

New member

Posts

Joined
Thu Apr 26, 2012 4:51 pm

Post by mattys » Tue Dec 03, 2013 12:15 am

Hi Qphoria

experiencing some problems

if you checkout with euros selected, when you get to worldpay, it is converted to £ on display.

however, the order confirmation email sent to admin is in euros, it hasnt been converted, also, the order in admin is in euros, also, the confirm email from worldpay is in euros

looks like a file somewhere needs to be editted...

any ideas?

matt

New member

Posts

Joined
Thu Apr 26, 2012 4:51 pm

Post by mattys » Tue Jan 07, 2014 11:16 pm

I still get the same problem above...

This is what I do - change currency via currency links in header once i find a product to see what it costs in euros

all the way through checkout process on website it shows euros

when i click to confirm order and go to wordlpay it now correctly shows £s, all the way through checkout process on worldpay shows £s, this is correct

confirmation email from worldpay to me as customer shows £s, great

however, the order confirmation email from the shop sent to me as a customer is in euros, not correct, this needs to be in £s

and the order itself and invoice is in euros, this needs to be in £s for accounting purposes

can anyone see what file i might need to update to sort this so the order, invoice, confirm emails from admin show £s?

New member

Posts

Joined
Thu Apr 26, 2012 4:51 pm
Who is online

Users browsing this forum: No registered users and 5 guests