I'm making a module that to order reviews. In de mage-admin I added an extra field which gets saved into a new table review_featured review_featured structure

On the product page I want to sort it based on the featured_number

in template/review/product/view/list.phtml there is the line: $_items = $this->getReviewsCollection()->getItems();

in \Mage_Review_Block_Product_View::getReviewsCollection() I do see filters but how do I add my table to that?

How can I:

  1. Join my table review_featured when fetching items through the reviews collection?
  2. Sort the collection based on the review_featured.featured_number?

The module is set up using multiple sources mainly and official.

1 Answer 1


You can hook into review_review_collection_load_before and join() your table: \Mage_Core_Model_Resource_Db_Collection_Abstract::join

Then you can either \Varien_Data_Collection_Db::addOrder or \Varien_Data_Collection_Db::unshiftOrder

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.