View gist:2376792
$installer = new Mage_Eav_Model_Entity_Setup('core_setup');
$entityTypeId = $installer->getEntityTypeId('catalog_product');
// replace <my_attribute_code> with your attribute code
$idAttribute = $installer->getAttribute($entityTypeId, '<my_attribute_code>', 'attribute_id');
$installer->updateAttribute($entityTypeId, $idAttribute, array(
'backend_type' => 'varchar'
));
// let's see if it worked
$attribute = Mage::getModel('eav/entity_attribute')->loadByCode('catalog_product', '<my_attribute_code>');
View gist:3083037
$myDate = '07/10/12';//2012-07-10
$format = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);
$date = Mage::app()->getLocale()->date(
$myDate,
Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT),
null,
false
);
View Configuration.php
/**
* {@inheritDoc}
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('my_root');
$rootNode
->children()