News:

Support the VirtueMart project and become a member

Main Menu

Show product discount

Started by joshadams, August 28, 2018, 14:05:09 PM

Previous topic - Next topic

joshadams

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 -.-

Jörgen

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
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.