4 added 484 characters in body
source | link

You have to add a filter to your collection. And the event is great, best choice.

if(Mage::app()->getRequest()->getParam('sale')) {
    $collection = $observer->getCollection();
    $collection->setPageSize(5);
}

Good catch this observer.

To define the "order" of the observer (which shouldn't be relied on) you can just add a <depends> in your Module.xml in app/etc/modules/Company_Module.xml:

<config>
    <modules>
        <Mage_Eav>
            <active>true</active>
            <codePool>core</codePool>
            <depends>
                <Mage_Core/>
            </depends>
        </Mage_Eav>
    </modules>
</config>

And what you want your Module to depend on is Mage_Review

You have to add a filter to your collection. And the event is great, best choice.

if(Mage::app()->getRequest()->getParam('sale')) {
    $collection = $observer->getCollection();
    $collection->setPageSize(5);
}

You have to add a filter to your collection. And the event is great, best choice.

if(Mage::app()->getRequest()->getParam('sale')) {
    $collection = $observer->getCollection();
    $collection->setPageSize(5);
}

Good catch this observer.

To define the "order" of the observer (which shouldn't be relied on) you can just add a <depends> in your Module.xml in app/etc/modules/Company_Module.xml:

<config>
    <modules>
        <Mage_Eav>
            <active>true</active>
            <codePool>core</codePool>
            <depends>
                <Mage_Core/>
            </depends>
        </Mage_Eav>
    </modules>
</config>

And what you want your Module to depend on is Mage_Review

3 deleted 33 characters in body
source | link

You have to add a filter to your collection. And the event is great, best choice.

if(Mage::app()->getRequest()->getParam('sale')) {
    $collection = $observer->getCollection();
    $collection->addAttributeToFilter('sale', 1)->setPageSize(5);
}

You have to add a filter to your collection. And the event is great, best choice.

if(Mage::app()->getRequest()->getParam('sale')) {
    $collection = $observer->getCollection();
    $collection->addAttributeToFilter('sale', 1)->setPageSize(5);
}

You have to add a filter to your collection. And the event is great, best choice.

if(Mage::app()->getRequest()->getParam('sale')) {
    $collection = $observer->getCollection();
    $collection->setPageSize(5);
}
2 added 16 characters in body
source | link

You have to add a filter to your collection. And the event is great, best choice.

if(Mage::app()->getRequest()->getParam('sale')) {
    $collection = $observer->getCollection();
    $collection->addAttributeToFilter('sale', 1)->setPageSize(5);
}

You have to add a filter to your collection. And the event is great, best choice.

if(Mage::app()->getRequest()->getParam('sale')) {
    $collection = $observer->getCollection();
    $collection->addAttributeToFilter('sale', 1);
}

You have to add a filter to your collection. And the event is great, best choice.

if(Mage::app()->getRequest()->getParam('sale')) {
    $collection = $observer->getCollection();
    $collection->addAttributeToFilter('sale', 1)->setPageSize(5);
}
1
source | link