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.')';
}
Could you post here screen shots of price, discount setup.
You don't use any other stuff that could influence? Tax for example?