0

I have Magento set to show out of stock products but currently if someone accesses the product link directly, there is no message indicating that the product is out of stock. The Add To Cart button does not show, but I expected a message to show in it's place. How do I add this?

1 Answer 1

2

In my catalog.xml i have found this, for simple product

<PRODUCT_TYPE_simple translate="label" module="catalog">
        <label>Catalog Product View (Simple)</label>
        <reference name="product.info">
            <block type="catalog/product_view_type_simple" name="product.info.simple" as="product_type_data" template="catalog/product/view/type/default.phtml">
                <block type="core/text_list" name="product.info.simple.extra" as="product_type_data_extra" translate="label">
                    <label>Product Extra Info</label>
                </block>
            </block>
            <block type="catalog/product_view_type_simple" name="product.info.availability" as="product_type_availability" template="catalog/product/view/type/availability/default.phtml" />
        </reference>
</PRODUCT_TYPE_simple>

The template that is responsible with "in stock" and "out of stock" messages is catalog/product/view/type/availability/default.phtml

<block type="catalog/product_view_type_simple" name="product.info.availability" as="product_type_availability" template="catalog/product/view/type/availability/default.phtml" />

You will need to add it, as well for PRODUCT_TYPE_configurable, PRODUCT_TYPE_grouped, and PRODUCT_TYPE_virtual

2
  • Thanks. Your answer got me thinking, and it turns out I had disabled 'Display products availability in stock in the frontend' in Admin-System-Configuration-Inventory. Enabling this gives me in stock/out of stock messages which will work fine for now.
    – k1rah
    Feb 20, 2016 at 23:34
  • Nice :D ... Good luck ! Feb 20, 2016 at 23:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.