Jump to content

stock notice on product list page


r2get

Recommended Posts

Hello,

 

Prestashop has stock management wich allows to give the end users the information if a product is in stock or not

 

When you have a product with several sizes it show on the product page that a product is available with diffrent options when some sizes are sold out (wich is good)

 

But on the product list page it can also show if a product is sold out

 

The problem is that when a product has a few sizes sold out it shows "unavailible" on the product list page, but it must show something like limeted in stock but it doesnt?

 

the code from product list

 

{if ($product.allow_oosp || $product.quantity > 0)}<font color="#757575"> </font>{elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)}<font color="#757575">{l s='Product available with different options'}</font>{else}<font color="#757575">{l s='Out of stock'}</font>{/if}
</font>

 

the website www.loavies.com (because its a production website i have diabled the code on the product list site.

 

Why doesnt it display {l s='Product available with different options'} when not everything is sold out? it just shows out of stock

 

How can i fix this?

Link to comment
Share on other sites

Unrelated remark: instead of

<font color="#757575"></font>

I suggest to use

<span style="color: #757575"></span>

 

The font tag has been deprecated for a long time...

 

That said, perhaps you should put something in the first condition, to see if it is triggered.

Also perhaps include unconditionally {$product.quantity_all_versions} to verify if it is set.

 

Apparently, you have either product.quantity or product.quantity_all_versions, not both.

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