Reputation: 1539
Hi guys I am working in magento 1.9 i want to add new custom system attribute like we have by default name, sku etc.
$_attribute_data = array(
'attribute_code' => $wholedata['attribute_code'],
'is_global' => '1',
'frontend_input' => 'text',
'default_value_text' => '',
'default_value_yesno' => '0',
'default_value_date' => '',
'default_value_textarea' => '',
'is_unique' => '0',
'is_required' => '0',
//'apply_to' => '0',
'is_configurable' => '0',
'is_searchable' => '0',
'is_visible_in_advanced_search' => '1',
'is_comparable' => '0',
'is_used_for_price_rules' => '0',
'is_wysiwyg_enabled' => '0',
'is_html_allowed_on_front' => '1',
'is_visible_on_front' => '0',
'used_in_product_listing' => '0',
'used_for_sort_by' => '0',
'frontend_label' => $wholedata['attribute_label'],
'user_defined' => false
);
I have created attribute using these settings but its still not system attribute i have searched a lot and find this solution to make
'user_defined' => false
for system attribute it must be false but still its not making as a system attribute in admin panel attributes list its showing system no on this newly created attribute.
Upvotes: 0
Views: 828
Reputation: 11
You can change is_user_defined to 0 in table eav_attribute it will make that attribute to system
Upvotes: 1
Reputation: 26
You can try add this param 'is_system' => 1
to your attribute data, that would solve your issue.
Hope that help
Upvotes: 0