is it possible to only show products £1000 or under across an entire shop? Or is there custom XML code you can apply on a per category basis?


You should add a filter in product collection like this:

$collection = Mage::getModel('catalog/product')->getCollection()
                     ->addAttributeToFilter('price',array('from' => 0, 'to' => 1000))


You should rewrite Catalog/Block/product/List.php to custom _getProductCollection() method.

Follow this link: How to override core catalog block product list?

  • Many thanks Price. I tried this in list.php where there is a reference to $_productCollection=$this->getLoadedProductCollection(); Am I editing the wrong file? – Mike Jan 26 '17 at 18:27
  • You can find the list.phtml in app/design/frontend/package/theme/template/catalog/product/list.phtml – Aamir Jan 26 '17 at 18:59
  • yeah got the right file, but do I replace $_productCollection=$this->getLoadedProductCollection(); with your code or change the reference to $collection in your code to $_productCollection ? – Mike Jan 26 '17 at 20:30
  • No, you can't add my code in a phtml, you should rewrite a block who prepare a collection of this list.phtml on your local then you add a filter price in that collection. – Aamir Jan 26 '17 at 21:09
  • Look my answer, then validate the answer if you see that it helped you. – Aamir Jan 27 '17 at 8:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.