VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product pricing => Topic started by: encreplus on July 22, 2013, 05:29:15 AM

Title: Wrong Discount % value print product detailed page
Post by: encreplus on July 22, 2013, 05:29:15 AM
Good day,

I dont used discount but overite final prices for product ... my problem is that the discount % printed on the product detailed page is wrong ... instead of having print under the price in the productdetailed page Discount : 52% it shows 891% ...

How can i fix this ... all my product shows the wrong discount ...

here is the code that is in showprices.php

if($templateparams->get('discount')==2) {
$DiscountAmount = $this->product->prices['discountAmount'];
$ActualPrice = $this->product->prices['salesPrice'] + $this->product->prices['discountAmount'];
$Discount = $DiscountAmount / $ActualPrice * 100;
$Discount = number_format((float)$Discount).'%';
echo '('.JText::_('COM_VIRTUEMART_CART_SUBTOTAL_DISCOUNT_AMOUNT').': '; echo $Discount.')';
}
Title: Re: Wrong Discount % value print product detailed page
Post by: Maxim Pishnyak on July 22, 2013, 09:58:15 AM
Could you post here screen shots of price, discount setup.

You don't use any other stuff that could influence? Tax for example?