File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
app/code/Magento/ConfigurableProduct/Model/Product
dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/Product/Type/Configurable Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ private function getLinkedProducts(ProductInterface $product)
97
97
$ metadata = $ this ->metadataPool ->getMetadata (ProductInterface::class);
98
98
/** @var Configurable $typeInstance */
99
99
$ typeInstance = $ product ->getTypeInstance ();
100
- $ childrenIds = $ typeInstance ->getChildrenIds ($ product ->getData ( $ metadata -> getLinkField () ));
100
+ $ childrenIds = $ typeInstance ->getChildrenIds ($ product ->getId ( ));
101
101
102
102
if (isset ($ childrenIds [0 ])) {
103
103
return $ childrenIds [0 ];
Original file line number Diff line number Diff line change @@ -117,9 +117,8 @@ public function testGetFinalPriceWithCustomOption()
117
117
118
118
/** @var \Magento\Catalog\Api\ProductRepositoryInterface $productRepository */
119
119
$ productRepository = $ this ->objectManager ->get (ProductRepositoryInterface::class);
120
- $ productRepository ->save ($ product );
120
+ $ product = $ productRepository ->save ($ product );
121
121
122
- $ product = $ this ->getProduct (1 );
123
122
$ optionId = $ product ->getOptions ()[0 ]->getId ();
124
123
$ product ->addCustomOption (AbstractType::OPTION_PREFIX . $ optionId , 'text ' );
125
124
$ product ->addCustomOption ('option_ids ' , $ optionId );
You can’t perform that action at this time.
0 commit comments