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

Increase performance creating Mandelbrot set in python

If I blow insulation everywhere in my attic except the door trap, will heat escape through it?

How to make a variable always equal to the result of some calculations?

Are there languages with no euphemisms?

Natural language into sentence logic

Unreliable Magic - Is it worth it?

Whats the best way to handle refactoring a big file?

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

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

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

What can we do to stop prior company from asking us questions?

Why is there a PLL in CPU?

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

Can I equip Skullclamp on a creature I am sacrificing?

Would this house-rule that treats advantage as a +1 to the roll instead (and disadvantage as -1) and allows them to stack be balanced?

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

Can a single photon have an energy density?

What happens if you roll doubles 3 times then land on "Go to jail?"

Does it take more energy to get to Venus or to Mars?

How should I support this large drywall patch?

Why does C# sound extremely flat when saxophone is tuned to G?

How did people program for Consoles with multiple CPUs?

How to Reset Passwords on Multiple Websites Easily?

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 31 mins 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

                    “%fieldName is a required field.”, in Magento2 REST API Call for GET Method Type The Next...

                    How to change City field to a dropdown in Checkout step Magento 2Magento 2 : How to change UI field(s)...

                    夢乃愛華...