magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.54k stars 9.32k forks source link

adding configurable product to cart does not show the image of the simple product #4859

Closed PascalBrouwers closed 8 years ago

PascalBrouwers commented 8 years ago

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.

Tested in magento 2.0.7

PascalBrouwers commented 8 years ago

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.

paales commented 8 years ago

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

PascalBrouwers commented 8 years ago

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