Tag Archives: products

How to get the newest products of magento current category

If you ever need listing the newest products of magento current category (or even of a category given by it’s Id, see the code comments) <?php $totalPerPage = ($this->show_total) ? $this->show_total : 9; $visibility = array( Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH, Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG );   … Continue reading

Posted in Categories, Products | Tagged , , | 2 Comments

Magento new products

New products is one of the useful feature required for a magento site. Below is a short example how to have this. You can call this in a cms page. $totalPerPage = ($this->show_total) ? $this->show_total : 9; $visibility = array( … Continue reading

Posted in Products | Tagged , | Leave a comment

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