File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
ConfigurableProduct/Model Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 22
22
* @method Product setHasError(bool $value)
23
23
* @method \Magento\Catalog\Model\ResourceModel\Product getResource()
24
24
* @method null|bool getHasError()
25
- * @method Product setAssociatedProductIds(array $productIds)
26
25
* @method array getAssociatedProductIds()
27
26
* @method Product setNewVariationsAttributeSetId(int $value)
28
27
* @method int getNewVariationsAttributeSetId()
@@ -2609,4 +2608,13 @@ private function getMediaGalleryProcessor()
2609
2608
}
2610
2609
return $ this ->mediaGalleryProcessor ;
2611
2610
}
2611
+
2612
+ /**
2613
+ * Set the associated products
2614
+ * @param array $productIds
2615
+ */
2616
+ public function setAssociatedProductIds (array $ productIds )
2617
+ {
2618
+ $ this ->getExtensionAttributes ()->setConfigurableProductLinks ($ productIds );
2619
+ }
2612
2620
}
Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ public function removeChild($sku, $childSku)
132
132
if (count ($ options ) == count ($ ids )) {
133
133
throw new NoSuchEntityException (__ ('Requested option doesn \'t exist ' ));
134
134
}
135
- $ product ->addData ([ ' associated_product_ids ' => $ ids] );
135
+ $ product ->setAssociatedProductIds ( $ ids );
136
136
$ product ->save ();
137
137
return true ;
138
138
}
You can’t perform that action at this time.
0 commit comments