Creating attribute sets and attributes programatically magento
Posted
by
digital_paki
on Stack Overflow
See other posts from Stack Overflow
or by digital_paki
Published on 2012-04-13T20:25:20Z
Indexed on
2012/04/13
23:29 UTC
Read the original article
Hit count: 179
I am using the code listed on the following link =:
Everything works until the point:
// Just add a default group.
else
{
$this->logInfo("Creating default group [{$this->groupName}] for set.");
$modelGroup = Mage::getModel('eav/entity_attribute_group');
$modelGroup->setAttributeGroupName($this->groupName);
$modelGroup->setAttributeSetId($id);
// This is optional, and just a sorting index in the case of
// multiple groups.
// $modelGroup->setSortOrder(1);
$model->setGroups(array($modelGroup));
}
I am unsure where the object reference would need to be set from - I am attempting to have this as a separate file that can be automated - I am running this file by doing a
require_once 'app/Mage.php'; Mage::app();
Any help in this would be greatly appreciated
Thanks
© Stack Overflow or respective owner