Question

I'm having problem on displaying products that are in stock and out of stock in category page.

Here's the screenshot of my category.

enter image description here

Those 6 products doesn't have any quantity, in short they're out of stock. But what I want to happen is, even though they're out of stock, I want it to display on the list.

I already did this one

  1. Login to Magento backend
  2. Take menu System-Configuration.
  3. Take inventory tab from the left panel
  4. Set Display out of stock products to ‘Yes’ in Stock options tab in the right panel

But still, it doesn't work. Here's my code for it.

<?php
    $_productCollection=$this->getLoadedProductCollection();
    $_helper = $this->helper('catalog/output');
?>

And if I count the products

$_collectionSize = $_productCollection->count();
echo $_collectionSize;

The output is 0, any solution how to display the products even if they're out of stock? So if I echo it, it should say 6.

Was it helpful?

Solution

Magento product display setting is managed from Admin system setting.So,Please go to

admin>System Configuration>Catalog>Inventory>Stock Option>

and here Display Out of Stock Products change to yes for display all in stock and out stock products in category

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top