How to show image in grouped productAdd image thumbnail next to product name on grouped productsshow grouped product stock on category pageLoad Grouped Product by custom attributeMagento 1.9.2.3 : cannot show associated product of grouped productalways grouped product (simple product associated, grouped product associated)Magento 2 : Display grouped product pictures in templateShow Grouped product price in catalog view as sum of associated products in grouped productHow to get Image of Parent product for grouped child product in a template?M2- How to get thumbnails of associated products on a grouped product from image cacheVia block get custom type image or display default

How could it be that 80% of townspeople were farmers during the Edo period in Japan?

How might a landlocked lake become a complete ecosystem?

Does it matter what way the tires go if no directional arrow?

How would you translate "grit" (personality trait) to Chinese?

Using chord iii in a chord progression (major key)

Polynomial division: Is this trick obvious?

Which creature is depicted in this Xanathar's Guide illustration of a war mage?

Is there any good reason to write "it is easy to see"?

Were any toxic metals used in the International Space Station?

Why is the marginal distribution/marginal probability described as "marginal"?

Is there any deeper thematic meaning to the white horse that Arya finds in The Bells (S08E05)?

How to continually let my readers know what time it is in my story, in an organic way?

When did game consoles begin including FPUs?

labelled end points on logic diagram

Why doesn't Iron Man's action affect this person in Endgame?

How much outgoing traffic would a HTTP load balance use?

Slice a list based on an index and items behind it in python

Does this "yield your space to an ally" rule my 3.5 group uses appear anywhere in the official rules?

Developers demotivated due to working on same project for more than 2 years

Holding rent money for my friend which amounts to over $10k?

Single word that parallels "Recent" when discussing the near future

What was Varys trying to do at the beginning of S08E05?

Understanding Python syntax in lists vs series

Testing if os.path.exists with ArcPy?



How to show image in grouped product


Add image thumbnail next to product name on grouped productsshow grouped product stock on category pageLoad Grouped Product by custom attributeMagento 1.9.2.3 : cannot show associated product of grouped productalways grouped product (simple product associated, grouped product associated)Magento 2 : Display grouped product pictures in templateShow Grouped product price in catalog view as sum of associated products in grouped productHow to get Image of Parent product for grouped child product in a template?M2- How to get thumbnails of associated products on a grouped product from image cacheVia block get custom type image or display default






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








4















For grouped products, I would like to see the picture of the by-products.



I tried several things but without success:



in files : Magento_GroupedProducttemplatesproductviewtype
In the loop of associated product, i wrote this code :



$productImage = $block->getImage($_item, 'product_base_image');


<a href="<?php /* @escapeNotVerified */ echo $_product->getProductUrl() ?>" class="product photo product-item-photo" tabindex="-1">
<?php echo $productImage->toHtml(); ?>
</a>


but it does not work!!
Would anyone have an idea.
Thanks










share|improve this question
























  • Did you get the solution?

    – 3CE
    Oct 30 '17 at 14:05

















4















For grouped products, I would like to see the picture of the by-products.



I tried several things but without success:



in files : Magento_GroupedProducttemplatesproductviewtype
In the loop of associated product, i wrote this code :



$productImage = $block->getImage($_item, 'product_base_image');


<a href="<?php /* @escapeNotVerified */ echo $_product->getProductUrl() ?>" class="product photo product-item-photo" tabindex="-1">
<?php echo $productImage->toHtml(); ?>
</a>


but it does not work!!
Would anyone have an idea.
Thanks










share|improve this question
























  • Did you get the solution?

    – 3CE
    Oct 30 '17 at 14:05













4












4








4


1






For grouped products, I would like to see the picture of the by-products.



I tried several things but without success:



in files : Magento_GroupedProducttemplatesproductviewtype
In the loop of associated product, i wrote this code :



$productImage = $block->getImage($_item, 'product_base_image');


<a href="<?php /* @escapeNotVerified */ echo $_product->getProductUrl() ?>" class="product photo product-item-photo" tabindex="-1">
<?php echo $productImage->toHtml(); ?>
</a>


but it does not work!!
Would anyone have an idea.
Thanks










share|improve this question
















For grouped products, I would like to see the picture of the by-products.



I tried several things but without success:



in files : Magento_GroupedProducttemplatesproductviewtype
In the loop of associated product, i wrote this code :



$productImage = $block->getImage($_item, 'product_base_image');


<a href="<?php /* @escapeNotVerified */ echo $_product->getProductUrl() ?>" class="product photo product-item-photo" tabindex="-1">
<?php echo $productImage->toHtml(); ?>
</a>


but it does not work!!
Would anyone have an idea.
Thanks







magento2 product-images grouped-products






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 7 '18 at 10:43









MGento

1,245319




1,245319










asked Nov 21 '16 at 10:18









straussstrauss

1761417




1761417












  • Did you get the solution?

    – 3CE
    Oct 30 '17 at 14:05

















  • Did you get the solution?

    – 3CE
    Oct 30 '17 at 14:05
















Did you get the solution?

– 3CE
Oct 30 '17 at 14:05





Did you get the solution?

– 3CE
Oct 30 '17 at 14:05










1 Answer
1






active

oldest

votes


















0














This is what I have done which might point you in the right direction:



1) It took me forever to get the right path to extend the template from vendormagentomodule-grouped-productviewfrontendtemplatesproductviewtypegrouped.phtml to my theme directory appdesignfrontendVendornameThemenameMagento_GroupedProducttemplatesproductviewtypegrouped.html



2) I added the line <?php $productImage = $block->getImage($_item, $image); echo $productImage->toHtml(); ?>



3) the trick now is to figure out how to define what goes in $image - i have created my own definition in my theme appdesignfrontendVendornameThemenameetcview.xml



<?xml version="1.0"?>
<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/view.xsd">
<media>
<images module="Magento_Catalog">
<image id="grouped_list_product_thumbnail" type="thumbnail">
<width>75</width>
<height>90</height>
</image>
</images>
</media>
</view>


So for me, $image = "grouped_list_product_thumbnail";



This is working for me although it is showing the placeholder and not the thumbnail - it seems my test migration did not copy the thumbnail linkage properly



This might help you solve yours though :)






share|improve this answer

























  • Hi! There. Images module name would be "Magento_Catalog"? not "Magento_GroupedProduct"? Thank you

    – 3CE
    Oct 30 '17 at 14:19











  • yes, grouped products are just a part of Catalog, they don't have a separate module (unlike Bundles which have a module on top)

    – iphigenie
    Nov 2 '17 at 11:40











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%2f146705%2fhow-to-show-image-in-grouped-product%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









0














This is what I have done which might point you in the right direction:



1) It took me forever to get the right path to extend the template from vendormagentomodule-grouped-productviewfrontendtemplatesproductviewtypegrouped.phtml to my theme directory appdesignfrontendVendornameThemenameMagento_GroupedProducttemplatesproductviewtypegrouped.html



2) I added the line <?php $productImage = $block->getImage($_item, $image); echo $productImage->toHtml(); ?>



3) the trick now is to figure out how to define what goes in $image - i have created my own definition in my theme appdesignfrontendVendornameThemenameetcview.xml



<?xml version="1.0"?>
<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/view.xsd">
<media>
<images module="Magento_Catalog">
<image id="grouped_list_product_thumbnail" type="thumbnail">
<width>75</width>
<height>90</height>
</image>
</images>
</media>
</view>


So for me, $image = "grouped_list_product_thumbnail";



This is working for me although it is showing the placeholder and not the thumbnail - it seems my test migration did not copy the thumbnail linkage properly



This might help you solve yours though :)






share|improve this answer

























  • Hi! There. Images module name would be "Magento_Catalog"? not "Magento_GroupedProduct"? Thank you

    – 3CE
    Oct 30 '17 at 14:19











  • yes, grouped products are just a part of Catalog, they don't have a separate module (unlike Bundles which have a module on top)

    – iphigenie
    Nov 2 '17 at 11:40















0














This is what I have done which might point you in the right direction:



1) It took me forever to get the right path to extend the template from vendormagentomodule-grouped-productviewfrontendtemplatesproductviewtypegrouped.phtml to my theme directory appdesignfrontendVendornameThemenameMagento_GroupedProducttemplatesproductviewtypegrouped.html



2) I added the line <?php $productImage = $block->getImage($_item, $image); echo $productImage->toHtml(); ?>



3) the trick now is to figure out how to define what goes in $image - i have created my own definition in my theme appdesignfrontendVendornameThemenameetcview.xml



<?xml version="1.0"?>
<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/view.xsd">
<media>
<images module="Magento_Catalog">
<image id="grouped_list_product_thumbnail" type="thumbnail">
<width>75</width>
<height>90</height>
</image>
</images>
</media>
</view>


So for me, $image = "grouped_list_product_thumbnail";



This is working for me although it is showing the placeholder and not the thumbnail - it seems my test migration did not copy the thumbnail linkage properly



This might help you solve yours though :)






share|improve this answer

























  • Hi! There. Images module name would be "Magento_Catalog"? not "Magento_GroupedProduct"? Thank you

    – 3CE
    Oct 30 '17 at 14:19











  • yes, grouped products are just a part of Catalog, they don't have a separate module (unlike Bundles which have a module on top)

    – iphigenie
    Nov 2 '17 at 11:40













0












0








0







This is what I have done which might point you in the right direction:



1) It took me forever to get the right path to extend the template from vendormagentomodule-grouped-productviewfrontendtemplatesproductviewtypegrouped.phtml to my theme directory appdesignfrontendVendornameThemenameMagento_GroupedProducttemplatesproductviewtypegrouped.html



2) I added the line <?php $productImage = $block->getImage($_item, $image); echo $productImage->toHtml(); ?>



3) the trick now is to figure out how to define what goes in $image - i have created my own definition in my theme appdesignfrontendVendornameThemenameetcview.xml



<?xml version="1.0"?>
<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/view.xsd">
<media>
<images module="Magento_Catalog">
<image id="grouped_list_product_thumbnail" type="thumbnail">
<width>75</width>
<height>90</height>
</image>
</images>
</media>
</view>


So for me, $image = "grouped_list_product_thumbnail";



This is working for me although it is showing the placeholder and not the thumbnail - it seems my test migration did not copy the thumbnail linkage properly



This might help you solve yours though :)






share|improve this answer















This is what I have done which might point you in the right direction:



1) It took me forever to get the right path to extend the template from vendormagentomodule-grouped-productviewfrontendtemplatesproductviewtypegrouped.phtml to my theme directory appdesignfrontendVendornameThemenameMagento_GroupedProducttemplatesproductviewtypegrouped.html



2) I added the line <?php $productImage = $block->getImage($_item, $image); echo $productImage->toHtml(); ?>



3) the trick now is to figure out how to define what goes in $image - i have created my own definition in my theme appdesignfrontendVendornameThemenameetcview.xml



<?xml version="1.0"?>
<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/view.xsd">
<media>
<images module="Magento_Catalog">
<image id="grouped_list_product_thumbnail" type="thumbnail">
<width>75</width>
<height>90</height>
</image>
</images>
</media>
</view>


So for me, $image = "grouped_list_product_thumbnail";



This is working for me although it is showing the placeholder and not the thumbnail - it seems my test migration did not copy the thumbnail linkage properly



This might help you solve yours though :)







share|improve this answer














share|improve this answer



share|improve this answer








edited Dec 6 '16 at 21:21

























answered Dec 6 '16 at 21:16









iphigenieiphigenie

489216




489216












  • Hi! There. Images module name would be "Magento_Catalog"? not "Magento_GroupedProduct"? Thank you

    – 3CE
    Oct 30 '17 at 14:19











  • yes, grouped products are just a part of Catalog, they don't have a separate module (unlike Bundles which have a module on top)

    – iphigenie
    Nov 2 '17 at 11:40

















  • Hi! There. Images module name would be "Magento_Catalog"? not "Magento_GroupedProduct"? Thank you

    – 3CE
    Oct 30 '17 at 14:19











  • yes, grouped products are just a part of Catalog, they don't have a separate module (unlike Bundles which have a module on top)

    – iphigenie
    Nov 2 '17 at 11:40
















Hi! There. Images module name would be "Magento_Catalog"? not "Magento_GroupedProduct"? Thank you

– 3CE
Oct 30 '17 at 14:19





Hi! There. Images module name would be "Magento_Catalog"? not "Magento_GroupedProduct"? Thank you

– 3CE
Oct 30 '17 at 14:19













yes, grouped products are just a part of Catalog, they don't have a separate module (unlike Bundles which have a module on top)

– iphigenie
Nov 2 '17 at 11:40





yes, grouped products are just a part of Catalog, they don't have a separate module (unlike Bundles which have a module on top)

– iphigenie
Nov 2 '17 at 11:40

















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%2f146705%2fhow-to-show-image-in-grouped-product%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?