I have an existing attribute for an embed code. I need to associate this attribute with 120+ existing attribute sets.
If I know the attribute set id, ho
for people having problems with the code above,
like: Call to a member function getModelInstance() on a non-object
you need to add the following to to top of your file:
include 'app/Mage.php';
Mage::app();
edit:
im using magento 1.8.1.0 and the code still didn't work
i had to add the following line to $newItem, this way the validation passes
->setAttributeCode($attCode)