Jump to content

Price not show if stock is zero


Recommended Posts

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

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

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.

  • Like 1
Link to comment
Share on other sites

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

  • 3 weeks later...
  • 2 weeks later...
  • 1 year later...
  • 3 years later...
×
×
  • Create New...