Magento2: Configurable product on wishlist shows parent image instead variation image

Created on 17 Jan 2017  路  8Comments  路  Source: magento/magento2

Preconditions

  1. Magento 2.1.3
  2. PHP7
  3. MySQL 5.7.16

Steps to reproduce

  1. Create product from Configurable type with default image
  2. Assign products to this Configurable with let's say color and size attributes. Let the associated products have different images
  3. Go to that configurable product on frontend, select configurations and add the product to wishlist.
  4. Go to wishlist in my account and you will notice that wishlist displays images of parent product instead of the product that represent selected configurations

Expected result

  1. Wishlist should display variation product image instead of parent
  2. Currently this is done for checkout page and cart and we are able to select from backend if we want parent or child product image to be displayed
Catalog Fixed in 2.2.x Confirmed Format is not valid Ready for Work Reproduced on 2.1.x Reproduced on 2.2.x Reproduced on 2.3.x bug report

All 8 comments

I have the same issue, if you add different variations they will be listed separately in whishlist but the image is wrong, it represents configurable product rather than specific variation

Internal ticket MAGETWO-8709 which tracks this GitHub issue, is in our issue backlog.
Thanks

If someone is interesting to a workaround, I suggest creating a plugin for
MagentoWishlistBlockCustomerWishlistItemColumnImage
and write something like:

public function aroundGetImage(
        Image $subject,
        \Closure $proceed,
        Product $product,
        $imageId,
        $attributes
    ) {
        if ($product->getTypeId() == 'configurable') 
        {
            $simpleProduct = $this->productRepository->get($product->getSku());
            $url = $this->config->getBaseMediaUrl() . $simpleProduct->getImage();
            $block = $proceed($product, $imageId, $attributes);
            $block->setImageUrl($url);
            return $block;
        }
        return $proceed($product, $imageId, $attributes);
    }

@anebi, thank you for your report.
We've created internal ticket(s) MAGETWO-8709 to track progress on the issue.

Working on this.

Hi @anebi. Thank you for your report.
The issue has been fixed in magento-engcom/magento2ce#1031 by @RomaKis in 2.2-develop branch
Related commit(s):

The fix will be available with the upcoming 2.2.5 release.

Note that this fix is different on 2.3. Wishlist should obey cart image setting from config. Fix will be backported to 2.2 future releases

It was fixed in new 2.2.6 release version, Please check it once from here pull/15477.

Was this page helpful?
0 / 5 - 0 ratings