Forums / General Questions / second currency exchange server always returns a 0 value with dreamhost

second currency exchange server always returns a 0 value with dreamhost

Views: 1,140

Results 1 to 8 of 8
19 Dec 2011, 9:07 PM
#1
aprilmarie avatar

aprilmarie

New Zenner

Join Date:
Aug 2009
Posts:
24
Plugin Contributions:
0

second currency exchange server always returns a 0 value with dreamhost

I am using the current version of zencart, 1.3.9
I upgrade my site regularly as a new version is released
I don't have any addons
I have created my own template
I originally installed my site with dreamhost's one click install and i update it through the button that says i need to update it.
My zen-cart is at http://aprilmariemai.com
I have looked in the faq area and forum and didn't see anything about this.
The problem seems to have been going on for a while, I am not sure when it started. I will admit that I didn't realize at first that there was a problem.

You know how when you click "update currencies" it pulls from the currency conversion sites, mine does xe and oanda? well the problem is that if the first server it attempts to connect to does not respond then it does the second server but the result of anything where a second server is involved is 0.0000000000000 for that currency. Which is not correct. It doesn't matter which server it is. both of them return correct answers if they are the first one pulled from, but if they are the second the answer is 0.000000000. When a server doesn't respond to one and it pulls it from the next, then the ones after that are pulled from that second server, but they aren't 0. So the problem is just if the server doesn't respond to the ping and it has to get a second server on that specific currency.

So currently the problem is that I have to click "update currencies" over and over until it gets them all on the first shot, otherwise I will have some values that are 0.00000000.

I have been live for a long time. This is not a new store. I did not mess with anything having to do with currencies in the process of creating my own template.

I did move my shop a while back, from /shop to /. could that have done this? I followed all the directions to move it properly and have not had any problems.

Please help. Thanks!

19 Dec 2011, 9:55 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: second currency exchange server always returns a 0 value with dreamhost

The currency rate reader relies on your server being able to connect to the 3rd party web service directly. If that fails or is blocked in any way, no results will come back.

Your problem is not a result of changing what folder your store runs from. It's a communications problem between your hosting company's server and the rate service server. (It could be that the rate service servers are rejecting your inquiries for one reason or another.)

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

20 Dec 2011, 3:06 AM
#3
aprilmarie avatar

aprilmarie

New Zenner

Join Date:
Aug 2009
Posts:
24
Plugin Contributions:
0

Re: second currency exchange server always returns a 0 value with dreamhost

thank you so much, drbyte!
i have contacted my host and hopefully they will take care of it asap.

21 Dec 2011, 6:15 AM
#4
aprilmarie avatar

aprilmarie

New Zenner

Join Date:
Aug 2009
Posts:
24
Plugin Contributions:
0

Re: second currency exchange server always returns a 0 value with dreamhost

okay.

so, i have talked with my host's support team about this (dreamhost), and this was their reply:

Unfortunately this appears to be an issue resulting how the currency
updater was designed. You will need to manually edit the currencies that
return with the incorrect value:

http://www.zen-cart.com/wiki/index.php/Admin_-_Localization_-_Currencies

The currency updater connects to third-party servers to ensure that the
currencies are accurately updated. Sometimes those connections will fail
and you must then manually edit the value to ensure it is set correctly.
There are online sources available to you that will provide you
up-to-date information. A few of those sites are found here:

http://www.zen-cart.com/wiki/index.php/Admin_-_Localization_-_Currencies#Code

is this true? is this a generic issue with the way the currency converter was designed? it doesn't make sense to me that the second connection would always fail and i would always have to input that manually. there is almost always one or more that fails! i believe the secondary server setup should be successful.

thoughts?

21 Dec 2011, 6:32 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: second currency exchange server always returns a 0 value with dreamhost

There's lots of history behind it, stemming all the way back from oscommerce where the code originated.

The short version is this: The servers you're trying to get quotes from want you to pay for that service.
I'm guessing you're not here asking for a way to pay for the updates, right?
So, you have two options: leave it as-is and live with the occasional failure where you either re-update or manually enter the one or two missed updates, or upgrade to v1.5.0 which uses new rate quote services.

In what way is your business so volatile that it requires constant exchange-rate updates anyway? Are your customers insanely picky about a penny or two difference despite the market fluctuation? Most reputable businesses set a flat rate and only adjust it when the market rates change significantly. Minor fluctuations make little difference in the final sale process for the majority of shopowners, and customers are normally willing to accept that. On the retail end, very few industries are noticeably affected by the small changes that happen from day to day.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

21 Dec 2011, 6:37 AM
#6
aprilmarie avatar

aprilmarie

New Zenner

Join Date:
Aug 2009
Posts:
24
Plugin Contributions:
0

Re: second currency exchange server always returns a 0 value with dreamhost

i simply didn't realize that it was a service that they want me to pay for, or that this was a usual thing.

i apologize.

i thought it was a bug and then i thought it was my host and i didn't understand what it actually was until now.

i was not attempting to sound self-important, i was simply frustrated and trying to find an answer.

thank you for your clarification. i appreciate the time you took to reply.

21 Dec 2011, 7:03 AM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: second currency exchange server always returns a 0 value with dreamhost

No worries.

I need more coffee too. I totally forgot to mention that you could try this experimental addon. I tested it today and it seems to grab rates from the ECB server quite reliably.

Link:
http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=2039

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

22 Dec 2011, 2:25 AM
#8
aprilmarie avatar

aprilmarie

New Zenner

Join Date:
Aug 2009
Posts:
24
Plugin Contributions:
0

Re: second currency exchange server always returns a 0 value with dreamhost

thanks, i'll check it out!