Last active
August 29, 2015 14:01
-
-
Save martisj/c1f6cbc5bc112480c8d9 to your computer and use it in GitHub Desktop.
Add Attribute to attributeset default and group general
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$setup = new Mage_Eav_Model_Entity_Setup('core_setup'); | |
// Add attributes to the various sets | |
$attributeId = $setup->getAttribute('catalog_product', 'teaser'); | |
$attributeSetId = $setup->getAttributeSetId('catalog_product', 'Default'); | |
//Get attribute group info | |
$attributeGroupId = $setup->getAttributeGroup('catalog_product', $attributeSetId, 'General'); | |
//add attribute to a set | |
$setup->addAttributeToSet('catalog_product', $attributeSetId, $attributeGroupId, $attributeId); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment