If this is your first visit, check our documentation. To post, register or login.
Forums / All Other Contributions/Addons / userCurrency - updated for 1.3.5

userCurrency - updated for 1.3.5

Started by s_mack on 11 Sep 2006, 6:59 AM · Views: 27,024

Results 101 to 120 of 148
17 Sep 2009, 8:31 PM
#101
foteek avatar

foteek

New Zenner

Join Date:
May 2008
Posts:
50
Plugin Contributions:
0

userCurrency - updated for 1.3.5

I noticed in includes\init_includes\init_currencies.php that one of the first lines is:

// If no currency is set, use appropriate default
if (!isset($_SESSION['currency']) && !isset($_GET['currency']) ) $_SESSION['currency'] = DEFAULT_CURRENCY;

So, wouldn't that set a default currency, thus not allowing the userCurrency module to set it based on IP since it only does this if no currency is set?

Or does userCurrency somehow get run first? If so, how does that work? Ultimately I'm trying to figure out who is setting the currency before the module runs...

Thanks,
TJ

17 Sep 2009, 8:34 PM
#102
s_mack avatar

s_mack

Totally Zenned

Join Date:
Jun 2005
Location:
Kelowna, BC Canada
Posts:
1,033
Plugin Contributions:
4

Re: userCurrency - updated for 1.3.5

For example, I just went to your site and I can't tell if its showing me Canadian dollars, US dollars, Australian dollars, Belize Dollars, etc etc. All I see is "$129.00" with no context. As a Canadian, I'd probably make the presumption that its in USD but it would be best to know for sure.

Anyway, by taking away the whole login thing and not allowing customers to choose a currency (or even see what currency their shopping in), you probably rendered the userCurrency mod useless. You won't be able to use it as a mod. Since the main purpose of userCurrency is storing a logged-in user's currency choice, and that doesn't apply to you, I wouldn't even try using my mod. You'll have to roll your own. The good news is, the part you're wanting from my mod (guest currency pre-selection based on IP) is the simple part.

Look at the code or have your "guy" do it and just use the IP based sections. Or throw me some of that thousands of dollars my mod's been making you and I'll do it for you ;)

Cheers and good luck.

  • steven
17 Sep 2009, 8:37 PM
#103
s_mack avatar

s_mack

Totally Zenned

Join Date:
Jun 2005
Location:
Kelowna, BC Canada
Posts:
1,033
Plugin Contributions:
4

Re: userCurrency - updated for 1.3.5

The stuff in "init" is run first (well, sort of) but it can be overridden. That's a huge feature of recent ZenCart versions. That line is saying that if there isn't a currency defined in the session AND the user hasn't just chosen a currency (impossible with your setup) then use the default. My mod sets the session currency based on their IP if they're a guest. I wonder if whoever did your work didn't have any concept of the ZenCart init system and munched things.

21 Oct 2009, 10:58 AM
#104
lkeme avatar

lkeme

New Zenner

Join Date:
Oct 2009
Posts:
1
Plugin Contributions:
0

Re: userCurrency - updated for 1.3.5

Hi Steven

Just a quick question. Does the latest version of UserCurrency work on ZC 1.3.8? I'm trying to set our new site to display the users currency based on location then "force" the DEFAULT CURRENCY at checkout (as in this example: http://www.zen-cart.com/forum/showthread.php?t=138788&highlight=total+default+currency) - our gateway provider is with Westpac in New Zealand and they only accept NZD yet over 99% of our clients are international (vast majority from Australia - hence our typical 'displayed' pricing is in AUD) and want to know what their 'local' currency value would be. Our customers are long established and familiar wih our typical conversion to NZD for their transactions with our old site. Is there an easy workaround for this?

The only 'easy solution' I can formulate is this:

1.By using NZD as the default – I set AUD to 1.00 in LOCALIZATIONS/CURRENCIES, set AUD as PRIMARY CURRENCY, click UPDATE CURRENCIES, then change DEFAULT CURRENCY back to NZD. This will maintain AUD at 1.00 and keep our normal AUD pricing correct

  1. I found this fix on the ZenCart Forums to “force” the default currency (NZD in our case Westpac will only accept transactions in this currency) at the checkout:
    http://www.zen-cart.com/forum/showthread.php?t=138788&highlight=total+default+currency

  2. By using the simple USER CURRENCY mod to localize the displayed currency for the customer based on their IP address - but will it work with ZC 1.3.8?????

Any thoughts or suggestions would be greatly appreciated.

Regards

Michael L
LKemE

21 Oct 2009, 5:55 PM
#105
s_mack avatar

s_mack

Totally Zenned

Join Date:
Jun 2005
Location:
Kelowna, BC Canada
Posts:
1,033
Plugin Contributions:
4

Re: userCurrency - updated for 1.3.5

I haven't updated it since... well, whenever the last time I updated it was. However I don't think anything changed since to make it not work. Give it a try.

8 Jan 2010, 1:38 AM
#106
muteyaar avatar

muteyaar

Zen Follower

Join Date:
Oct 2007
Posts:
134
Plugin Contributions:
0

Re: userCurrency - updated for 1.3.5

Hi,

I have tried this MOD on zen cart version 1.3.7.1 on my website https://www.muteyaar.com and it seems to be working fine when a registered member is logged in.

But if an unregistered guest opens the website, it does not show the local currency of that country.
The currency shown is the default currency (USD) only.

Can you please tell me how can this be done, that the currency shown should be in INR for Indian guests and EURO for European guests and USD for USA guests and CAD for Canadian guests and AUD for Australian guests and so on......

I will be highly thank ful to you for the early reply.

best regards,

muteyaar

8 Jan 2010, 1:49 AM
#107
s_mack avatar

s_mack

Totally Zenned

Join Date:
Jun 2005
Location:
Kelowna, BC Canada
Posts:
1,033
Plugin Contributions:
4

Re: userCurrency - updated for 1.3.5

I can confirm that its not working correctly on your site - I am in Canada and it shows Canadian.

My only advice is to go back and read the readme file carefully. You probably don't have the IP2Nation database installed correctly.

Sometimes the problem is the server isn't reporting the visitor's IP address correctly, but that isn't the case with your site because my IP shows up correctly at the footer.

8 Jan 2010, 2:06 AM
#108
muteyaar avatar

muteyaar

Zen Follower

Join Date:
Oct 2007
Posts:
134
Plugin Contributions:
0

Re: userCurrency - updated for 1.3.5

Thanks for the quickest reply.

I have installed all the sql patches by uploading from my ADMIN > tools section and copied all the files through FTP as suggested by you.

I have tried with various registered member names from different countries and all are working fine. but the only problem is that when an unregistered member opens the website, it should show INR for indian customers, but it shows the default USD only.

Kindly tell me how to go about this.
How can I install the ip2nation database correctly again?

i just uploaded the file ip2nation.sql provided by you
regards,

muteyaar

8 Jan 2010, 7:51 AM
#109
s_mack avatar

s_mack

Totally Zenned

Join Date:
Jun 2005
Location:
Kelowna, BC Canada
Posts:
1,033
Plugin Contributions:
4

Re: userCurrency - updated for 1.3.5

Its a big file, so perhaps it didn't completely load?

6 Mar 2011, 12:15 AM
#110
iddy avatar

iddy

Zen Follower

Join Date:
Jan 2009
Posts:
119
Plugin Contributions:
0

Re: userCurrency - updated for 1.3.5

i am based in Ireland (Euro) but purchase my stock in the UK (GBP)

As my customers can purchase from sites in the UK, I need to set my default currency to GBP to ensure accurate pricing in Euro.

I'm a newbie to sql php etc so i know this is a big ask but what would need to be changed to get UK ip's to display in GBP (default currency in zen cart) and everything else (including guest) to display in Euro

Thanks in advance
Iddy

6 Mar 2011, 2:16 AM
#111
s_mack avatar

s_mack

Totally Zenned

Join Date:
Jun 2005
Location:
Kelowna, BC Canada
Posts:
1,033
Plugin Contributions:
4

Re: userCurrency - updated for 1.3.5

That's sort of exactly what this contribution is for. It recognizes the location based on IP (caution: it IS NOT and CAN NOT BE 100% accurate) and shows them the currency based on that local. However, it shows the "default" currency (for you, GBP) to anyone that either it doesn't recognize (rare) or who are in a zone you don't have a currency defined for. So if you only have EUR and GBP and someone from the USA visits, they will see GBP (default).

I understand why you want UK people to see GBP, but why is it important that, for example, US people to see EUR and not GBP? If that is important, then yes... changes are necessary (and no, I can't help - too busy). If not, then just use the contrib as-is.

  • Steven
6 Mar 2011, 9:15 AM
#112
iddy avatar

iddy

Zen Follower

Join Date:
Jan 2009
Posts:
119
Plugin Contributions:
0

Re: userCurrency - updated for 1.3.5

good point :smile:

I have to subsidize shipping in Ireland so what I'm really trying to avoid is having someone in Ireland select GBP. Their credit card company would convert to Euro so it would be pretty much the same thing to them. Unfortunately I would also eventually be hit with currency fees to convert to Euro and i cant take a hit twice in one transaction - I can cover either the currency exchange or the difference in the shipping costs but not both.

I only plan to ship to Ireland and the UK so to be honest I don't need any of the other ips to be recognised - just ireland and uk

Considering my lack of knowledge in coding I wont be able to do much myself but can you see any potential problems with the following...

I only need to recognize ireland and uk ips so can i just delete everything else out of the ip2nation.sql?

I not giving the customer the option of changing currency so i can just put a notice that Irish customers will have to register/log in to see prices in Euro.

6 Mar 2011, 9:34 AM
#113
s_mack avatar

s_mack

Totally Zenned

Join Date:
Jun 2005
Location:
Kelowna, BC Canada
Posts:
1,033
Plugin Contributions:
4

Re: userCurrency - updated for 1.3.5

I've got to get to bed (2:00am here) but I'll give some insight before I nod off...

What you're wanting to do is tough. Tons of people constantly ask how they can (essentially) limit what some customers see vs others and its not an easy thing to do, mostly because you really can't rely on it. First off, IP geolocation is not at all exact even when the customer isn't trying to fool you. But all they have to do is use a proxy and they can be wherever they want to be. So that's one issue you're really never going to be able to get around. Also sometimes you might have an Irish customer that's in London for business and wants to shop on your site one night, but because he's currently in London he can't shop in Euros? It doesn't really make sense.

I personally think its best to just show your customers whatever currencies you offer and let them choose. The Irish use the Euro (right?) and the Brits use the Pound, so why not just offer the two currencies and let the customer choose the currency they want? 99% of the time, won't they choose their native currency anyway? So I don't really see the dilemma necessarily. But of course I don't know your business. From what you described, I don't really think you have a currency problem so I'd focus on the shipping one. Charging shipping based on location is WAY simpler than forcing a currency on them, because the currency is something they choose while they're shopping and the shipping is done only at checkout.

I'm tired. I'm probably not making much sense :) I hope I helped, and if not... post again and I'll take another look in the morning (that's "marnin" in Irish)

  • Steven
6 Mar 2011, 9:37 AM
#114
s_mack avatar

s_mack

Totally Zenned

Join Date:
Jun 2005
Location:
Kelowna, BC Canada
Posts:
1,033
Plugin Contributions:
4

Re: userCurrency - updated for 1.3.5

iddy:

Their credit card company would convert to Euro so it would be pretty much the same thing to them.

Unless credit companies in Ireland are extraordinarily generous, that's not true. I would figure its the same worldwide, but here (North America) Visa, M/C, Amex... all of them... charge (on average) 2.5% premiums to the customer to do any currency conversion. Yes, you might get hit with a fee too but that's not the point... the customer is likely to avoid conversion if they can.

6 Mar 2011, 2:56 PM
#115
iddy avatar

iddy

Zen Follower

Join Date:
Jan 2009
Posts:
119
Plugin Contributions:
0

Re: userCurrency - updated for 1.3.5

s_mack:

(that's "marnin" in Irish)

love the oirish accent :laugh:

Thanks for the comments, think i'll take your advice and just show both currencies and see how that works. hopefully most will avoid conversion and shop in their own currency

I want to avoid the impression that I'm hiding something more than i want to avoid paying for currency conversion!

6 Mar 2011, 6:04 PM
#116
s_mack avatar

s_mack

Totally Zenned

Join Date:
Jun 2005
Location:
Kelowna, BC Canada
Posts:
1,033
Plugin Contributions:
4

Re: userCurrency - updated for 1.3.5

iddy:

I want to avoid the impression that I'm hiding something more than i want to avoid paying for currency conversion!

I have hope for this one.... he shows great promise.

7 Oct 2011, 1:44 AM
#117
top_hatt avatar

top_hatt

Zen Follower

Join Date:
Feb 2010
Posts:
237
Plugin Contributions:
0

Re: userCurrency - updated for 1.3.5

This add on is exactly what I am looking for. My business is in Canada but I do business in CDN and USD.

I am using 1.3.9f. Does this add on work with this version? If not, is there any plans to update this for 1.3.9?

Dave

11 Oct 2011, 6:37 PM
#118
top_hatt avatar

top_hatt

Zen Follower

Join Date:
Feb 2010
Posts:
237
Plugin Contributions:
0

Re: userCurrency - updated for 1.3.5

Hi:

I tried to load this add on up on my test site and it seems to work.

Can I get some of you to test the site from other countries and give me feedback. I am using CDN currency if you are from Canada and USD from any other country.

The test site is http://poolcuesexpress.com/testsite

Thanks in advance.

Dave

11 Oct 2011, 6:50 PM
#119
s_mack avatar

s_mack

Totally Zenned

Join Date:
Jun 2005
Location:
Kelowna, BC Canada
Posts:
1,033
Plugin Contributions:
4

Re: userCurrency - updated for 1.3.5

I am in Canada and I see Canadian.

15 Oct 2011, 12:54 PM
#120
top_hatt avatar

top_hatt

Zen Follower

Join Date:
Feb 2010
Posts:
237
Plugin Contributions:
0

Re: userCurrency - updated for 1.3.5

Can anyone outside of Canada check this out and see if it works?

That would be greatly appreciated.

Dave