We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 943e2cd commit eea948dCopy full SHA for eea948d
app/code/Magento/Wishlist/CustomerData/Wishlist.php
@@ -149,6 +149,13 @@ protected function getItemData(\Magento\Wishlist\Model\Item $wishlistItem)
149
*/
150
protected function getImageData($product)
151
{
152
+ /* Set variant product if it is configurable product. It will show variant product image in sidebar instead of configurable product image. */
153
+ $simpleOption = $product->getCustomOption('simple_product');
154
+ if ($simpleOption !== null) {
155
+ $optionProduct = $simpleOption->getProduct();
156
+ $product = $optionProduct;
157
+ }
158
+
159
/** @var \Magento\Catalog\Helper\Image $helper */
160
$helper = $this->imageHelperFactory->create()
161
->init($product, 'wishlist_sidebar_block');
0 commit comments