CMS code using conditions in Virtuemart

Chrisnz
39 Posts
Chrisnz posted this 09 December 2016

Using the following CMS code works well to recognize when you have a discount set using 'Overwrite final' in virtuemart.

if ($product->prices['discountedPriceWithoutTax'] !=
$product->prices['priceWithoutTax']) { // your price here }

What would the equivalent code be to recognize a discount with the setting 'Overwrite price to be taxed'?

Thanks

Using the following CMS code works well to recognize when you have a discount set using 'Overwrite final' in virtuemart. > if ($product->prices['discountedPriceWithoutTax'] != > $product->prices['priceWithoutTax']) { // your price here } What would the equivalent code be to recognize a discount with the setting 'Overwrite price to be taxed'? Thanks
Vote to pay developers attention to this features or issue.
1 Comments
Order By: Standard | Newest
Support Team
Support Team posted this 09 December 2016

Hi,

I'm not really sure how exactly this price override function works in Virtuemart but you can try something simple like:

<?php if ($product->prices['product_override_price'] > 0) {
// echo something here
} ?>

This is equal to if override price is > 0 then show something. It's 0 by default.

Thank you,
Olivia

Hi, I'm not really sure how exactly this price override function works in Virtuemart but you can try something simple like: `<?php if ($product->prices['product_override_price'] > 0) { // echo something here } ?>` This is equal to if override price is > 0 then show something. It's 0 by default. Thank you, Olivia
You must log in or register to leave comments