Jump to content

[Solved] Out of stock even if i have product in stock in an Attribute


PrestaSupport

Recommended Posts

Hello!

Working on a site. Prestashop 1.4.1

I have a product in shop that has 2 attributes
Attribute one (default attribute) Is out of stock

Atribute two has items in stock

In product list it show "Out of stock" even if i have products in the other attribute

Is this something wrong?

Shouldn't it display something like is "Product available with different options" or something like that?
It is a little confusing that it show out of stock when there is product in attributes.

Help will be apreciated :)

Link to comment
Share on other sites

I answer this myself.
It is solved in prestashop version 1.4.1

see code in product-list.tpl:

{if isset($product.available_for_order) && $product.available_for_order && !isset($restricted_country_mode)}{if ($product.allow_oosp || $product.quantity > 0)}{l s='Available'}{elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)}{l s='Product available with different options'}{else}{l s='Out of stock'}{/if}{/if}

  • Like 1
Link to comment
Share on other sites

I answer this myself.
It is solved in prestashop version 1.4.1

see code in product-list.tpl:

{if isset($product.available_for_order) && $product.available_for_order && !isset($restricted_country_mode)}{if ($product.allow_oosp || $product.quantity > 0)}{l s='Available'}{elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)}{l s='Product available with different options'}{else}{l s='Out of stock'}{/if}{/if}


I tried to replace this code in PS 1.4.0.17 and it did not worked for me ...
Link to comment
Share on other sites

  • 3 months later...
I answer this myself.<br/>It is solved in prestashop version 1.4.1<br/><br/>see code in product-list.tpl:<br/><br/>{if isset($product.available_for_order) && $product.available_for_order && !isset($restricted_country_mode)}<span class="availability">{if ($product.allow_oosp || $product.quantity > 0)}{l s='Available'}{elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)}{l s='Product available with different options'}{else}{l s='Out of stock'}{/if}</span>{/if}
<br/><br/>I tried to replace this code in PS 1.4.0.17 and it did not worked for me ...

 

Wow! this is what i've been lookin out for months! Thanks for sharing salko! I believe many people will be helped after reading your solved thread! I did use PS 1.4.0.17 before, and it was failed in any ways! but now it's working!

 

Great job, man!

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...