How can I set the product attribute to Use To Create Configurable Product “Yes” programmatically? The Next CEO of Stack OverflowCan't create Configurable Product with attribute errorDo I have to create a new attribute set for each configurable product?How can I use a custom source model for a multiselect product attribute in Magento 2get attribute to create configurable productcan't create configurable product programaticallyCustom Product attribute is not displaying while adding configurable product in Create New Attribute?Magento 2.1.9 - Provided attribute can not be used with configurable productMagento Update Configurable Product AttributeAttribute Set Restriction for Configurable Product Magento 2Create an Attribute Set and create a Product Attribute in Product Details Group for only One Attribute Set

How long to clear the 'suck zone' of a turbofan after start is initiated?

Implement the Thanos sorting algorithm

Why didn't Theresa May consult with Parliament before negotiating a deal with the EU?

Visit to the USA with ESTA approved before trip to Iran

How can I open an app using Terminal?

How to start emacs in "nothing" mode (`fundamental-mode`)

How to be diplomatic in refusing to write code that breaches the privacy of our users

How can I get through very long and very dry, but also very useful technical documents when learning a new tool?

How do I construct this japanese bowl?

Rotate a column

MAZDA 3 2006 (UK) - poor acceleration then takes off at 3250 revs

Was a professor correct to chastise me for writing "Prof. X" rather than "Professor X"?

How do I get the green key off the shelf in the Dobby level of Lego Harry Potter 2?

If the heap is initialized for security, then why is the stack uninitialized?

Example of a Mathematician/Physicist whose Other Publications during their PhD eclipsed their PhD Thesis

Why do remote companies require working in the US?

Does the Brexit deal have to be agreed by both Houses?

Anatomically Correct Mesopelagic Aves

Trouble understanding the speech of overseas colleagues

What is the difference between "behavior" and "behaviour"?

What is the point of a new vote on May's deal when the indicative votes suggest she will not win?

Need some help with wall behind rangetop

When airplanes disconnect from a tanker during air to air refueling, why do they bank so sharply to the right?

Failed to fetch jessie backports repository



How can I set the product attribute to Use To Create Configurable Product “Yes” programmatically?



The Next CEO of Stack OverflowCan't create Configurable Product with attribute errorDo I have to create a new attribute set for each configurable product?How can I use a custom source model for a multiselect product attribute in Magento 2get attribute to create configurable productcan't create configurable product programaticallyCustom Product attribute is not displaying while adding configurable product in Create New Attribute?Magento 2.1.9 - Provided attribute can not be used with configurable productMagento Update Configurable Product AttributeAttribute Set Restriction for Configurable Product Magento 2Create an Attribute Set and create a Product Attribute in Product Details Group for only One Attribute Set










2















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?










share|improve this question




























    2















    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?










    share|improve this question


























      2












      2








      2


      0






      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?










      share|improve this question
















      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?







      magento-1.8 configurable-product product-attribute






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 1 hour ago









      Teja Bhagavan Kollepara

      3,01241949




      3,01241949










      asked Mar 5 '14 at 6:29









      SukeshiniSukeshini

      6,5551457115




      6,5551457115




















          1 Answer
          1






          active

          oldest

          votes


















          1














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

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






          share|improve this answer























            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "479"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f16187%2fhow-can-i-set-the-product-attribute-to-use-to-create-configurable-product-yes%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














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

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






            share|improve this answer



























              1














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

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






              share|improve this answer

























                1












                1








                1







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

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






                share|improve this answer













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

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







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Apr 26 '14 at 14:48









                Diogo SantiagoDiogo Santiago

                1779




                1779



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Magento Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f16187%2fhow-can-i-set-the-product-attribute-to-use-to-create-configurable-product-yes%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Nidaros erkebispedøme

                    Birsay

                    Where did Arya get these scars? Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar Manara Favourite questions and answers from the 1st quarter of 2019Why did Arya refuse to end it?Has the pronunciation of Arya Stark's name changed?Has Arya forgiven people?Why did Arya Stark lose her vision?Why can Arya still use the faces?Has the Narrow Sea become narrower?Does Arya Stark know how to make poisons outside of the House of Black and White?Why did Nymeria leave Arya?Why did Arya not kill the Lannister soldiers she encountered in the Riverlands?What is the current canonical age of Sansa, Bran and Arya Stark?