Author Topic: Module Virtuemart product dont show price without tax  (Read 536 times)

SniperMan

  • Beginner
  • *
  • Posts: 11
  • A beginner
Module Virtuemart product dont show price without tax
« 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:
         
Code: [Select]
<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.

Code: [Select]
<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

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 26083
  • Always on vacation
    • Jenkin Hill Internet
Re: Module Virtuemart product dont show price without tax
« Reply #1 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
Kelvyn

Jenkin Hill Internet,
Keswick, Lake District

Unsolicited PMs/emails will be ignored.

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

Currently using VM3.2.3.9614 on Joomla 3.7.4 PHP 7.0.22

Testing VM3.2.3.9614 on J!3.7.4

SniperMan

  • Beginner
  • *
  • Posts: 11
  • A beginner
Re: Module Virtuemart product dont show price without tax
« Reply #2 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

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 26083
  • Always on vacation
    • Jenkin Hill Internet
Re: Module Virtuemart product dont show price without tax
« Reply #3 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
Kelvyn

Jenkin Hill Internet,
Keswick, Lake District

Unsolicited PMs/emails will be ignored.

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

Currently using VM3.2.3.9614 on Joomla 3.7.4 PHP 7.0.22

Testing VM3.2.3.9614 on J!3.7.4

SniperMan

  • Beginner
  • *
  • Posts: 11
  • A beginner
Re: Module Virtuemart product dont show price without tax
« Reply #4 on: April 19, 2017, 23:11:34 pm »
Quote
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.

Could you tell me how to do this? Thank you.

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 26083
  • Always on vacation
    • Jenkin Hill Internet
Re: Module Virtuemart product dont show price without tax
« Reply #5 on: April 20, 2017, 10:23:03 am »
Kelvyn

Jenkin Hill Internet,
Keswick, Lake District

Unsolicited PMs/emails will be ignored.

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

Currently using VM3.2.3.9614 on Joomla 3.7.4 PHP 7.0.22

Testing VM3.2.3.9614 on J!3.7.4

SniperMan

  • Beginner
  • *
  • Posts: 11
  • A beginner
Re: Module Virtuemart product dont show price without tax
« Reply #6 on: April 23, 2017, 20:40:06 pm »
This is it!

Thank you very much jenkinhill.