Post by deanfourie » Wed Oct 15, 2014 9:37 am

Hey guys, I have a question regarding currencies.

I have all my prices displayed in NZ$, all or most of my conversions are based on the USD, the problem I have is keeping my NZ prices current with the USD based on the current exchange rate.

Right now I have entered all prices manually for all my products and just dont a manual conversion based on the USD and exchange rate at that time. I have just had an order come in and with the USD so weak at the moment, I ended up just breaking even on my order.

So, is there a way to update all prices LIVE in NZ based on the USD and current exchange rate.

Thanks in advance!

New member

Posts

Joined
Sat Mar 22, 2014 9:01 pm

Post by deanfourie » Thu Oct 16, 2014 9:04 am

Bump

New member

Posts

Joined
Sat Mar 22, 2014 9:01 pm

Post by rph » Thu Oct 16, 2014 1:24 pm

I don't quite understand what your question is. If you want to automatically update the exchange rates it's located in your store settings under the Local tab.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by deanfourie » Thu Oct 16, 2014 9:13 pm

Right now, when I add a product I enter the product price manually in the data tab. All currencies on the website are displayed in NZ$

However, when I place orders and bring gear in, all orders I place are in USD, So im basing my price and markup on the US price im paying at THAT specific time based on that specific exchange rate at that time.

When the US exchange rate changes, my prices on the website remain at the same NZ price I set, thus when I place the order in USD works out to be much more expensive as the exchange rate is very low, in turn I have just sold a product which is 120.00$NZ but when I place the order in USD, after converting it it works to to be 120.00USD anyway.

So, to wrap it up. I want the prices that are displayed on the website in NZD$ to automatically update AND convert from the USD currency based on the CURRENT exchange rate. So all prices are displayed in NZ$, but change all the time based on the USD conversion and exchange rate.

Its quite urgent as any orders that currently come in im basicly breaking even on or loosing money on as I cannot go through all 200+ products and do a new conversion based on the current exchange rate. Hope this makes sense.

Cheers

New member

Posts

Joined
Sat Mar 22, 2014 9:01 pm

Post by rph » Thu Oct 16, 2014 11:48 pm

Can users pay in USD or only NZD?

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by SXGuy » Fri Oct 17, 2014 12:14 am

What you require I guess would be easier to understand if it was explained as being a mark up based on exchange rate modification.

So you set a % markup somewhere, and based on the exchange rate of USD, the NZ$ price increases or decreases (if it drops) by the % markup.

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by deanfourie » Fri Oct 17, 2014 7:39 am

Yea that would be perfect. Any recommended plugins?

Thanks

New member

Posts

Joined
Sat Mar 22, 2014 9:01 pm

Post by SXGuy » Fri Oct 17, 2014 7:42 pm

none that I know of, but this may sorta help

http://forum.opencart.com/viewtopic.php?f=20&t=27110

this adds a margin to the currency (2%), so the exchange rate between USD and NZ$ would be x amount + 2% I should imagine.

Would you be able to use something like that and change the margin %? I don't know.

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by clorne » Sat Oct 18, 2014 3:06 pm

This is just a quick and untested idea for you.

Go to the currency update file

admin/model/localisation/currency.php

find the following code block in the updateCurrencies function

Code: Select all

foreach ($lines as $line) {
				$currency = utf8_substr($line, 4, 3);
				$value = utf8_substr($line, 11, 6);
immediately under this insert

Code: Select all

If ($currency == 'USD') {
                                    $original_exchange_rate = ' ## put your current NZD-USD exchange rate here ## ';
                                    $new_exchange_rate = $value;
                                    $per_cent = ($new_exchange_rate-$original_exchange_rate)/$original_exchange_rate;
                                    
                                $this->db->query("UPDATE " . DB_PREFIX . "product SET price = ROUND (price * '" . (float)$per_cent . "', 2) + price") ; 
                                }
As you can see, each time the rates are automatically updated a comparison is made between the new and original exchange rate for NZD/USD and your product prices set accordingly.

Try this on your test/development site not production site as the code hasn't been tried but it should work.

Active Member

Posts

Joined
Fri Dec 23, 2011 6:03 pm
Who is online

Users browsing this forum: No registered users and 61 guests