VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product pricing => Topic started by: jeroenmulder on March 20, 2014, 13:37:48 PM

Title: Round only display double price
Post by: jeroenmulder on March 20, 2014, 13:37:48 PM
Hello,

I am using VM 2.0.26d and Joomla 2.5.17.

The function "round only display" is very important for us because of accurate VAT calculation.
But this function also causes a double price dislpay. (the baseprice is always displayed (as strikethrough))

I think it has something to do with rounding. A possible solution that will work for me is "show only crossed priced if discount is bigger than 0,01". I don't know how to put this function in my price templates.
Hope someone can help.
Thanks in advance.

Best regards,

Jeroen


Title: Re: Round only display double price
Post by: K&K media production on March 20, 2014, 20:53:03 PM
if ($this->product->prices['discountAmount'] > 0.01) {

}
Title: Re: Round only display double price
Post by: jeroenmulder on March 21, 2014, 11:18:06 AM
Many thanks kkmediaproduction.  :)

This solution works, but a with a small modification.

The discountamount is a negative number e.g. -50.

Code must be:

if ($this->product->prices['discountAmount'] > - 0.01) {

}

Jeroen