
I can't see how to display the discount amount on the products or products detail layouts in Virtuemart.
The product sale icon doesn't show either
I can't see how to display the discount amount on the products or products detail layouts in Virtuemart.
The product sale icon doesn't show either
Hello,
To show discount, please use this CMS Code:
http://answers.themler.com/articles/67028/tips-and-tricks#t_8
Please make sure to have the corresponding control added to Products and Product Details template:
Products >> Add Control >> Product Sale, or Product Details >> Add Control >> Product Sale.
Sincerely,
Nettie,
BillionDigital Team
Thanks for that. Is there a way to show the base price with tax, but only if the product has a discount applied?
i.e. so you can show was $... now $...
Hello,
In Themler Products tab >> Product Price there is an option Show Old Price, if enabled, it shows the old price besides the final one.
Sincerely,
Nettie,
BillionDigital Team
Yes, that shows the original price without tax. I need it to show the old price with tax and only be displayed if the product is discounted. It actually displays correctly in the shopping cart.
I've attached how the pricing looked using the original template and how it looks using themler.
I need to configure the prices the same as previously.
Before: (prices displayed correctly)
With Themler: (old price without tax. Old price should not display on 2nd product)
Shopping cart (Prices displayed correctly)
Last edited 02 June 2016 by Chrisnz
I alsou want to show old price, not base price wibout tax....
I alsou want to show old price, not base price wibout tax....I find some solution, pleas check is this work for you, for me is all right :)
File in directory (template direction)
default_template.php /html/com_virtuemart/productdetails
and
default_template.php /html/com_virtuemart/category
change
$oldPriceProps = array('name' => 'basePrice', 'description' => 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $productItems->productPrice->prices, true);
for
$oldPriceProps = array('name' => 'basePriceWithTax', 'description' => 'COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX', $productItems->productPrice->prices, true);
Of course you need to disable base price and enable showing base price with tax in virtuemart
I find some solution, pleas check is this work for you, for me is all right :) File in directory (template direction) default_template.php /html/com_virtuemart/productdetails and default_template.php /html/com_virtuemart/category change $oldPriceProps = array('name' => 'basePrice', 'description' => 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $productItems->productPrice->prices, true); for $oldPriceProps = array('name' => 'basePriceWithTax', 'description' => 'COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX', $productItems->productPrice->prices, true); Of course you need to disable base price and enable showing base price with tax in virtuemartLast edited 06 June 2016 by kedud
False, it's help only partial... this topis need solution
False, it's help only partial... this topis need solutionAny solution for this? It's quite important and functionality that is part of Virtuemart but Themler is preventing from working
Any solution for this? It's quite important and functionality that is part of Virtuemart but Themler is preventing from workingI fond yesterday something :) well problem is that when you have new price and old price (of course when you add this feature that I posted earler) you will see new price and old price, but when you don't ad new price then old and sold price is thisame and show two times :P so I change two files in template default_template.php in template virtuemart productdetail and category to check, if old price is thisame like new price, then old price is hidden, but when if difreent then show old and new price, so simle :) for me its working, I tested it.
$oldPriceProps = array('name' => 'basePriceWithTax', 'description' => 'COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX', $productItems->productPrice->prices, true);
CHANGE TO :
if (round($product->prices['basePriceWithTax'],$this->currency->_priceConfig['salesPrice'][1]) != round($product->prices['salesPrice'],$this->currency->_priceConfig['salesPrice'][1]))
{
$oldPriceProps = array('name' => 'basePriceWithTax', 'description' => 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $productItems->productPrice->prices, true);
}else
{
$oldPrice = false;
} array('name' => 'basePriceWithTax', 'description' => 'COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX', $productItems->productPrice->prices, true);
I fond yesterday something :) well problem is that when you have new price and old price (of course when you add this feature that I posted earler) you will see new price and old price, but when you don't ad new price then old and sold price is thisame and show two times :P so I change two files in template default_template.php in template virtuemart productdetail and category to check, if old price is thisame like new price, then old price is hidden, but when if difreent then show old and new price, so simle :) for me its working, I tested it.
$oldPriceProps = array('name' => 'basePriceWithTax', 'description' => 'COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX', $productItems->productPrice->prices, true);
CHANGE TO :
if (round($product->prices['basePriceWithTax'],$this->currency->_priceConfig['salesPrice'][1]) != round($product->prices['salesPrice'],$this->currency->_priceConfig['salesPrice'][1]))
{
$oldPriceProps = array('name' => 'basePriceWithTax', 'description' => 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $productItems->productPrice->prices, true);
}else
{
$oldPrice = false;
} array('name' => 'basePriceWithTax', 'description' => 'COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX', $productItems->productPrice->prices, true);
I would like to refresh the topic, in the current version of viruemart / themler this solution does not work because there are no such lines in the template files. How to set up the display of prices at the moment, so that when we have a discount, the price before the discount (with tax) and the price after the discount are displayed? Even if I mark the display of all prices in Virtuemart - the price before the discount is not displayed
I would like to refresh the topic, in the current version of viruemart / themler this solution does not work because there are no such lines in the template files. How to set up the display of prices at the moment, so that when we have a discount, the price before the discount (with tax) and the price after the discount are displayed? Even if I mark the display of all prices in Virtuemart - the price before the discount is not displayedLast edited 26 June 2019 by souacz
I done it.
In template folder go to html/com_virtuemart/category/default_template.php and find
$oldPrice = false;
$oldPriceObj = array('description' => 'COM_VIRTUEMART_PRODUCT_BASEPRICE', 'html' => '');
$regularPriceObj = array('description' => 'COM_VIRTUEMART_PRODUCT_SALESPRICE', 'html' => '');
if (is_array($productItems->productPrice->prices)) {
$oldPriceObj['html'] = call_user_func_array(array(&$productItems->productPrice->currency, 'createPriceDiv'),
array(
'name' => 'basePrice',
'description' => 'COM_VIRTUEMART_PRODUCT_BASEPRICE',
$productItems->productPrice->prices,
true
)
);
and replace with
$oldPrice = false;
$oldPriceObj = array('description' => 'COM_VIRTUEMART_PRODUCT_BASEPRICE', 'html' => '');
$regularPriceObj = array('description' => 'COM_VIRTUEMART_PRODUCT_SALESPRICE', 'html' => '');
if (is_array($productItems->productPrice->prices)) {
if ($product->prices['basePriceWithTax'] != $product->prices['salesPrice'] )
{
$oldPriceObj['html'] = call_user_func_array(array(&$productItems->productPrice->currency, 'createPriceDiv'),
array(
'name' => 'basePriceWithTax',
'description' => 'COM_VIRTUEMART_PRODUCT_BASEPRICE',
$productItems->productPrice->prices,
true
)
);
}
else {
}
You need to find all such lines (in my template file there were 4x)
Then go to html/com_virtuemart/productdetails/default_template.php and also replace above lines.
Now, when a customer is in group that has a discount and is logged in - VM shows old prices (base price with tax before discount) and new prices. For public (not logged users) VM shows only baseprice with tax
I done it. In template folder go to html/com_virtuemart/category/default_template.php and find $oldPrice = false; $oldPriceObj = array('description' => 'COM_VIRTUEMART_PRODUCT_BASEPRICE', 'html' => ''); $regularPriceObj = array('description' => 'COM_VIRTUEMART_PRODUCT_SALESPRICE', 'html' => ''); if (is_array($productItems->productPrice->prices)) { $oldPriceObj['html'] = call_user_func_array(array(&$productItems->productPrice->currency, 'createPriceDiv'), array( 'name' => 'basePrice', 'description' => 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $productItems->productPrice->prices, true ) ); and replace with $oldPrice = false; $oldPriceObj = array('description' => 'COM_VIRTUEMART_PRODUCT_BASEPRICE', 'html' => ''); $regularPriceObj = array('description' => 'COM_VIRTUEMART_PRODUCT_SALESPRICE', 'html' => ''); if (is_array($productItems->productPrice->prices)) { if ($product->prices['basePriceWithTax'] != $product->prices['salesPrice'] ) { $oldPriceObj['html'] = call_user_func_array(array(&$productItems->productPrice->currency, 'createPriceDiv'), array( 'name' => 'basePriceWithTax', 'description' => 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $productItems->productPrice->prices, true ) ); } else { } You need to find all such lines (in my template file there were 4x) Then go to html/com_virtuemart/productdetails/default_template.php and also replace above lines. Now, when a customer is in group that has a discount and is logged in - VM shows old prices (base price with tax before discount) and new prices. For public (not logged users) VM shows only baseprice with taxLast edited 27 June 2019 by souacz