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;
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
add a comment |
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
add a comment |
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
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
magento2 configurable-product
edited May 24 at 7:26
Savan Patel
612318
612318
asked Jun 20 '16 at 13:40
LM_FieldingLM_Fielding
7381637
7381637
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
As long as you have access to the product you can do the following:
$product->getTypeInstance()->getConfigurableAttributes($product);
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 toMagento/Catalog/Block/Product/View/AbstractView.php
in thegetProduct()
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
|
show 1 more comment
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
As long as you have access to the product you can do the following:
$product->getTypeInstance()->getConfigurableAttributes($product);
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 toMagento/Catalog/Block/Product/View/AbstractView.php
in thegetProduct()
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
|
show 1 more comment
As long as you have access to the product you can do the following:
$product->getTypeInstance()->getConfigurableAttributes($product);
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 toMagento/Catalog/Block/Product/View/AbstractView.php
in thegetProduct()
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
|
show 1 more comment
As long as you have access to the product you can do the following:
$product->getTypeInstance()->getConfigurableAttributes($product);
As long as you have access to the product you can do the following:
$product->getTypeInstance()->getConfigurableAttributes($product);
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 toMagento/Catalog/Block/Product/View/AbstractView.php
in thegetProduct()
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
|
show 1 more comment
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 toMagento/Catalog/Block/Product/View/AbstractView.php
in thegetProduct()
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
|
show 1 more comment
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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