dnmarket Posted April 11, 2007 Posted April 11, 2007 I use a Paymate as a payment option and they only allow to be paid in AUD. I don't want to have to ask the customer to manually change to AUD, and I want to keep the default as USD. Is there a way (preferably not too difficult) to auto change the users selected currency if a certain payment option is selected? Thanks in advance :blink: Quote
ecslanc Posted May 29, 2007 Posted May 29, 2007 Hi, For multiple currencies, you can do this. Open your paymate.php file (should be at catalog/includes/modules/payment.paymate.php). Find this code : function process_button() and make some adjustment so that it will look like function process_button() { global $order, $currencies, $currency; if (MODULE_PAYMENT_PAYMATE_CURRENCY == 'Selected Currency') { $my_currency = $currency; } else { $my_currency = substr(MODULE_PAYMENT_PAYMATE_CURRENCY, 5); } if (!in_array($my_currency, array('NZD', 'AUD', 'USD', 'GBP', 'EUR'))) { $my_currency = 'NZD'; } $process_button_string = Note : you may configure this based on available currencies on your site. $my_currency = substr(MODULE_PAYMENT_PAYMATE_CURRENCY, 5); = mine have 5 currencies (!in_array($my_currency, array('NZD', 'AUD', 'USD', 'GBP', 'EUR'))) = all available currencies $my_currency = 'NZD'; (in your case should be AUD) And this SQL as well insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Currency', 'MODULE_PAYMENT_PAYMATE_CURRENCY', 'Selected Currency', 'The currency to use for credit card transactions', '6', '6', 'tep_cfg_select_option(array(\'Selected Currency\',\'Only USD\',\'Only AUD\',\'Only NZD\'), ', now())"); Good luck. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.