delete custom customer attribute in magento -
i have created custom attribute customer in magento.
i have accidentally set wrong type attribute.
now want either modify attribute or delete 1 , create new attribute.
can 1 tell me whether can delete or modify custom attribute in magneto or not?
thanks in advance.
you can create upgrade script in 1 of modules content:
$this->updateattribute('customer', 'attribute_code_here', 'type', 'varchar'); //or other type
basically can change attribute customers, categories & products this;
$entitytype = 'customer';//or catalog_category or catalog_product $attributecode = 'attribute_code_here'; $changewhat = 'field_name_here'; $changeinto = 'new value here'; $this->updateattribute($entitytype, $attributecode, $changewhat, $changeinto);
to remove attribute run this:
$this->removeattribute('customer', 'attribute_code_here');
it follows same rules above.
Comments
Post a Comment