-
Notifications
You must be signed in to change notification settings - Fork 2
/
b2.php
37 lines (31 loc) · 1.21 KB
/
b2.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
<?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->addAttribute('catalog_category', 'sw_cat_float_type', array(
'group' => 'Menu',
'label' => 'Float',
'note' => "This field is applicable only for top-level categories.",
'type' => 'varchar',
'input' => 'select',
'source' => 'megamenu/category_attribute_source_type_float',
'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();