Sergey
Sergey

Reputation: 258

Magento layered product collection

How to get filtered products collection ids in extention. For current category we just getting Mage::registry('current_category')->getProductCollection()->getAllIds(), and how we can retrive already filtered product collection (really not product collection, but all already filtered product Ids)

Upvotes: 1

Views: 2965

Answers (1)

WojtekT
WojtekT

Reputation: 4775

For getting already filtered product collection You can use following code:

$filteredList = $this->getLayout()
        ->getBlockSingleton('catalog/product_list')
        ->getLoadedProductCollection();

This code should be executed from within a block.

Upvotes: 6

Related Questions