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 21 to 40 of 148
28 Feb 2007, 6:55 PM
#21
musicademy avatar

musicademy

New Zenner

Join Date:
Feb 2007
Posts:
9
Plugin Contributions:
0

userCurrency - updated for 1.3.5

Hi
Wonder if you can advise me
We sell in UK pounds but want to also sell in USD. I guess we can do that with mulitple currencies ....I'm trying to find someone I can pay to set that up.

The complicating factor is that I actually want to charge less to customers in North America than the rest of the world. Any ideas?
Thanks

28 Feb 2007, 7:21 PM
#22
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 twice you've asked this question in one of my contribution threads :)

Don't get confused... what you are trying to do is pretty basic and you don't need a contrib to do it.

Don't pay someone else to do it... just learn yourself. Honestly, you don't want to get into a routine of paying people for the basics... because sooner or later you're going to run into non-basic stuff that you'll really need help with. The basic running of your store should be well within your reach.

All you need to do is set up the two currencies and then adjust the exchange rate manually so that your customers that choose USD get a better price. Why you want to do that, I can't even begin to guess... but that should achieve your goal.

Now - that won't prevent someone from the UK from buying in USD and getting a deal. You're basing it on currency, not geography. If you wanted to base it on geography, then you need a contrib that uses a multiplier based on the customer's location. No such contrib exists, but it wouldn't be too hard to do.

You'd STILL have the problem of guests (users that aren't logged in) - do you show them NA amounts or world amounts? Or just don't show prices to guests.

  • Steven
2 Mar 2007, 3:17 PM
#23
musicademy avatar

musicademy

New Zenner

Join Date:
Feb 2007
Posts:
9
Plugin Contributions:
0

Re: userCurrency - updated for 1.3.5

Hi
Thanks for your reply and sorry to post the same question twice. Actually, I have worked out how to do the multiple currency thing and "fix" the exchange rate. I know it sounds mad to sell at different rates but DVDs are so much cheaper in the US than in the UK so our resellers sell at a lower rate than us so we miss out on sales if we hold our UK pounds sterling rate. What I'm still exploring is the possiblity of getting a mod written that will allow me to go beyond fixing a flat currency conversion and chage one USD price for one product and a different USD price for another one which may have no relation to the currency rate. For that I do recognise that I will have to pay.

I'd be interested in a mod that covers geography. As we despatch I can simply not despatch goods until the correct payment is received if non US customers have bought on the dollar price.
Thanks for your time. Appreciate it.

2 Mar 2007, 5:53 PM
#24
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

Yeah, it seems a lot of people want to do what you are doing. I still don't know of a mod for price-by-geography. I've seen it explained before as you just have... but it still seems very odd to me. If I was a UK customer, for example, and I happened to notice that you were selling the SAME product to Americans for a lower price... I'd be pissed! I mean, it shows that OBVIOUSLY you can sell it at that lower price and make a profit (otherwise you'd rather lose the sale) so it just comes off as greedy.

Greedy is fine... but hide it :) Opening up to your customer that you are jacking their price up just because that's common for that country, i would think, would anger a good portion of your customers.

For good or for worse, the Internet is the great equalizer. Sooner or later, your UK customers will realize they can get the items cheaper from the US than from a local source. And if you can make money at the lower price, I would think you're better off establishing that price-point before your competitors. Lower price = greater sales, right?

I'm sort of in the same situation as you. I'm in Canada and the products I sell are rare here, but common in the UK and some parts of Europe. I "over" charge for that reason - its a small market here and my volume is going be low no matter what my price, so I have to sell for a higher profit-per-item to survive. Nobody in the UK in their right mind would order from me because they can get it WAY cheaper locally. But there's no way I would lower my price for them, because then my Canadian customers would kill me! It would be business suicide for me.

Anyway - its just a curiousity to me :) I'm not trying to tell you how to run your business! It has come up enough that clearly its not unusual. It just seems odd from my point of view.

Best of luck in finding what you need. I might suggest that you clearly establish what you need, and post a new thread. You'll probably find that several others need the same thing. Then, perhaps, you can get together and share the cost of a programmer who can help you reach your goal.

Cheers!

  • Steven
2 Mar 2007, 6:29 PM
#25
musicademy avatar

musicademy

New Zenner

Join Date:
Feb 2007
Posts:
9
Plugin Contributions:
0

Re: userCurrency - updated for 1.3.5

Thanks Steven
Wise advice. I know its strange but there are good commercial reasons for selling at different prices and if you're in the UK you simply can't access the products in the US as the resellers don't have a licence to trade outside of their territory. It happens in loads of markets (I just paid about $800 more for a Nikon camera in the UK than I would have in North America but no one will sell to me from a US website to a UK shipping address) Hence why Ebay is great when you know how to play and have someone in the US/Canada who will take the item and then ship on. As you say, the net is a great leveller.

I'll post a new thread and I appreciate your time.

16 May 2007, 6:02 PM
#27
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

Verified as a bug, thank you.

I'm not sure how this went so long without being discovered. I guess most people choose their currency and then stick with it.

I made an error in the coding and used an Insert where I obviously should have used an Update.

I'd love to say I'll get it fixed in the hour, but I have more things on my plate than I can possibly handle at the moment. I'll get to it as soon as is practical.

  • Steven
16 May 2007, 6:12 PM
#28
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,572
Plugin Contributions:
60

Re: userCurrency - updated for 1.3.5

Can I just replace the INSERT INTO with an UPDATE or is it more complicated?

16 May 2007, 7:10 PM
#29
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

numinix:

Can I just replace the INSERT INTO with an UPDATE or is it more complicated?

You should never make changes like that without understanding what it does.

Anyway, that wasn't the problem. At first glance, I didn't know why I was using INSERT INTO but then it became aparant once I took a closer look.

The bug isn't related tot he INSERT/UPDATE command, its a simpler, stupider typo on a logical test that I somehow missed. Again, I'm amazed this never got reported earlier!!!

I've fixed it an submitted the new file to the zencart downloads section (version 2.11). Or you can follow these instructions:

In the file /includes/init_includes/init_userCurrency.php:

Locate line 48 that reads:> $sql = 'SELECT customers_id FROM ' . TABLE_CUSTOMERS_CURRENCY . ' WHERE customers_id = "' . $customers_currency_id . '"'; and change it to: > $sql = 'SELECT customers_id FROM ' . TABLE_CUSTOMERS_CURRENCY . ' WHERE customers_id = "' . $_SESSION['customer_id'] . '"';

Then locate line 90 where it reads:> $sql = 'SELECT customers_id FROM ' . TABLE_CUSTOMERS_CURRENCY . ' WHERE customers_id = "' . $customers_currency_id . '"'; and change it to:> $sql = 'SELECT customers_id FROM ' . TABLE_CUSTOMERS_CURRENCY . ' WHERE customers_id = "' . $_SESSION['customer_id'] . '"';

It was a careless mistake. I was trying to check if there was already an entry for that customer ID... but instead of checking the customer ID, I was checking the customer currency ID. Apples to Oranges.

  • Steven
16 May 2007, 7:18 PM
#30
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,572
Plugin Contributions:
60

Re: userCurrency - updated for 1.3.5

The syntax wouldn't be right and it didn't work anyways...

I'm glad I brought this to your attention!

Thanks for the fix. I'll let you know if I find anymore issues.

20 May 2007, 1:46 AM
#31
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,572
Plugin Contributions:
60

Re: userCurrency - updated for 1.3.5

If I connect with a proxy to my website, should the script work?I tried connecting to a US proxy with high anonymity to test this script and it still displayed my default, Canadian. How do I know if it's working or not. Anyone who reads this thread, check out http://www.numinix.com and let me know what the default currency is.

20 May 2007, 6:51 PM
#32
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

Well, for me it shows Canadian... but it should... I'm in Canada :)

One way to test... change your store's currency to USD and go visit again. If it still shows Canadian then it works. Make sure you are a guest though and you are using a fresh browser.

  • Steven
25 May 2007, 6:25 PM
#33
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: userCurrency - updated for 1.3.5

numinix,

I am in the US and it came up US but I do not know what your store default is??

Zen-Venom Get Bitten

26 May 2007, 5:21 AM
#34
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,572
Plugin Contributions:
60

Re: userCurrency - updated for 1.3.5

The script works. The default is Canada and I tested it as s_mack advised.

Thanks!

27 Sep 2007, 9:06 AM
#35
blag avatar

blag

Zen Follower

Join Date:
May 2007
Location:
Leicester, England
Posts:
165
Plugin Contributions:
0

Re: userCurrency - updated for 1.3.5

s_mack

I believe that I may have a problem with this mod, and wondered if you could be so kind as to assist.

I have installed the mod along with many others, including Ultimate SEO URLS 3(beta) and No_Account_No_Login.

I have been advised by others that when they visit my store, the currency shewn for products is GBP, irrespective of their location. (I had this tested from Czechoslovakia and from France)

Furthermore, if the user wants to select an alternative currency from the drop-down, they are always returned to the default currency, and the user is returned to the Home Page.

I have discovered that if I turn off the SEO URL's the user can change the currency anywhere in the store without any problems.

I don't think that your mod is the culprit, because I have removed this mod's php files from the site, and I still experience the same problem, but, having said that, I don't suppose you can cast any light on the cause(s) of the phenomenon I am experiencing?

27 Sep 2007, 4:08 PM
#36
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'm not sure why you would start with "I believe that I may have a problem with this mod" and end with "I don't think that your mod is the culprit, because I have removed this mod's php files from the site, and I still experience the same problem" in the same post...

but that being said... I agree with your 2nd statement, its not this mod. It can't be, if you removed it and still have problems.

I took a quick look at your site... yikes, you have a lot of problems. JavaScript errors are the first things that jump out at me.

Clicking on any of your menu items (using whatever a Yahoo widget is) does nothing and generates JS errors. Your currency selector uses JS to submit your currency choice so I'd have a suspicion that if you cleaned up and fixed your Javascript problems that it might work.

Your HTML is invalid, producing 139 errors (see: http://validator.w3.org/check?uri=http%3A%2F%2Fho-hose.co.uk%2Fstore%2Findex.php&charset=%28detect+automatically%29&doctype=Inline&group=0)

I don't mean to be harsh, but this seems like a classic case of someone biting off more than they know how to chew... you should start with a basic Zen-Cart install, fresh and clean, and change it LITTLE BY LITTLE learning what you are doing along the way. Use tools like the HTML validator and watch for things like JavaScript errors (little warning symbol in the lower left corner of Internet Explorer) along the way and make corrections as they happen... trying to debug something after you've made a hundred changes is not going to be easy.

My advice, and I'm sorry to say it but its just being honest... start over.

  • Steven
28 Sep 2007, 7:16 AM
#37
blag avatar

blag

Zen Follower

Join Date:
May 2007
Location:
Leicester, England
Posts:
165
Plugin Contributions:
0

Re: userCurrency - updated for 1.3.5

s_mack:

I'm not sure why you would start with "I believe that I may have a problem with this mod" and end with "I don't think that your mod is the culprit, because I have removed this mod's php files from the site, and I still experience the same problem" in the same post...

but that being said... I agree with your 2nd statement, its not this mod. It can't be, if you removed it and still have problems.

I took a quick look at your site... yikes, you have a lot of problems. JavaScript errors are the first things that jump out at me.

Clicking on any of your menu items (using whatever a Yahoo widget is) does nothing and generates JS errors. Your currency selector uses JS to submit your currency choice so I'd have a suspicion that if you cleaned up and fixed your Javascript problems that it might work.

Your HTML is invalid, producing 139 errors (see: http://validator.w3.org/check?uri=http%3A%2F%2Fho-hose.co.uk%2Fstore%2Findex.php&charset=%28detect+automatically%29&doctype=Inline&group=0)

I don't mean to be harsh, but this seems like a classic case of someone biting off more than they know how to chew... you should start with a basic Zen-Cart install, fresh and clean, and change it LITTLE BY LITTLE learning what you are doing along the way. Use tools like the HTML validator and watch for things like JavaScript errors (little warning symbol in the lower left corner of Internet Explorer) along the way and make corrections as they happen... trying to debug something after you've made a hundred changes is not going to be easy.

My advice, and I'm sorry to say it but its just being honest... start over.

  • Steven
    s_mack

You may be right in what you say - I may be biting off more than I can chew, and I admit that I am floundering a bit. I have been struggling with this Zen Cart installation for several months now, and I must have started from scratch at least a dozen times. I am not a stupid man - in fact quite the opposite. I am not a .php coder, although I have managed to contribute one mod to the Zen Cart downloads area - I have reached the limits of my ability and I am just looking for some guidance on an issue that has got me completely stumped.

I have been very, very methodical. I have kept backups and prodigious notes on each and every step that I take, but it seems to me that it is just not feasible/reasonable/possible to test every single feature of the store with every single new addition, and therefore, one can encounter a problem that may have been generated several/many steps back, but escaped one's notice, and there is virtually no way or 'recovering' the situation. The forums are a useful pool of knowledge, and if Zen Cart was 'easy' the forums wouldn't exist. Not everybody can be an expert, and I apologise for my lack of expertise, but everybody has to start somewhere!! I don't delve into these forums lightly, I have contributed and have assisted on their difficult way through this minefield.

I am aware of the problems with the menu on the LH side, but they have only v. recently started since I have applied a re-direct to the https://www.ho-hose.net site. Until the site went to that redirect, the menus worked just fine. I had experienced this problem previously and soemone kindly helped me out, but the fix he supplied doesn't work for this re-direct, and I am unable to get a response from him/her. I am sure that the fix is not a Big Deal - just beyond the scope of my expertise. I suspect that this is the source of the majority of the JS errors. (Curiously, I don't get errors flagged for my in my browser - but do on other sites!)

I can see that the HTML has errors, but most of these errors are generated by mods that I have applied. The Google Translate mod (for instance) has caused the majority of the 139 errors that you reported: removing that add-on reduces the reported errors to just 11!! By turning off Links; Testimonials and the Yahoo menu sideboxes (all third party add-ons), the remaining HTML errors have gone. I suspect that the Javascript errors will also have disappeare - I checked in IE7 and there didn't seem to be any JS errors.

BUT... my original problem persists. NOW that, in some small way, I have 'redeemed' myself by having an error-free site, I don't suppose that you might have any idea as to why the problem does persist?

The problems with third party mods raises an interesting point: I hadn't thought of checking to see if the pages contained HTML errors, I took it for granted that persons contributing mods would have ensured that their mods are 'debugged'. Of course this assumption may be naive, but I don't think that it is at all unreasonable for the persons 'authorising' the mods to somehow test the mod on a basic installation before approving it for inclusion in the Downloads area. Of course, it may be that the guidance here when using any third-party mods is 'Caveat Emptor', so maybe you have taught me a valuable lesson.

Mike

28 Sep 2007, 7:43 AM
#38
drbyte avatar

drbyte

Sensei

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

Re: userCurrency - updated for 1.3.5

blag:

Of course this assumption may be naive, but I don't think that it is at all unreasonable for the persons 'authorising' the mods to somehow test the mod on a basic installation before approving it for inclusion in the Downloads area.Sorry - if we did that, there'd only be a couple things in the downloads area.
Hence the "use at own risk" notation in the downloads section.

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

28 Sep 2007, 7:49 AM
#39
drbyte avatar

drbyte

Sensei

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

Re: userCurrency - updated for 1.3.5

blag:

I don't think that your mod is the culprit, because I have removed this mod's php files from the site, and I still experience the same problem, but, having said that, I don't suppose you can cast any light on the cause(s) of the phenomenon I am experiencing?

Since it seems this mod has been ruled out, it's likely best to keep the discussion of your specific issues to the thread in which you already started discussing it:
http://www.zen-cart.com/forum/showthread.php?t=75778

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

28 Sep 2007, 8:43 AM
#40
blag avatar

blag

Zen Follower

Join Date:
May 2007
Location:
Leicester, England
Posts:
165
Plugin Contributions:
0

Re: userCurrency - updated for 1.3.5

DrByte:

Since it seems this mod has been ruled out, it's likely best to keep the discussion of your specific issues to the thread in which you already started discussing it:
http://www.zen-cart.com/forum/showthread.php?t=75778
Dr Byte

I completely agree with you, but my desperation is getting the better of me. I'll retire from this thread. Consider me gone.

Perhaps there ought to be a clear, unambiguous, prominent advisory note indicating that third party mods might damage the health of you Zen Cart?

Finally, before I leave - I don't suppose that you can cast any light on my problem, as my queries in the other thread are not generating responses?