Tag Archives: categoryfilter

Magento query filter by category and attribute

We know how to show up the products of a category in a cms page. But what if we wanna filter them by an attribute? Here is an example where $category_id is a given category ID, $currentPage the number of … Continue reading

Posted in Categories, Queries | Tagged , , , , | 3 Comments

Magento category bestseller

The first subject I tackle is the bestseller. I will extend the exemple provided by inchoo net for the magento product bestseller. First download the code. Modify the following lines from bestseller.phtml $_productCollection = Mage::getResourceModel(’reports/product_collection’) ->addAttributeToSelect(’*') ->addOrderedQty() ->addAttributeToFilter(’visibility’, $visibility) ->setOrder(’ordered_qty’, … Continue reading

Posted in bestseller | Tagged , , , , , | 6 Comments