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

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

          Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

          Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?