I am trying to get a collection of products according to filters applied in layered navigation.

I thought, that layer model's getProductCollection will do it for me, but as long as i see, it retrieves all products in the category without filters applied.

$productCollection = Mage::getModel('catalog/layer')
        throw new \Exception(print_r($productCollection->load()->getSelectSql(1),1));

How can i get what i need?

1 Answer 1


you can try this :

$productCollection= Mage::getSingleton('catalog/layer')->getProductCollection();

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.