-
Notifications
You must be signed in to change notification settings - Fork 2
/
c2.php
101 lines (94 loc) · 3.77 KB
/
c2.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<?php
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();
if(!$installer->getAttribute('catalog_category', 'sw_product_staticblock_tab_6', 'attribute_id')){
$installer->addAttribute('catalog_category', 'sw_product_staticblock_tab_6', array(
'group' => 'Product Custom Tabs',
'label' => 'CMS Block Tab #6',
'note' => "",
'type' => 'varchar',
'input' => 'select',
'source' => 'porto/category_attribute_source_tab_mode',
'visible' => true,
'required' => false,
'backend' => '',
'frontend' => '',
'searchable' => false,
'filterable' => false,
'comparable' => false,
'user_defined' => true,
'visible_on_front' => true,
'wysiwyg_enabled' => false,
'is_html_allowed_on_front' => false,
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
));
}
if(!$installer->getAttribute('catalog_category', 'sw_product_staticblock_tab_7', 'attribute_id')){
$installer->addAttribute('catalog_category', 'sw_product_staticblock_tab_7', array(
'group' => 'Product Custom Tabs',
'label' => 'CMS Block Tab #7',
'note' => "",
'type' => 'varchar',
'input' => 'select',
'source' => 'porto/category_attribute_source_tab_mode',
'visible' => true,
'required' => false,
'backend' => '',
'frontend' => '',
'searchable' => false,
'filterable' => false,
'comparable' => false,
'user_defined' => true,
'visible_on_front' => true,
'wysiwyg_enabled' => false,
'is_html_allowed_on_front' => false,
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
));
}
if(!$installer->getAttribute('catalog_category', 'sw_product_staticblock_tab_8', 'attribute_id')){
$installer->addAttribute('catalog_category', 'sw_product_staticblock_tab_8', array(
'group' => 'Product Custom Tabs',
'label' => 'CMS Block Tab #8',
'note' => "",
'type' => 'varchar',
'input' => 'select',
'source' => 'porto/category_attribute_source_tab_mode',
'visible' => true,
'required' => false,
'backend' => '',
'frontend' => '',
'searchable' => false,
'filterable' => false,
'comparable' => false,
'user_defined' => true,
'visible_on_front' => true,
'wysiwyg_enabled' => false,
'is_html_allowed_on_front' => false,
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
));
}
if(!$installer->getAttribute('catalog_category', 'sw_product_staticblock_tab_9', 'attribute_id')){
$installer->addAttribute('catalog_category', 'sw_product_staticblock_tab_9', array(
'group' => 'Product Custom Tabs',
'label' => 'CMS Block Tab #9',
'note' => "",
'type' => 'varchar',
'input' => 'select',
'source' => 'porto/category_attribute_source_tab_mode',
'visible' => true,
'required' => false,
'backend' => '',
'frontend' => '',
'searchable' => false,
'filterable' => false,
'comparable' => false,
'user_defined' => true,
'visible_on_front' => true,
'wysiwyg_enabled' => false,
'is_html_allowed_on_front' => false,
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
));
}
$installer->endSetup();