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.
2 parents 6b168c5 + 67d2dc2 commit 51d838cCopy full SHA for 51d838c
app/code/Magento/Wishlist/CustomerData/Wishlist.php
@@ -149,6 +149,14 @@ protected function getItemData(\Magento\Wishlist\Model\Item $wishlistItem)
149
*/
150
protected function getImageData($product)
151
{
152
+ /*Set variant product if it is configurable product.
153
+ It will show variant product image in sidebar instead of configurable product image.*/
154
+ $simpleOption = $product->getCustomOption('simple_product');
155
+ if ($simpleOption !== null) {
156
+ $optionProduct = $simpleOption->getProduct();
157
+ $product = $optionProduct;
158
+ }
159
+
160
/** @var \Magento\Catalog\Helper\Image $helper */
161
$helper = $this->imageHelperFactory->create()
162
->init($product, 'wishlist_sidebar_block');
0 commit comments