DarkLucas Posted January 25, 2012 Share Posted January 25, 2012 Exist a posibility if the stock is zero to not show the price of that product? If is, please somebody help, and thank you in advance. Link to comment Share on other sites More sharing options...
shokinro Posted January 26, 2012 Share Posted January 26, 2012 Please try following: For product list pages, use following code to embrace the code of price YourSiteRoot/themes/YourSiteTheme/product-list.tpl {if $product.quantity>0} price related code block {/if} For product detailed page, use following code to embrace the code of price in file YourSiteRoot/themes/YourSiteTheme/product.tpl {if $product->quantity>0} price related code block {/if} Link to comment Share on other sites More sharing options...
DarkLucas Posted January 26, 2012 Author Share Posted January 26, 2012 Please try following: For product list pages, use following code to embrace the code of price YourSiteRoot/themes/YourSiteTheme/product-list.tpl {if $product.quantity>0} price related code block {/if} For product detailed page, use following code to embrace the code of price in file YourSiteRoot/themes/YourSiteTheme/product.tpl {if $product->quantity>0} price related code block {/if} I`m not so morron but realy i did not understud where to put that, and what mean that: "price related code block". If i please, can be a little more specific? I want if stock is zero to not show the price, but show something else, like "Call for price". Thank you. Link to comment Share on other sites More sharing options...
shokinro Posted January 26, 2012 Share Posted January 26, 2012 I never think anyone is morron, neither am I. Sometime, when I explained too much in too details, some people think it is offensive says something like "I am not morron". my "price related code block" means the code in tpl that is used to display price. In case of product-list.tpl file, it wil be come like this, (I have also included your "please call for price") <div> {if $product->quantity>0} {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}<span class="pl_price" style="display: inline;">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span><br />{/if} {else} {l s='Please call for price'} {/if} </div> For product.tpl, I will still leave it for yourself. Please also note: the code block for displaying price could be different for different version of PrestaShop, that's another reason I leave it for yourself, because I don't know what is your PrestaShop version. 1 Link to comment Share on other sites More sharing options...
DarkLucas Posted January 26, 2012 Author Share Posted January 26, 2012 I never think anyone is morron, neither am I. Sometime, when I explained too much in too details, some people think it is offensive says something like "I am not morron". my "price related code block" means the code in tpl that is used to display price. In case of product-list.tpl file, it wil be come like this, (I have also included your "please call for price") <div> {if $product->quantity>0} {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}<span class="pl_price" style="display: inline;">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span><br />{/if} {else} {l s='Please call for price'} {/if} </div> For product.tpl, I will still leave it for yourself. Please also note: the code block for displaying price could be different for different version of PrestaShop, that's another reason I leave it for yourself, because I don't know what is your PrestaShop version. The version is 1.3.2, and thank you very much, i`l try and post update after. Now i understud. Link to comment Share on other sites More sharing options...
zavela Posted February 15, 2012 Share Posted February 15, 2012 Is it possible to post the code for product.tpl thank you in advance. for Prestashop 1.4 Link to comment Share on other sites More sharing options...
shokinro Posted February 25, 2012 Share Posted February 25, 2012 since some members asked for sample files, I have uploaded the modified product.tpl and product-list.tpl (with additional extension .txt) to this thread. please note: the files are from(for) 1.4.7.0 product.tpl.txt product-list.tpl.txt 1 Link to comment Share on other sites More sharing options...
zavela Posted February 25, 2012 Share Posted February 25, 2012 Thanks You are grate Link to comment Share on other sites More sharing options...
langbianiam Posted July 23, 2013 Share Posted July 23, 2013 (edited) Hi all, Can you help my problem, "call for price" I use prestashop v1.5.4.1 I also want to use the "call for price" Thank in advance Edited July 23, 2013 by langbianiam (see edit history) Link to comment Share on other sites More sharing options...
Mcrico82 Posted July 24, 2016 Share Posted July 24, 2016 Is it possible to post the code for product.tpl and product-list.tpl thank you in advance. for Prestashop 1.6.1.6 Link to comment Share on other sites More sharing options...
Recommended Posts