M
M
Maybe_V2016-07-16 00:20:42
PHP
Maybe_V, 2016-07-16 00:20:42

How to set attribute set programmatically?

I programmatically create an attribute set:

$entityTypeId = Mage::getModel('catalog/product')
    ->getResource()
    ->getEntityType()
    ->getId();

$attributeSet = Mage::getModel('eav/entity_attribute_set')
    ->setEntityTypeId($entityTypeId)
    ->setAttributeSetName('mage_set');

$attributeSet->validate();
$attributeSet->save();

$attributeSet->initFromSkeleton($skeletonID)->save();

But this set is not based on the dafaul set, that is, there is no way to set a name, etc. This is what the form looks like:
bdd947eee8d745308fef58789e702c20.png
How do I programmatically specify that my set is based on the standard ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Ad4ptec, 2016-07-16
@prokopov-vi

Here is the answer to your question magento.stackexchange.com/questions/46358/add-cust...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question