Support Team
posted this
06 July 2017
Hi,
So, you have products and products with discount, right? Do you have tax price modifiers? Could you please provide a screenshot that demonstrate product price settings and price modifier settings? The provided solution is quite general because joomla provides a lot of price modifiers and we cannot count all of them.
For example, this code
<?php if ($product->prices['discountedPriceWithoutTax'] != $product->prices['priceWithoutTax']) {
echo $this->currency->createPriceDiv ( 'basePrice', 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $this->product->prices );
} ?>
compares discounted Price without tax and base price without tax if they are not equal then it shows base price. But if works if the discount is applied after tax. If discount is applied before tax then we need to compare discounted Price with tax and base price with tax. This solution provides for a tax.
All this is not something specific to Themler. These solutions operate basic VirtueMart prices and conditions. You can find a lot of ready solutions in the internet that you can use in your projects.
Thank you,
Olivia
Hi,
So, you have products and products with discount, right? Do you have tax price modifiers? Could you please provide a screenshot that demonstrate product price settings and price modifier settings? The provided solution is quite general because joomla provides a lot of price modifiers and we cannot count all of them.
For example, this code
`<?php if ($product->prices['discountedPriceWithoutTax'] != $product->prices['priceWithoutTax']) {
echo $this->currency->createPriceDiv ( 'basePrice', 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $this->product->prices );
} ?>`
compares *discounted Price without tax* and *base price without tax* if they are not equal then it shows base price. But if works if the discount is applied after tax. If discount is applied before tax then we need to compare *discounted Price with tax* and *base price with tax*. This solution provides for a tax.
All this is not something specific to Themler. These solutions operate basic VirtueMart prices and conditions. You can find a lot of ready solutions in the internet that you can use in your projects.
Thank you,
Olivia