Magento Forum

Filtering tags
 
joey santiago
Sr. Member
 
Total Posts:  76
Joined:  2009-02-25
 

In code/core/Mage/Tag/Model/Mysql4/Tag/Collection.php (if i understood well, it is the class called by Mage::getResourceModel(’tag/tag_collection’) ) there’s a function called public function addProductFilter($productId) that i would like to use to filter the tags in pending by some products ids…

But can anyone explain me why my code breaks when i try to use any filter function? Something like

$collection Mage::getResourceModel('tag/tag_collection')
            ->
addSummary(0)
            ->
addStoresVisibility()
            ->
addStatusFilter(Mage_Tag_Model_Tag::STATUS_PENDING)
            ->
addProductFilter(5);

breaks everything and redirects me to the home page.
Please, help me out for i can’t help myself…

 
Magento Community Magento Community
Magento Community
Magento Community
 
joey santiago
Sr. Member
 
Total Posts:  76
Joined:  2009-02-25
 

GOT IT!!!

need to call the function joinRel() before filtering per product!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top