Search This Blog

Tuesday 30 July 2013

Remove index.php from Magento admin URL

Thursday 18 July 2013

Add custom field / attribute to Google Calendar Event using API

An extended property is an arbitrary name/value pair that can be added to an event and retrieved via the API. It is not accessible from the calendar web interface.

https://developers.google.com/gdata/docs/2.0/elements?hl=fr#gdExtendedProperty

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/