मैं एक अतिरिक्त श्रेणी एट्रिब्यूट को जोड़ने की कोशिश कर रहा हूं सामान्य इन्फ़ोमेशन टैब मैंने कोशिश की है कि निम्नलिखित कोड का उपयोग करके,
require_once("app/Mage.php");
Mage::app('default');
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
$installer = new Mage_Eav_Model_Entity_Setup('core_setup');
$entityTypeId = $installer->getEntityTypeId('catalog_category');
$attributeSetId = $installer->getDefaultAttributeSetId($entityTypeId);
$attributeGroupId = $installer->getDefaultAttributeGroupId($entityTypeId, $attributeSetId);
$installer->addAttribute('catalog_category', 'nav_left', array(
'type' => 'tinyint',
'label' => 'Show in left navgigation',
'input' => 'boolean',
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
'visible' => true,
'required' => false,
'user_defined' => false,
'default' => 0
));
$installer->addAttributeToGroup(
$entityTypeId,
$attributeSetId,
$attributeGroupId,
'nav_left',
'11'
//last Magento's attribute position in General tab is 10
);
$attributeId = $installer->getAttributeId($entityTypeId, 'nav_left');
$installer->run("
INSERT INTO `{$installer->getTable('catalog_category_entity_int')}`
(`entity_type_id`, `attribute_id`, `entity_id`, `value`)
SELECT '{$entityTypeId}', '{$attributeId}', `entity_id`, '1'
FROM `{$installer->getTable('catalog_category_entity')}`;
");
यह सिर्फ ठीक काम कर रहा है, लेकिन यह अतिरिक्त सूचना टैब को जोड़ रहा है, जिसका नाम Generalसिर्फ general infomation tabi के दाईं ओर है, इसे पहले टैब में attributeGroupIdसेट 4 का उपयोग करके जोड़ने की कोशिश की गई है, लेकिन परीक्षण के बाद यह साइट को दुर्घटनाग्रस्त कर रहा है।
किसी भी विचार मैं उस विशेषता को पहले टैब में कैसे जोड़ सकता हूं।