VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product pricing => Topic started by: SniperMan on April 19, 2017, 17:14:44 PM

Title: Module Virtuemart product dont show price without tax
Post by: SniperMan on April 19, 2017, 17:14:44 PM
Hi, i use Virtuemart product module under products.

But this module show only price with tax. I need without tax. For all products i use prices without taxt.

Here is code of module:
         <span class="product-price">
<?php 
// $product->prices is not set when show_prices in config is unchecked
if ($show_price and  isset($product->prices)) {
echo '<div class="product-price">'.$currency->createPriceDiv ('salesPrice'''$product->pricesFALSEFALSE1.0TRUE);
if ($product->prices['salesPriceWithDiscount'] > 0) {
echo $currency->createPriceDiv ('salesPriceWithDiscount'''$product->pricesFALSEFALSE1.0TRUE);
}
echo '</div>';
}?>

</span>



I try change code with code from "default_showprices.php", but after save i have blank page of eshop.

<span class="product-price">
<?php 
// $product->prices is not set when show_prices in config is unchecked
            echo $this->currency->createPriceDiv ('priceWithoutTax''COM_VIRTUEMART_PRODUCT_SALESPRICE_WITHOUT_TAX'$this->product->prices);
echo '</div>';
}?>

</span>


Here is my prices settings in Virtuemart:
https://ctrlv.cz/zcae

Thank you very much for helping and sorry for my english.

With sincerelly
SniperMan
Title: Re: Module Virtuemart product dont show price without tax
Post by: jenkinhill on April 19, 2017, 18:04:58 PM
Current VM versions do not use default_showprices.php

So  http://forum.virtuemart.net/index.php?topic=79799.0
Title: Re: Module Virtuemart product dont show price without tax
Post by: SniperMan on April 19, 2017, 18:26:09 PM
Thanks for quickly answer.

My version of Virtuemart is VirtueMart 3.0.16.

I need update this component? But i am very scary from it ...

Here is exmaple where is two prices (one with and wone without tax):
http://www.santiago.cz/eshop/laboratorni-pristroje/bodotavek/bodotavek-kofler-detail
Title: Re: Module Virtuemart product dont show price without tax
Post by: jenkinhill on April 19, 2017, 19:03:57 PM
You have a commercial template which makes it difficult to help with the code, especially if you are using a default_showprices.php file, as that is a VM2.x file, and not part of the VM3.x template system. It is possible that the template developer hacked the old VM2 template files to get them to work with VM3.    http://forum.virtuemart.net/index.php?topic=108212.0

If you always want to show you products without tax and only show tax at checkout then you could set your tax rule to appy per bill - ie only active at checkout.

VM3.0.16 has no known security issues so if it works for you then there is no major requirement to update (we are now at VM3.2.1) but it is essential for site security to use Joomla 3.6.5
Title: Re: Module Virtuemart product dont show price without tax
Post by: SniperMan on April 19, 2017, 23:11:34 PM
QuoteIf you always want to show you products without tax and only show tax at checkout then you could set your tax rule to appy per bill - ie only active at checkout.

Could you tell me how to do this? Thank you.
Title: Re: Module Virtuemart product dont show price without tax
Post by: jenkinhill on April 20, 2017, 10:23:03 AM
(https://image.ibb.co/iUgDFk/taxperbill.jpg) (https://ibb.co/e6LUo5)
Title: Re: Module Virtuemart product dont show price without tax
Post by: SniperMan on April 23, 2017, 20:40:06 PM
This is it!

Thank you very much jenkinhill.