Forums / Managing Customers and Orders / force currency based on shipping adress

force currency based on shipping adress

Locked

Views: 1,965

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
25 Jun 2008, 12:45 PM
#1
enriko avatar

enriko

New Zenner

Join Date:
Jun 2008
Posts:
7
Plugin Contributions:
0

force currency based on shipping adress

I have searched around the forum for a week, and found answers to almost everything, but not this;

In my store you can use two different currencies. When it comes to taxes I have managed to set it up so if the shipping adress is within a zone the tax will be added (in my case VAT if the customer is from the same country I'm shipping from).

My question is; is it possible to do the same with currencies? I have 2 different currencies, GBP and Euro. but for UK citizen I want the order to be charged in GBP, and not have the option to choose euro.

regards
Enriko

25 Jun 2008, 6:49 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: force currency based on shipping adress

Doing that will require some custom coding.

You could try adding some logic to init_currencies.php to check the customer's address and if they're UK and have selected EUR to force it back to GBP.

And/or you could alter the code in the currencies sidebox so that EUR is not offered if the customer's address is UK.

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

10 Nov 2008, 6:33 PM
#3
tj1 avatar

tj1

Totally Zenned

Join Date:
Mar 2005
Location:
California
Posts:
628
Plugin Contributions:
0

Re: force currency based on shipping adress

Hi guys, could someone please post the code required to force currency back to the default currency when the customer starts the checkout process?

Thanks. :)

11 Nov 2008, 8:01 AM
#4
drbyte avatar

drbyte

Sensei

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

Re: force currency based on shipping adress

This will set the session's currency to the store's default currency, ignoring any language-related currency override:
$_SESSION['currency'] = DEFAULT_CURRENCY;

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