News:

Looking for documentation? Take a look on our wiki

Main Menu

Hide discount if = 0

Started by jack19, October 09, 2012, 18:16:54 PM

Previous topic - Next topic

jack19

Hello,
how can I hide the discount if it is zero?
----------------------

I found this solution
I had to take the opposite approach: show the discount if greater than zero.
if ($product->prices['discountAmount'] > 0.001) { echo $this->currency->createPriceDiv('discountAmount','COM_VIRTUEMART_PRODUCT_DISCOUNT_AMOUNT',$product->prices); }
In category tmpl (default.php)  and default_products.php
Best regards

Joomla! 2.5.9
Virtuemart 2.0.18a

huegel-huepfer

Joomla 2.5.6

VM 2.0.8e

bytelord

Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

jack19

Best regards

Joomla! 2.5.9
Virtuemart 2.0.18a