Hide Price when product isn't available in stock

02.09.2015 18:58
#1
hbergold
Joomshopping forum user no avatar
Name: Henning Bergold
31.05.2013
Posts: 23
Quote
Hide Price when product isn't available in stock

Is there a way I could Hide the Price for products with zero (0) quantity? Something I could include or modify in the list_product and product templates?

Thanks

Henning

 
03.09.2015 08:10
#2
admin
(Support Team)
User admin
Name: Admin
05.08.2010
Posts: 25857
Quote
Aw: Hide Price when product isn't available in stock

Need change template.
https://www.webdesigner-profi.de/joomla-webdesign/joomla-shop/forum/posts/7/3567.html?lang=en

 
03.09.2015 22:01
#3
hbergold
Joomshopping forum user no avatar
Name: Henning Bergold
31.05.2013
Posts: 23
Quote
Aw: Hide Price when product isn't available in stock

Hi, could you specify which template and which is the change I need to do?

Thanks

Henning




Letzte Änderung: 08.09.2015 16:00
 
08.09.2015 16:00
#4
hbergold
Joomshopping forum user no avatar
Name: Henning Bergold
31.05.2013
Posts: 23
Quote
Aw: Hide Price when product isn't available in stock

Hi, could you specify which template and which is the change I need to do?

Thanks

Henning



 
08.09.2015 20:34
#5
admin
(Support Team)
User admin
Name: Admin
05.08.2010
Posts: 25857
Quote
Aw: Hide Price when product isn't available in stock

components\com_jshopping\templates\default\list_products\product.php

<?php if ($product->_display_price){?>
<div class = "jshop_price">
<?php if ($this->config->product_list_show_price_description) print _JSHOP_PRICE.": ";?>
<?php if ($product->show_price_from) print _JSHOP_FROM." ";?>
<span><?php print formatprice($product->product_price);?><?php print $product->_tmp_var_price_ext;?></span>
</div>
<?php }?>

change to

<?php if ($product->_display_price && $product->product_quantity <=0){?>
<div class = "jshop_price">
<?php if ($this->config->product_list_show_price_description) print _JSHOP_PRICE.": ";?>
<?php if ($product->show_price_from) print _JSHOP_FROM." ";?>
<span><?php print formatprice($product->product_price);?><?php print $product->_tmp_var_price_ext;?></span>
</div>
<?php }?>

 
09.09.2015 17:35
#6
hbergold
Joomshopping forum user no avatar
Name: Henning Bergold
31.05.2013
Posts: 23
Quote
Aw: Hide Price when product isn't available in stock

Thanks, it worked, but you had a mistake in "<?php if ($product->_display_price && $product->product_quantity <=0){?>". It should be ...product_quantity >0

On the other hand, the price still shows up in the "Product Details" template. Which lines should I change?

Thanks again.

Henning



webdesigner - 08.09.2015 20:34
components\com_jshopping\templates\default\list_products\product.php

<?php if ($product->_display_price){?>
<div class = "jshop_price">
<?php if ($this->config->product_list_show_price_description) print _JSHOP_PRICE.": ";?>
<?php if ($product->show_price_from) print _JSHOP_FROM." ";?>
<span><?php print formatprice($product->product_price);?><?php print $product->_tmp_var_price_ext;?></span>
</div>
<?php }?>

change to

<?php if ($product->_display_price && $product->product_quantity <=0){?>
<div class = "jshop_price">
<?php if ($this->config->product_list_show_price_description) print _JSHOP_PRICE.": ";?>
<?php if ($product->show_price_from) print _JSHOP_FROM." ";?>
<span><?php print formatprice($product->product_price);?><?php print $product->_tmp_var_price_ext;?></span>
</div>
<?php }?>


 
09.09.2015 20:25
#7
admin
(Support Team)
User admin
Name: Admin
05.08.2010
Posts: 25857
Quote
Aw: Hide Price when product isn't available in stock

1. Yes.
2. Search code ...display_price

 


Copyrights MAXXmarketing GmbH. Alle Rechte vorbehalten
Durch die Nutzung dieser Website stimme ich zu, dass Cookies zur optimalen Gestaltung der Website sowie zur Analyse der Nutzung der Website verwendet werden. Weiterführende Informationen finden Sie hier. OK, einverstanden.