Tuesday, March 22, 2016

Add option to customer attribute programmatically In Magento

To programmatically Add option to customer attribute , Add the function given in the reference url to your controller or block:

http://blog.onlinebizsoft.com/magento-programmatically-insert-new-attribute-option/

And replace the below code

 $attribute_code         = $attribute_model->getIdByCode('catalog_product', $arg_attribute);
  

To

 $attribute_code         = $attribute_model->getIdByCode('customer', $arg_attribute);
  

No comments:

Post a Comment