1

I am new in Magento i want to filter product on the basis of attribute such as year, make, model so how can it will done.

on home page i call one template file i.e filter.phtml

In this file i create simple form for filter product from its attribute year: to get year i call block method $this->getYear() in year dropdown list. like wise for model and make. On form action i called controller as Mage::getUrl('ymm/index/filter'). So now i am getting post data in block using getRequest()->getPost() or getParam() mothod.
So now my question is how can we filter product on the basis of post data attribute?

Thanks for reply...........

2

Use addAttributeToFilter

http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/using_collections_in_magento

hope this helps

  • 1
    Your answer should contain more detail. – benmarks Jul 28 '13 at 12:53

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.