Author Topic: Serious bug when using currency converter  (Read 4476 times)

Crowman8

  • Beginner
  • *
  • Posts: 10
Serious bug when using currency converter
« on: October 26, 2009, 20:37:13 pm »
 :'(

Hi i found this

The next problem is also very serious.
VM is "converting" the shipping costs again AFTER the order is confirmed. This affects the amount of shipping in the order totals, either increasing or decreasing the amount a second time by the conversion ratio. All looks OK on the confirm page, but once the order is placed, the shipping amount is wrong, and this also affects the amount passed to any payment processor as this adjusted shipping rate is also passed to the payment module.

We are using the Standard Shipping Module - if you are using a different shipping module test to ensure our suggested fix works for your configuration.

Here is our fix:

In line 1598 of the file "administrator/components/com_virtuemart/classes/ps_checkout.php", comment out the below lines:
Code:
$d['shipping_tax'] = $GLOBALS['CURRENCY']->convert( $d['shipping_tax'] );
$d['shipping_total'] = $GLOBALS['CURRENCY']->convert( $d['shipping_total']);


In line 1598 of the file administrator/components/com_virtuemart/classes/ps_checkout.php


i fount only this  :

     }

What means comment out the below lines:

Code:
$d['shipping_tax'] = $GLOBALS['CURRENCY']->convert( $d['shipping_tax'] );
$d['shipping_total'] = $GLOBALS['CURRENCY']->convert( $d['shipping_total']);


must i insert this lines on line 1598 ?

Thanks for a answer

Reagrd Chris





Scar

  • Full Member
  • ***
  • Posts: 1035
    • J-lux
Re: Serious bug when using currency converter
« Reply #1 on: October 27, 2009, 16:03:13 pm »
Comment out means to make the server not take these lines into consideration. You do it by putting /* codelines here */

/*
$d['shipping_tax'] = $GLOBALS['CURRENCY']->convert( $d['shipping_tax'] );
$d['shipping_total'] = $GLOBALS['CURRENCY']->convert( $d['shipping_total']);
*/

If you don't find the lines exactly at 1598 just search for them, they are probably nearby.

supplierman

  • Beginner
  • *
  • Posts: 20
Re: Serious bug when using currency converter
« Reply #2 on: October 29, 2009, 12:40:40 pm »
Any templates use between it thatswhy the line number is showing wrong, dont worry just, but your code is right
Certified Packaging Usa in USA

Crowman8

  • Beginner
  • *
  • Posts: 10
Re: Serious bug when using currency converter
« Reply #3 on: November 05, 2009, 20:14:00 pm »
thanks now it works fine