Zen Cart Logo
Forums / Basic Configuration / Can I Force a Currency change when a specific Payment Option is selected?

Can I Force a Currency change when a specific Payment Option is selected?

Views: 1,688

Results 1 to 7 of 7
7 May 2010, 5:45 PM
#1
vibhor avatar

vibhor

New Zenner

Join Date:
May 2010
Posts:
17
Plugin Contributions:
0

Can I Force a Currency change when a specific Payment Option is selected?

Hello There, I've installed Zen Cart and currently using two currencies, that is US Dollars and Indian Rupees and I've kept 2 Payment Options, That is Paypal and Money Order/Cheque. I'd like to know how do I force cart to show currency in Indian Rupees when a user opts to pay by check/money order. This is a fairly simple question but unable to figure it out. Would appreciate any help. Thanks!

Cheers.

7 May 2010, 6:07 PM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Can I Force a Currency change when a specific Payment Option is selected?

You could do that by making changes to the payment class PHP code. This is where the payment modules are identified.

However, you're likely to run into problems, both customer-related and technical, since you only find out which payment method is being selected in step 2 of the checkout.

Changing the currency on a customer when they're that close to completing their purchase is probably not going to go down well.

Currency changes in the checkout are also inhibited in the core Zen Cart as they cause problems with order total processing. So you will likely have a lot of testing and fixing ahead of you to ensure that everything still works properly.

8 May 2010, 1:02 PM
#3
vibhor avatar

vibhor

New Zenner

Join Date:
May 2010
Posts:
17
Plugin Contributions:
0

Re: Can I Force a Currency change when a specific Payment Option is selected?

Hi, I wanted to force the system to show currency in Rupees when a user selects the payment method of Check/Money order. However, As you said, If it is going to be a mess then I should avoid it. Anyways, I hope you won't mind answering one more question :) -

How do I show only ONE country name in user location drop down list? (My site is country specific). From what I can figure out, There's an option in Admin Panel > Location/Taxes > Countries > Now Do I need to Individually remove each country??

Cheers.

8 May 2010, 6:47 PM
#4
drbyte avatar

drbyte

Sensei

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

Re: Can I Force a Currency change when a specific Payment Option is selected?

Unfortunately, yes, you'll need to remove all the countries you don't want to sell or ship to. NOTE: doing so will remove it from the SHIPPING address choices as well as the NEW ACCOUNT address choices.

9 May 2010, 10:55 AM
#5
vibhor avatar

vibhor

New Zenner

Join Date:
May 2010
Posts:
17
Plugin Contributions:
0

Re: Can I Force a Currency change when a specific Payment Option is selected?

Thanks DrByte!

Cheers.

20 Oct 2011, 8:53 PM
#6
drbyday avatar

drbyday

New Zenner

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

Re: Can I Force a Currency change when a specific Payment Option is selected?

Here is a way:

Find the value of your payment method.

EDIT
/home/ext42co/public_html/includes/modules/pages/checkout_confirmation/header_php.php

FIND:

if (isset($_POST['payment'])) $_SESSION['payment'] = $_POST['payment'];

PASTE THIS BELOW:

// CHANGE CURRENCY DEPENDING ON PAYMENT OPTION START
if ($_POST['payment'] == 'cod') { //value of payment radio button is cod
$_SESSION['currency'] = 'CAD';
}
if ($_POST['payment'] == 'cash') { //value of payment radio button is cash
$_SESSION['currency'] = 'USD';
}
// CHANGE CURRENCY DEPENDING ON PAYMENT OPTION END

15 Nov 2011, 5:57 PM
#7
patelmiteshb avatar

patelmiteshb

New Zenner

Join Date:
Nov 2011
Posts:
2
Plugin Contributions:
0

Re: Can I Force a Currency change when a specific Payment Option is selected?

Dear drbyday,

i have use this but i am not able to convert currency.

you can check here