Skip to content

Commit d6e8ce9

Browse files
jonshipmanmage2pratik
authored andcommitted
Issue 15467 where a configuration sku gets deleted but is still saved in a customer cart
1 parent a160f2b commit d6e8ce9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/code/Magento/ConfigurableProduct/Block/Cart/Item/Renderer/Configurable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function getProductForThumbnail()
6565
self::CONFIG_THUMBNAIL_SOURCE,
6666
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
6767
) == ThumbnailSource::OPTION_USE_PARENT_IMAGE ||
68-
!($this->getChildProduct()->getThumbnail() && $this->getChildProduct()->getThumbnail() != 'no_selection')
68+
!($this->getChildProduct() && $this->getChildProduct()->getThumbnail() && $this->getChildProduct()->getThumbnail() != 'no_selection')
6969
) {
7070
$product = $this->getProduct();
7171
} else {

app/code/Magento/ConfigurableProduct/CustomerData/ConfigurableItem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ protected function getProductForThumbnail()
6363
);
6464

6565
$product = $config == ThumbnailSource::OPTION_USE_PARENT_IMAGE
66-
|| (!$this->getChildProduct()->getThumbnail() || $this->getChildProduct()->getThumbnail() == 'no_selection')
66+
|| (!$this->getChildProduct() || !$this->getChildProduct()->getThumbnail() || $this->getChildProduct()->getThumbnail() == 'no_selection')
6767
? $this->getProduct()
6868
: $this->getChildProduct();
6969

0 commit comments

Comments
 (0)