I've created an product attribute by using a script. Now in my Model I want to set that attribute's Use To Create Configurable Product property to "Yes" based on some conditions. How can I achieve this?

$attributeId =  Mage::getResourceModel('eav/entity_attribute')->getIdByCode('catalog_product','your_attr');

if ($attributeId) {
    $attribute = Mage::getModel('catalog/resource_eav_attribute')->load($attributeId);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.