Skip to content

Commit be0e6b5

Browse files
author
Stanislav Idolov
authored
ENGCOM-2383: Configurable Product with Only Size Options (No Color Options) Shows … #16863
2 parents bec3f13 + 64b4f74 commit be0e6b5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/code/Magento/Catalog/Block/Product/ImageBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ protected function getRatio(\Magento\Catalog\Helper\Image $helper)
122122
public function create()
123123
{
124124
/** @var \Magento\Catalog\Model\Product\Configuration\Item\Option\OptionInterface $simpleOption */
125-
$simpleOption = $this->product->getCustomOption('simple_product');
125+
$simpleOption = $this->product->getOptionById('simple_product');
126126

127127
if ($simpleOption !== null) {
128128
$optionProduct = $simpleOption->getProduct();

app/code/Magento/Catalog/Test/Unit/Block/Product/ImageBuilderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ public function testCreateWithSimpleProduct($data, $expected)
306306
$simpleOptionMock = $this->createMock(\Magento\Wishlist\Model\Item\Option::class);
307307
$simpleProductMock = $this->createMock(\Magento\Catalog\Model\Product::class);
308308

309-
$productMock->expects($this->once())->method('getCustomOption')
309+
$productMock->expects($this->once())->method('getOptionById')
310310
->with('simple_product')->willReturn($simpleOptionMock);
311311

312312
$simpleOptionMock->expects($this->once())->method('getProduct')->willReturn($simpleProductMock);

0 commit comments

Comments
 (0)