Monthly Archives: July 2011

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

Get magento page current url

echo Mage::help(’core/url’)->getCurrentUrl();

Posted in Uncategorized | Tagged , | Leave a comment

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 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

Add featured category products to cms home page

If you have a category with products( like the featured products) you can  include them in a cms page calling the template block  the following way: {{block type=”catalog/product_list” template=”catalog/product/list.phtml” category_id=”5″ column_count=”4″ }} You have to change category_id 5 for your … Continue reading

Posted in Categories, Cms | Tagged , , | Leave a comment