Useful Tricks

This section contains some useful programming tricks.
Send mail with queue in magento 1.9.2

Make copy /app/code/core/Mage/Core/Model/Email/Template.phpToapp/code/Local/Mage/Core/Model/Email/Template.php Make the condition false near about line number 407Current Code if ($this->hasQueue() && $this->getQueue() instanceof Mage_Core_Model_Email_Queue) {           …

Want to add to cart configrurable product instead of drop down–

<!– FOR THE ASSOCIATED PRODUCTS–><?php  $config_product_id = Mage::registry(‘current_product’)->getId();?><?php  //if ($_product->isSaleable() && count($_attributes)):?><?php  $product=Mage::getModel(‘catalog/product’)->load($config_product_id);  $productAttributeOptions = $product->getTypeInstance(true)->getConfigurableAttributesAsArray($product);   $attributeOptions = array();     $ids…

Category Custom attribute

<?php $setup = new Mage_Eav_Model_Entity_Setup(‘core_setup’); $setup->removeAttribute(‘catalog_category’,’category_color’); $setup->addAttribute(‘catalog_category’, ‘category_color’, array(     ‘group’         => ‘General Information’,     ‘input’         => ‘select’,     ‘type’         …

1 2 3 4 42