I am using Magento 1.9
I have created one custom listing page and in this page I have displayed all products. I have added below code for collection.
$_productCollection = Mage::getModel('catalog/product')->getCollection() ->addAttributeToSelect('*') ->addAttributeToFilter('status', Mage_Catalog_Model_Product_Status::STATUS_ENABLED) ->addFieldToFilter('visibility', Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH) ->setPageSize(30);
Now I want to hide out of stock products as well So how can I achieve this using above code?
I also want to show only limited no. of products selected in limiter.
Right now I have set 30 products per page(look above code) so whenever I click on "60" from limiter it only shows 30 products per page instead of 60 product per page.
So how can I fix this?