Tuesday, 9 July 2013
Monday, 8 July 2013
Friday, 5 July 2013
Adding new / update / delete category attribute in Magento
<?php
/** @var $this Mage_Eav_Model_Entity_Setup */
$this->startSetup();
/** Remove existing atribute */
$this->removeAttribute('catalog_category', 'size_chart');
/** Add new atribute */
$this->addAttribute('catalog_category', 'short_description', array(
'group' => 'General Information',
'input' => 'textarea',
'type' => 'text',
'label' => 'Short Description',
//'source' => 'categoryattributes/source_sizechart',
'backend' => '',
'visible' => 1,
'required' => 0,
'user_defined' => 1,
'note' => 'Category Short Description will be shown in bottom 3 boxes of other category pages',
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
));
/** Update existing atribute */
$categoryEntityTypeId = $this->getEntityTypeId('catalog_category');
$this->updateAttribute($categoryEntityTypeId, 'short_description', 'is_wysiwyg_enabled', 0);
$this->updateAttribute($categoryEntityTypeId, 'short_description', 'is_html_allowed_on_front', 0);
$this->endSetup();
?>
http://www.atwix.com/magento/add-category-attribute/
Thursday, 4 July 2013
Check Module existance in Magento
Following snippet can determine wether the module installed and it is active:
$modules = (array)Mage::getConfig()->getNode('modules')->children();
if (isset($modules['Company_Module']) && $modules['Company_Module']->is('active')) {
// Do something
}
$modules = (array)Mage::getConfig()->getNode('modules')->children();
if (isset($modules['Company_Module']) && $modules['Company_Module']->is('active')) {
// Do something
}
Installing APC Cache and setting up in Magento
http://www.euperia.com/website-performance-2/how-to-add-apc-cache-to-magento/799
http://magento2x.com/apc-configuration-for-magento/
http://www.aitoc.com/en/blog/apc_speeds_up_Magento.html
http://www.magentocommerce.com/boards/viewthread/8937/P45/
http://www.designguru.org/blog/120810/how-install-apc-media-temples-gridserver-accounts
http://magento2x.com/apc-configuration-for-magento/
http://www.aitoc.com/en/blog/apc_speeds_up_Magento.html
http://www.magentocommerce.com/boards/viewthread/8937/P45/
http://www.designguru.org/blog/120810/how-install-apc-media-temples-gridserver-accounts
Wednesday, 3 July 2013
Subscribe to:
Posts (Atom)