VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: sobydesign on July 31, 2014, 03:20:55 AM

Title: Payment confirmation page always displays total as $0
Post by: sobydesign on July 31, 2014, 03:20:55 AM
Hi,
After ordering a product and going through checkout process of choosing shipping and payment options, the correct price is shown. After I confirm and my order is sent, the invoice and confirmation page always displays the total as $0. Please help! Thank you
I am using VM 2.6.6 and Joomla 2.5.24, this issue started after VM update from 2.0 to 2.66.
Below are screenshots. THANKS FOR ANY HELP!!

https://www.evernote.com/shard/s410/sh/ca00cc32-d9a0-417b-8574-649d2186354f/1a525bff4dcb43abbaad03d639b62c38
https://www.evernote.com/shard/s410/sh/b331be80-e85e-457c-9ac5-6e262938b2cc/eaaf9a5486137f68b846695d20047ce9
Title: Re: Payment confirmation page always displays total as $0
Post by: Milbo on July 31, 2014, 08:59:00 AM
Very strange.

Which shipment/payment plugin do you use? and could you please try the same, just with disabled overrides?
Title: Re: Payment confirmation page always displays total as $0
Post by: sobydesign on August 03, 2014, 19:33:49 PM
Hi,
So I use standard payment with weight,zip, country shipment. I tied paypal, but I also get error message, and after this page:
The link you have used to enter the PayPal system contains an incorrectly formatted item amount.
Then I wanted to go back and I got this:
https://www.evernote.com/shard/s410/sh/b9118c90-96e9-4f50-95b3-a84df11ccbc1/10452bdac55325a8d9447b76bbc17115

I disabled the overrides, uploaded again the virtuemart component, with the right aio, I uploaded again the template.
http://www.profan.hu/
If you try to buy something you will see the cart shows 0 too.
https://www.evernote.com/shard/s410/sh/32a67967-2749-4dbd-8d71-7f177a7811c6/02121846b5588f3fdc078cb88d6e34a6
Before the virtuemart 2.66 it was working well.

What do you think what can cause this problem?
Rita


Title: Re: Payment confirmation page always displays total as $0
Post by: sobydesign on August 03, 2014, 20:41:28 PM
Ok the solution was: /administrator/components/com_virtuemart/helpers/currencydisplay.php 297 line

//public function priceDisplay($price, $currencyId=0,$quantity = 1.0,$inToShopCurrency = false,$nb= -1){
   public function priceDisplay($price, $currencyId=0,$quantity = 1.0,$inToShopCurrency = false,$nb= 0){
Title: Re: Payment confirmation page always displays total as $0
Post by: sobydesign on August 05, 2014, 04:18:11 AM
Thanks for my developer, it got solved.
Title: Re: Payment confirmation page always displays total as $0
Post by: Milbo on August 05, 2014, 07:35:25 AM
Not for me. I do not understand, why setting the default of the 3rd parameter to 0 changes it. Usually the function is anyway called with that parameter and if not, take the default of the currency. What is your rounding? -2?