my current goal is to add a new customer attribute (with int type) which should appear as select with predefined options (loaded from a model with entries editable in backend, which is done).
I’m struggling with proper use of $installer->addAttribute() method, especially specifying correct source option. Other problem is the new attribute isn’t saved to eav_entity_attribute table
I’m on Magento CE 1.5.1.0
This is the code for a basic
intattribute withtextrenderer:The unusual step for adding attributes is the
setData('used_in_forms')this seems to be unique to customer attributes. Without it, the field won’t get rendered, certainly not in the adminhtml anyway. You can see the valid options for this array in thecustomer_form_attributedatabase table.In terms of using a
selectwith predefined options, this is what you need:And here is a walk-through on using a custom source for your drop-down
Hope this helps,
JD