Jump to content

Hide stock status among the products, but not to each product?


blazern

Recommended Posts

Just go to Preferences> Products> Product Page section and turn off "Display available quantities on the product page"

 

This won't show your stock levels, but will show out of stock when you are out. Hope that's what you are looking for.

Link to comment
Share on other sites

Just go to Preferences> Products> Product Page section and turn off "Display available quantities on the product page"

 

This won't show your stock levels, but will show out of stock when you are out. Hope that's what you are looking for.

 

I don't want prestashop to show the red marked boxes on product overview, products_overview.jpg

 

but I still want prestashop to show stock status on each product when a customer click on read more, like this for products in stock

 

in_stock.jpg

 

or this for products not in stock

 

not_in_stock.jpg

Link to comment
Share on other sites

I'm looking for away to do this as well. Can anyone help?

I found a solution finally, delete this part from your product-list.tpl

 

{if (!$PS_CATALOG_MODE && $PS_STOCK_MANAGEMENT && ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
{if isset($product.available_for_order) && $product.available_for_order && !isset($restricted_country_mode)}
<span itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="availability">
{if ($product.allow_oosp || $product.quantity > 0)}
<span class="{if $product.quantity <= 0 && !$product.allow_oosp}out-of-stock{else}available-now{/if}">
<link itemprop="availability" href="http://schema.org/InStock" />{if $product.quantity <= 0}{if $product.allow_oosp}{if isset($product.available_later) && $product.available_later}{$product.available_later}{else}{l s='In Stock'}{/if}{else}{l s='Out of stock'}{/if}{else}{if isset($product.available_now) && $product.available_now}{$product.available_now}{else}{l s='In Stock'}{/if}{/if}
</span>
{elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)}
<span class="available-dif">
<link itemprop="availability" href="http://schema.org/LimitedAvailability" />{l s='Product available with different options'}
</span>
{else}
<span class="out-of-stock">
<link itemprop="availability" href="http://schema.org/OutOfStock" />{l s='Out of stock'}
</span>
{/if}
</span>
{/if}
{/if}
 
Hope this helps
  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

 

I found a solution finally, delete this part from your product-list.tpl

 

{if (!$PS_CATALOG_MODE && $PS_STOCK_MANAGEMENT && ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
{if isset($product.available_for_order) && $product.available_for_order && !isset($restricted_country_mode)}
<span itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="availability">
{if ($product.allow_oosp || $product.quantity > 0)}
<span class="{if $product.quantity <= 0 && !$product.allow_oosp}out-of-stock{else}available-now{/if}">
<link itemprop="availability" href="http://schema.org/InStock" />{if $product.quantity <= 0}{if $product.allow_oosp}{if isset($product.available_later) && $product.available_later}{$product.available_later}{else}{l s='In Stock'}{/if}{else}{l s='Out of stock'}{/if}{else}{if isset($product.available_now) && $product.available_now}{$product.available_now}{else}{l s='In Stock'}{/if}{/if}
</span>
{elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)}
<span class="available-dif">
<link itemprop="availability" href="http://schema.org/LimitedAvailability" />{l s='Product available with different options'}
</span>
{else}
<span class="out-of-stock">
<link itemprop="availability" href="http://schema.org/OutOfStock" />{l s='Out of stock'}
</span>
{/if}
</span>
{/if}
{/if}
 
Hope this helps

 

Yeah, that's what I did as well. But I still want to show the out of stock status, so I only deleted the part that displays In Stock/Limited Availability.

Link to comment
Share on other sites

×
×
  • Create New...