Jump to content

Prestashop 1.6.1 how to remove in stock button?


Recommended Posts

Hi,

 

I'm having a problem with the In stock button on the product list. 
I have a lot of sizes in stock, but when the first item is not in stock the button will show 'not in stock' anyway. How can I either completely remove this button or make it display as 'in stock' if even 1 size is in stock?

Thanks

Link to comment
Share on other sites

I'm trying to edit this code to get it to show as in stock if any of the sizes are available, any help on this?

 

{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 class="availability">
{if ($product.allow_oosp || $product.quantity > 0)}
<span class="{if $product.quantity <= 0 && isset($product.allow_oosp) && !$product.allow_oosp} label-danger{elseif $product.quantity <= 0} label-warning{else} label-success{/if}">
{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="label-warning">
{l s='Product available with different options'}
</span>
{else}
<span class="label-danger">
{l s='Out of stock'}
</span>
{/if}
</span>
{/if}
Link to comment
Share on other sites

You're not alone, others have asked about this:

 

https://www.prestashop.com/forums/topic/206075-how-to-automatic-change-product-default-attribute-combination/

 

The penultimate post on the above thread provides a link to this:

 

https://addons.prestashop.com/de/bundels-personalisierung/19020-default-product-variant-combination.html

 

which appears to do what  you're looking for.

Link to comment
Share on other sites

In Prestashop 1.6.1.6 rather than just stating that the product is out of stock, the store displays:

 

This product is no longer in stock with those attributes but is available with others.

 

Whilst this could be worded better, at least it goes some way to informing the customer that a different version of the product is available.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...