Skip to content

Commit b9300d0

Browse files
ENGCOM-1686: Issue 15467 where a configuration sku gets deleted but is still saved… #15468
2 parents 4630b3b + 34f62cc commit b9300d0

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,11 @@ public function getProductForThumbnail()
6868
self::CONFIG_THUMBNAIL_SOURCE,
6969
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
7070
) == ThumbnailSource::OPTION_USE_PARENT_IMAGE ||
71-
!($this->getChildProduct()->getThumbnail() && $this->getChildProduct()->getThumbnail() != 'no_selection')
71+
!(
72+
$this->getChildProduct() &&
73+
$this->getChildProduct()->getThumbnail() &&
74+
$this->getChildProduct()->getThumbnail() != 'no_selection'
75+
)
7276
) {
7377
$product = $this->getProduct();
7478
} else {

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

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

6565
$product = $config == ThumbnailSource::OPTION_USE_PARENT_IMAGE
66-
|| (!$this->getChildProduct()->getThumbnail() || $this->getChildProduct()->getThumbnail() == 'no_selection')
66+
|| (
67+
!$this->getChildProduct() ||
68+
!$this->getChildProduct()->getThumbnail() ||
69+
$this->getChildProduct()->getThumbnail() == 'no_selection'
70+
)
6771
? $this->getProduct()
6872
: $this->getChildProduct();
6973

0 commit comments

Comments
 (0)