News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Module Virtuemart product dont show price without tax

Started by SniperMan, April 19, 2017, 17:14:44 PM

Previous topic - Next topic

SniperMan

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

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

SniperMan

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

jenkinhill

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
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

SniperMan

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.

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

SniperMan