2013 June

Add Category Filter on Product Collection In Magento

Here is the code to add category filter on the product collection $productcollection = Mage::getModel(‘catalog/product’)->getCollection();$productcollection = $productcollection->addCategoryFilter(Mage::getModel(‘catalog/category’)->load($currcategory),true);$productcollection = $productcollection->addAttributeToFilter(‘special_price’, array(‘gt’…

Current page variable in magento

Get title <?=Mage::getSingleton(‘cms/page’)->getTitle()?> Get Identifier <? echo Mage::getBlockSingleton(‘cms/page’)->getPage()->getIdentifier()?> Get Page ID <? echo Mage::getBlockSingleton(‘cms/page’)->getPage()->getId()?>

1 2 3 4 8