Get configurable product attributes in custom module?Magento Configurable Product Export, Multiple Super Attribute Error FixQuick Simple Product Creation: Add new Custom Attribute of MultiSelect each time When I Want to Add New Simple ProductMultiple Attribute Sets on Configurable ProductsDo I have to create a new attribute set for each configurable product?Possible to use Multi-Select Attribute on Configurable Product?Configurable Product Attributes that are Field instead of DropdownMagento2 - How to use _getAdditionalConfig() from MagentoConfigurableProductBlockProductViewTypeConfigurableHow to correctly create a configurable product with multiple attributes and imagesFetching simple product data from a quote item, based on a configurable productHow to fetch product data into custom .phtml block on product view

Modern approach to radio buttons

The most awesome army: 80 men left and 81 returned. Is it true?

Why is Colorado so different politically from nearby states?

Bringing Food from Hometown for Out-of-Town Interview?

Did airlines fly their aircraft slower in response to oil prices in the 1970s?

What's the most polite way to tell a manager "shut up and let me work"?

What is a simple, physical situation where complex numbers emerge naturally?

Accidentally cashed a check twice

Rotated Position of Integers

Is the capacitor drawn or wired wrongly?

Are academic associations obliged to comply with the US government?

Cryptography and patents

How to decline physical affection from a child whose parents are pressuring them?

What are the problems in teaching guitar via Skype?

What should I do about a religious player who refuses to accept the existence of multiple gods in D&D?

Singlequote and backslash

Different PCB color ( is it different material? )

Estimate related to the Möbius function

Asking for something with different prices

What is the intuition behind uniform continuity?

How does increase in volume change the speed of reaction in production of NO2?

Are grass strips more dangerous than tarmac?

Is there any Biblical Basis for 400 years of silence between Old and New Testament?

Order by does not work as I expect



Get configurable product attributes in custom module?


Magento Configurable Product Export, Multiple Super Attribute Error FixQuick Simple Product Creation: Add new Custom Attribute of MultiSelect each time When I Want to Add New Simple ProductMultiple Attribute Sets on Configurable ProductsDo I have to create a new attribute set for each configurable product?Possible to use Multi-Select Attribute on Configurable Product?Configurable Product Attributes that are Field instead of DropdownMagento2 - How to use _getAdditionalConfig() from MagentoConfigurableProductBlockProductViewTypeConfigurableHow to correctly create a configurable product with multiple attributes and imagesFetching simple product data from a quote item, based on a configurable productHow to fetch product data into custom .phtml block on product view






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I'm writing a custom module and Block, struggling to get at the configurable product all attribute data that used.



How would I set up my block class to handle this from scratch?



Attempting to use:



$this->_productview->getProduct()->getTypeInstance()->getConfigurableAttributes($this->_productview->getProduct());


However the page doesn't appear to ever load (will continue to try to load for ten minutes)










share|improve this question






























    1















    I'm writing a custom module and Block, struggling to get at the configurable product all attribute data that used.



    How would I set up my block class to handle this from scratch?



    Attempting to use:



    $this->_productview->getProduct()->getTypeInstance()->getConfigurableAttributes($this->_productview->getProduct());


    However the page doesn't appear to ever load (will continue to try to load for ten minutes)










    share|improve this question


























      1












      1








      1








      I'm writing a custom module and Block, struggling to get at the configurable product all attribute data that used.



      How would I set up my block class to handle this from scratch?



      Attempting to use:



      $this->_productview->getProduct()->getTypeInstance()->getConfigurableAttributes($this->_productview->getProduct());


      However the page doesn't appear to ever load (will continue to try to load for ten minutes)










      share|improve this question
















      I'm writing a custom module and Block, struggling to get at the configurable product all attribute data that used.



      How would I set up my block class to handle this from scratch?



      Attempting to use:



      $this->_productview->getProduct()->getTypeInstance()->getConfigurableAttributes($this->_productview->getProduct());


      However the page doesn't appear to ever load (will continue to try to load for ten minutes)







      magento2 configurable-product






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited May 24 at 7:26









      Savan Patel

      612318




      612318










      asked Jun 20 '16 at 13:40









      LM_FieldingLM_Fielding

      7381637




      7381637




















          1 Answer
          1






          active

          oldest

          votes


















          1














          As long as you have access to the product you can do the following:



          $product->getTypeInstance()->getConfigurableAttributes($product);





          share|improve this answer























          • I'm struggling to get access to the product, I get an error saying the method is undefined. I'm on 2.06 and I think Magento believes my configurable product is a simple product.

            – LM_Fielding
            Jun 20 '16 at 13:53






          • 1





            @LM_Fielding Please refer to Magento/Catalog/Block/Product/View/AbstractView.php in the getProduct() method

            – Raphael at Digital Pianism
            Jun 20 '16 at 13:55











          • Reading it now, what is the best way to get the attributes into my block?

            – LM_Fielding
            Jun 20 '16 at 13:58











          • @LM_Fielding hmmm I'm not sure at that point

            – Raphael at Digital Pianism
            Jun 20 '16 at 14:08











          • I have this, but if I try to var_dump the page won't load? $this->_productview->getProduct()->getTypeInstance()->getConfigurableAttributes($this->_productview->getProduct());

            – LM_Fielding
            Jun 20 '16 at 14:12











          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%2f121856%2fget-configurable-product-attributes-in-custom-module%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














          As long as you have access to the product you can do the following:



          $product->getTypeInstance()->getConfigurableAttributes($product);





          share|improve this answer























          • I'm struggling to get access to the product, I get an error saying the method is undefined. I'm on 2.06 and I think Magento believes my configurable product is a simple product.

            – LM_Fielding
            Jun 20 '16 at 13:53






          • 1





            @LM_Fielding Please refer to Magento/Catalog/Block/Product/View/AbstractView.php in the getProduct() method

            – Raphael at Digital Pianism
            Jun 20 '16 at 13:55











          • Reading it now, what is the best way to get the attributes into my block?

            – LM_Fielding
            Jun 20 '16 at 13:58











          • @LM_Fielding hmmm I'm not sure at that point

            – Raphael at Digital Pianism
            Jun 20 '16 at 14:08











          • I have this, but if I try to var_dump the page won't load? $this->_productview->getProduct()->getTypeInstance()->getConfigurableAttributes($this->_productview->getProduct());

            – LM_Fielding
            Jun 20 '16 at 14:12















          1














          As long as you have access to the product you can do the following:



          $product->getTypeInstance()->getConfigurableAttributes($product);





          share|improve this answer























          • I'm struggling to get access to the product, I get an error saying the method is undefined. I'm on 2.06 and I think Magento believes my configurable product is a simple product.

            – LM_Fielding
            Jun 20 '16 at 13:53






          • 1





            @LM_Fielding Please refer to Magento/Catalog/Block/Product/View/AbstractView.php in the getProduct() method

            – Raphael at Digital Pianism
            Jun 20 '16 at 13:55











          • Reading it now, what is the best way to get the attributes into my block?

            – LM_Fielding
            Jun 20 '16 at 13:58











          • @LM_Fielding hmmm I'm not sure at that point

            – Raphael at Digital Pianism
            Jun 20 '16 at 14:08











          • I have this, but if I try to var_dump the page won't load? $this->_productview->getProduct()->getTypeInstance()->getConfigurableAttributes($this->_productview->getProduct());

            – LM_Fielding
            Jun 20 '16 at 14:12













          1












          1








          1







          As long as you have access to the product you can do the following:



          $product->getTypeInstance()->getConfigurableAttributes($product);





          share|improve this answer













          As long as you have access to the product you can do the following:



          $product->getTypeInstance()->getConfigurableAttributes($product);






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jun 20 '16 at 13:45









          Raphael at Digital PianismRaphael at Digital Pianism

          55.2k22128289




          55.2k22128289












          • I'm struggling to get access to the product, I get an error saying the method is undefined. I'm on 2.06 and I think Magento believes my configurable product is a simple product.

            – LM_Fielding
            Jun 20 '16 at 13:53






          • 1





            @LM_Fielding Please refer to Magento/Catalog/Block/Product/View/AbstractView.php in the getProduct() method

            – Raphael at Digital Pianism
            Jun 20 '16 at 13:55











          • Reading it now, what is the best way to get the attributes into my block?

            – LM_Fielding
            Jun 20 '16 at 13:58











          • @LM_Fielding hmmm I'm not sure at that point

            – Raphael at Digital Pianism
            Jun 20 '16 at 14:08











          • I have this, but if I try to var_dump the page won't load? $this->_productview->getProduct()->getTypeInstance()->getConfigurableAttributes($this->_productview->getProduct());

            – LM_Fielding
            Jun 20 '16 at 14:12

















          • I'm struggling to get access to the product, I get an error saying the method is undefined. I'm on 2.06 and I think Magento believes my configurable product is a simple product.

            – LM_Fielding
            Jun 20 '16 at 13:53






          • 1





            @LM_Fielding Please refer to Magento/Catalog/Block/Product/View/AbstractView.php in the getProduct() method

            – Raphael at Digital Pianism
            Jun 20 '16 at 13:55











          • Reading it now, what is the best way to get the attributes into my block?

            – LM_Fielding
            Jun 20 '16 at 13:58











          • @LM_Fielding hmmm I'm not sure at that point

            – Raphael at Digital Pianism
            Jun 20 '16 at 14:08











          • I have this, but if I try to var_dump the page won't load? $this->_productview->getProduct()->getTypeInstance()->getConfigurableAttributes($this->_productview->getProduct());

            – LM_Fielding
            Jun 20 '16 at 14:12
















          I'm struggling to get access to the product, I get an error saying the method is undefined. I'm on 2.06 and I think Magento believes my configurable product is a simple product.

          – LM_Fielding
          Jun 20 '16 at 13:53





          I'm struggling to get access to the product, I get an error saying the method is undefined. I'm on 2.06 and I think Magento believes my configurable product is a simple product.

          – LM_Fielding
          Jun 20 '16 at 13:53




          1




          1





          @LM_Fielding Please refer to Magento/Catalog/Block/Product/View/AbstractView.php in the getProduct() method

          – Raphael at Digital Pianism
          Jun 20 '16 at 13:55





          @LM_Fielding Please refer to Magento/Catalog/Block/Product/View/AbstractView.php in the getProduct() method

          – Raphael at Digital Pianism
          Jun 20 '16 at 13:55













          Reading it now, what is the best way to get the attributes into my block?

          – LM_Fielding
          Jun 20 '16 at 13:58





          Reading it now, what is the best way to get the attributes into my block?

          – LM_Fielding
          Jun 20 '16 at 13:58













          @LM_Fielding hmmm I'm not sure at that point

          – Raphael at Digital Pianism
          Jun 20 '16 at 14:08





          @LM_Fielding hmmm I'm not sure at that point

          – Raphael at Digital Pianism
          Jun 20 '16 at 14:08













          I have this, but if I try to var_dump the page won't load? $this->_productview->getProduct()->getTypeInstance()->getConfigurableAttributes($this->_productview->getProduct());

          – LM_Fielding
          Jun 20 '16 at 14:12





          I have this, but if I try to var_dump the page won't load? $this->_productview->getProduct()->getTypeInstance()->getConfigurableAttributes($this->_productview->getProduct());

          – LM_Fielding
          Jun 20 '16 at 14:12

















          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%2f121856%2fget-configurable-product-attributes-in-custom-module%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

          Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

          Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

          Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form