-
Notifications
You must be signed in to change notification settings - Fork 2
/
b3.php
59 lines (52 loc) · 2.68 KB
/
b3.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
/**
* @package Eternal_Megamenu
* @author Eternal Friend
* @copyright Copyright 2014
*/
require_once('app/Mage.php');
Mage::app()->setCurrentStore(Mage::getModel('core/store')->load(Mage_Core_Model_App::ADMIN_STORE_ID));
$installer = new Mage_Sales_Model_Mysql4_Setup; //Mage_Eav_Model_Entity_Setup,Mage_Catalog_Model_Resource_Setup,
$installer->startSetup();
$installer->updateAttribute('catalog_category', 'sw_cat_block_type', 'is_required', 0, '10');
$installer->updateAttribute('catalog_category', 'sw_cat_static_width', 'note', 'The width of the static width megamenu popup. eg: 600px', '11');
$installer->updateAttribute('catalog_category', 'sw_cat_block_columns', 'is_required', 0, '12');
$installer->updateAttribute('catalog_category', 'sw_cat_block_top', 'is_required', 0, '31');
$installer->updateAttribute('catalog_category', 'sw_cat_left_block_width', 'is_required', 0, '40');
$installer->updateAttribute('catalog_category', 'sw_cat_block_left', 'is_required', 0, '41');
$installer->updateAttribute('catalog_category', 'sw_cat_right_block_width', 'is_required', 0, '50');
$installer->updateAttribute('catalog_category', 'sw_cat_block_right', 'is_required', 0, '51');
$installer->updateAttribute('catalog_category', 'sw_cat_block_bottom', 'is_required', 0, '60');
$installer->updateAttribute('catalog_category', 'sw_cat_label', 'is_required', 0, '14');
$installer->updateAttribute('catalog_category', 'sw_cat_float_type', 'is_required', 0, '13');
$installer->addAttribute('catalog_category', 'sw_icon_image', array(
'type' => 'varchar',
'label' => 'Icon Image',
'input' => 'image',
'backend' => 'catalog/category_attribute_backend_image',
'required' => false,
'sort_order' => 15,
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
'group' => 'Menu'
));
$installer->addAttribute('catalog_category', 'sw_font_icon', array(
'group' => 'Menu',
'label' => 'Font Icon Class',
'note' => 'If this category has no "Icon Image", font icon will be shown. example to input: icon-dollar',
'type' => 'text',
'input' => 'text',
'visible' => true,
'required' => false,
'backend' => '',
'frontend' => '',
'searchable' => false,
'filterable' => false,
'comparable' => false,
'user_defined' => true,
'visible_on_front' => true,
'wysiwyg_enabled' => true,
'is_html_allowed_on_front' => true,
'sort_order' => 16,
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE
));
$installer->endSetup();