VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: joshadams on August 28, 2018, 14:05:09 PM

Title: Show product discount
Post by: joshadams on August 28, 2018, 14:05:09 PM
Is there a fast and easy way to echo selected discount on product (VirtueMart)?

If I choose specific discount for final price, then $product->prices['DBTax'] will give me only selected discount which is ok. But if generic rule for final price is set like it is by default, then $product->prices['DBTax'] would contain all of the registered discount which isn't good, and in array there isn't any clue if that discount is active -.-
Title: Re: Show product discount
Post by: Jörgen on August 28, 2018, 14:24:04 PM
VM version, Joomla version ETC ???

Look at the template files sublayout prices.php, there You can see how discount is detected.

regards

Jörgen @ Kreativ Fotografi