Out of Stock Text Not Showing

I’m having a little problem with my In stock and out of stock status text. For example, I have an item with 5 sizes: S, M, L, XL, XXL.



If all sizes are in stock: Everything works fine.

If all sizes are out of stock: Everything works fine.

If 3 sizes are in stock and 2 are out of stock: The In stock will show properly but there won’t be anything written for the ones out of stock.



Here is what I have in product_data.tpl

{if $show_product_amount}<br />
{capture name="product_amount_`$obj_id`"}<br />
{if $product.is_edp !== "Y" && $settings.General.inventory_tracking == "Y" && $product.tracking != "D"}<br />
{if $settings.Appearance.in_stock_field == "Y"}<br />
        <div class="form-field product-list-field"><br />
            <br />
            <label>{$lang.in_stock}:</label><br />
            <span id="qty_in_stock_{$obj_id}" class="qty-in-stock"><br />
            {if ($product.amount >= 0 && $product.amount > $product.min_qty) || $product.tracking != "B"}<br />
                {$product.amount} {$lang.items}<br />
            {/if}<br />
            </span><br />
        </div><br />
    {else}<br />
        {if ($product.amount > 0 && $product.amount > $product.min_qty) || $product.tracking != "B"}<br />
            	<p class="strong in-stock" id="in_stock_info_{$obj_id}">{$lang.in_stock}</p><br />
        {/if}<br />
        {if $settings.General.allow_negative_amount == "Y" && $product.amount <= 0}            <br />
		<p class="strong text_out_of_stock" id="in_stock_info_{$obj_id}">{$lang.text_out_of_stock}</p><br />
        {/if}<br />
{/if}<br />
{/if}<br />
{/capture}<br />
{/if}
```<br />
<br />
Any help is much appreciated.

I’ve managed to fix every single of my status issues by unchecking the box “Allow Negative Amount in Inventory”.



HOWEVER, I want customers to be able to add products to cart when stock is 0 because some products can be ordered from the manufacturer. Is there a way to fix this without using that box in the options?

In the product select the option…“allow customers to add product to cart” where you see Zero Price action.



You can do this on a bulk basis if you have many products or on csv import

JOhn

[quote name=‘johnbol1’]In the product select the option…“allow customers to add product to cart” where you see Zero Price action.



You can do this on a bulk basis if you have many products or on csv import

JOhn[/QUOTE]



Doesn’t work unfortunately. Not sure if that field is also supposed to work if stock is 0 but seems like it’s only if price is 0. Any other ideas?

[quote name=‘Philippe27’]Doesn’t work unfortunately. Not sure if that field is also supposed to work if stock is 0 but seems like it’s only if price is 0. Any other ideas?[/QUOTE]



I too was hoping that there was a way to allow users to be able to add products into their cart, even if my inventory is zero. I’d like people to be able to back order items, but keep an accurate inventory count in cs-cart.

Hello Dirtyimpreza & Philippe27,



If you want to add products with zero amount, you need to enable the “Allow negative amount in inventory” check box on the “Settings” page in the Administration panel of your store. But in this case you will not see the “Out of stock” label.







Anastasiya Kozlova

CS-Cart Support team

[quote name=‘CS-Cart Support team’]Hello Dirtyimpreza & Philippe27,



If you want to add products with zero amount, you need to enable the “Allow negative amount in inventory” check box on the “Settings” page in the Administration panel of your store. But in this case you will not see the “Out of stock” label.







Anastasiya Kozlova

CS-Cart Support team[/QUOTE]



Anastasiya-



Thank you for the tip regarding how to setup my store to allow negative quantities (back orders). Is it possible to only setup negative quantities on specific products? I don’t really want to enable this globally for the entire store, but i do want this feature for certain items.

Thank you for the reply, Dirtyimpreza



Unfortunately, you cannot enable the “Allow negative amount in inventory” check box for the necessary products, but you can select the “Do not track” option in the “Inventory” drop-down select box on the necessary product details page. In this case these products will not be tracked at all.





Anastasiya Kozlova

CS-Cart Support team