Magento2: adding configurable product to cart does not show the image of the simple product

Created on 3 Jun 2016  路  3Comments  路  Source: magento/magento2

Adding a configurable product with specific options does show a different image on the product page, but this product is not shown on the cart or checkout page.

For example, use the sample data.

  • Add the Mona Pullover Hoodlie in your cart with Color Orange and Size S.
  • In your cart you will see the image from the configurable and not from the simple product.

Tested in magento 2.0.7

bug report

Most helpful comment

Found out this is now a setting in the backend:
Configuration->Checkout->Shoppin Cart->Configurable Product Image = Product Thumbnail itself

All 3 comments

Seems to be going wrong in Magento\Catalog\Helper\Image::initBaseFile()

This line: $model->setBaseFile($this->getProduct()->getData($model->getDestinationSubdir()));
tries to get the thumbnail of the image but it's not returning it.
If I do $model->setBaseFile($this->getProduct()->getImage()); it seems to get the correct image, although it's the full image instead of a thumnail.

Version: 2.1.0

Steps to reproduce

Create a configurable product with multiple color tshirts and related images.

Expected result

The product image should be the image of the underlying simple product 'Carolina Azul' in the cart, like it is on the product page.

schermafbeelding 2016-06-24 om 11 58 11

Actual result

schermafbeelding 2016-06-24 om 11 56 42

Found out this is now a setting in the backend:
Configuration->Checkout->Shoppin Cart->Configurable Product Image = Product Thumbnail itself

Was this page helpful?
0 / 5 - 0 ratings