Skip to content

Instantly share code, notes, and snippets.

@enru
Last active March 28, 2016 18:23
Show Gist options
  • Select an option

  • Save enru/1385712 to your computer and use it in GitHub Desktop.

Select an option

Save enru/1385712 to your computer and use it in GitHub Desktop.
insert Magento category attribute
INSERT INTO `eav_attribute` (`entity_type_id`,
`attribute_code`,
`attribute_model`,
`backend_model`,
`backend_type`,
`backend_table`,
`frontend_model`,
`frontend_input`,
`frontend_input_renderer`,
`frontend_label`,
`frontend_class`,
`source_model`,
`is_global`,
`is_visible`,
`is_required`,
`is_user_defined`,
`default_value`,
`is_searchable`,
`is_filterable`,
`is_comparable`,
`is_visible_on_front`,
`is_html_allowed_on_front`,
`is_unique`,
`is_visible_in_advanced_search`,
`is_configurable`,
`apply_to`,
`position`,
`note`,
`is_used_for_price_rules`,
`is_filterable_in_search`,
`used_in_product_listing`,
`used_for_sort_by`) VALUES (
9,
'size_converter',
NULL,
'',
'varchar',
'',
'',
'text',
NULL,
'Size Converter',
NULL,
'',
0,
1,
0,
0,
'',
0,
0,
0,
0,
0,
0,
0,
1,
'',
1,
'',
1,
0,
0,
0);
INSERT INTO `eav_entity_attribute` (`entity_attribute_id`,
`entity_type_id`,
`attribute_set_id`,
`attribute_group_id`,
`attribute_id`,
`sort_order`) VALUES (
null,
9,
12,
7,
964,
27);
insert into catalog_category_entity_varchar select null, 3, 703, 0, entity_id, NULL from catalog_category_entity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment