News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Wrong Discount % value print product detailed page

Started by encreplus, July 22, 2013, 05:29:15 AM

Previous topic - Next topic

encreplus

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.')';
}

Maxim Pishnyak

Could you post here screen shots of price, discount setup.

You don't use any other stuff that could influence? Tax for example?
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart