Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to Change Currency when specific payment method is selected


dailce

Recommended Posts

Posted

How to Change Currency when specific payment method is selected.

 

Example, if they select PayPal I want the currency to be CAD NOT USD. I have tried this:

 

if( $order->info['payment_method'] == 'PayPal' ) $currency = 'CAD'; in checkout_confirmation.php

 

but it doesn't work. I'm using the PayPal Shopping Cart IPN if that's any help. Maybe I need to change something in that code but I'm not sure what.

 

Any help

Posted

Figured it out, this was needed:

 

 if( $order->info['payment_method'] == 'PayPal' ){ 
 $order->info['currency'] = 'CAD';
 $currency = 'CAD';
}

 

I wasn't updating the order currency rather I was updating the currency being displayed, so now I do both. Hope this helps anyone else.

Posted

No seems to be causing errors because on checkout_confirmation.php the order totals are displayed in CAD but they have the USD price. Any ideas how to fix this?

 

I think there needs to be something more done maybe to the order_total???

 

Help :(

Posted

Ok if I add the code:

 

if( $order->info['payment_method'] == 'PayPal' ){
 $order->info['currency'] = 'CAD';
 $currency = 'CAD';
}

 

Buyer selects PayPal as payment option, price are in USD. When they are brought to checkout_confirmation.php then the prices get changed to CAD. Except in the order total, the prices are listed in CAD but with USD attached.

 

i.e. Price is $5 USD, but site shows $5 CAD, if I hit refresh then the amount change to the correct value say $5.45 CAD. It seems like the refresh will kick it into effect, so I'm not sure how to fix this.

 

Anyone?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...