Jump to content

Availability in Product-List.tpl


Recommended Posts

Hi i am attempting to configure the availability of products in the product list. It's kinda sorta working.

 

If quantity > 0 the product shows as In Stock as is expected.

If quantity = 0 and the product is set to Deny out of stock ordering the product shows as Pre-Order in the product list as expected.

However if quantity = 0 and the product is set to Allow out of stock ordering the product shows as In Stock when it should show as pre-order. What am i doing wrong?

{if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.minimal_quantity <= 1 && $product.customizable != 2 && !$PS_CATALOG_MODE}
                                                
                                                {if ($product.allow_oosp || $product.quantity > 0)}
                                                    {if isset($static_token)}
                                                        <span class="in-stock">{l s='In Stock'}</span>
                                                    {else}
                                                    <span class="out-of-stock">{l s='In Stock'}</span>
                                                    {/if}                                               
                                                {else}
                                                    <span class="out-of-stock">{l s='Pre-Order'}</span>
                                                {/if}
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...