Forums / Built-in Shipping and Payment Modules / Linkpoint accept other currencies

Linkpoint accept other currencies

Views: 547

Results 1 to 2 of 2
22 Aug 2012, 8:36 PM
#1
alberto1el avatar

alberto1el

New Zenner

Join Date:
May 2012
Location:
Tijuana, Baja California, Mexico
Posts:
2
Plugin Contributions:
0

Linkpoint accept other currencies

I was looking for this onw but didnt find it so i dug into the autorize.net module since that one does the currency conversion (using the currencies previously created in localization admin area) and i found a particularly working piece of code and adapted it to linkpoint variable names so here is what you have to do:

Find your linkpoint payment module in:

your_shop_path/includes/modules/payment/linkpoint_api.php

And around line 408 right after:

foreach(array('subtotal', 'tax', 'shipping') as $i) {
      if (isset($myorder[$i]) && $myorder[$i] == 0) unset($myorder[$i]);
    }

put this:

	global $currencies;
$myorder['chargetotal'] = number_format($myorder['chargetotal'] * $currencies->get_value('USD'), 2);

and you are good to go.
This is for zen cart v1.5.0
I hope someone finds this useful

zen cart store:
synergyo2.biz

22 Aug 2012, 9:07 PM
#2
alberto1el avatar

alberto1el

New Zenner

Join Date:
May 2012
Location:
Tijuana, Baja California, Mexico
Posts:
2
Plugin Contributions:
0

Re: Linkpoint accept other currencies

mmmm i cant seem to find where to edit my own post
well the deal is that the formatting wasn't correct this is the way it should go

($myorder['chargetotal'] * $currencies->get_value('USD'), 4, '.', '');

i added

, '.', ''

zen cart store:
synergyo2.biz