File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
app/code/Magento/Bundle/Model Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -173,13 +173,11 @@ public function saveChild(
173
173
)
174
174
);
175
175
}
176
- $ linkField = $ this ->metadataPool ->getMetadata (ProductInterface::class)->getLinkField ();
177
176
$ selectionModel = $ this ->mapProductLinkToBundleSelectionModel (
178
177
$ selectionModel ,
179
178
$ linkedProduct ,
180
179
$ product ,
181
- (int )$ linkProductModel ->getId (),
182
- $ linkField
180
+ (int )$ linkProductModel ->getId ()
183
181
);
184
182
185
183
try {
@@ -256,9 +254,9 @@ private function mapProductLinkToBundleSelectionModel(
256
254
Selection $ selectionModel ,
257
255
LinkInterface $ productLink ,
258
256
ProductInterface $ parentProduct ,
259
- int $ linkedProductId ,
260
- string $ linkField
257
+ int $ linkedProductId
261
258
): Selection {
259
+ $ linkField = $ this ->metadataPool ->getMetadata (ProductInterface::class)->getLinkField ();
262
260
$ selectionModel ->setProductId ($ linkedProductId );
263
261
$ selectionModel ->setParentProductId ($ parentProduct ->getData ($ linkField ));
264
262
if ($ productLink ->getSelectionId () !== null ) {
@@ -357,8 +355,7 @@ public function addChild(
357
355
$ selectionModel ,
358
356
$ linkedProduct ,
359
357
$ product ,
360
- (int )$ linkProductModel ->getEntityId (),
361
- $ linkField
358
+ (int )$ linkProductModel ->getEntityId ()
362
359
);
363
360
364
361
$ selectionModel ->setOptionId ($ optionId );
You can’t perform that action at this time.
0 commit comments