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