Here is the code to get the cms block in magento front end. $this->getLayout()->createBlock(‘cms/block’)->setBlockId(‘blockidentifier’)->toHtml() In the editor you can simply…
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’…
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()?>
Getting all options of a specific magento configurable product attribute is fairly easy: getAttribute(‘catalog_product’, ‘color’); foreach ($attribute->getSource()->getAllOptions(true) as $option) {…
Below are the 2 different way to display the product count in the category in magento. <?php $catObj = Mage::getModel(‘catalog/category’)->load($_category->getID()); $prodObj =…
<select name=”” style=”width:220px;” onchange=”location.href=this.value”> <?php $children = Mage::getModel(‘catalog/category’)->getCategories(YOUR_CAT_ID); ?> <?php foreach ($children as $category) { $i++; $cat = Mage::getModel(‘catalog/category’)->load($category->getID()); ?> <option…
1. Take the backup of your current database 2. Run the below queries 3. I have not fully tested that…
Here is the code to fetch the attribute (that should be configurable in magento database) from the CRE Loaded database…
Here, I will show you, how you can change your order status programmatically (with PHP coding). First, you need to…
Transferring one opensource database to other is a common headache.Recently i faced this problem when i need to move the…