6 declare(strict_types=1);
27 private $sourceItemsProcessor;
32 private $getSkusByProductIdsInterface;
42 $this->sourceItemsProcessor = $sourceItemsProcessor;
43 $this->getSkusByProductIdsInterface = $getSkusByProductIdsInterface;
60 $configurableMatrix =
$controller->getRequest()->getParam(
'configurable-matrix-serialized',
'');
62 if ($configurableMatrix !=
'') {
66 $quantityPerSource = is_array(
$productData[
'quantity_per_source'])
71 $childProductId =
$product->getExtensionAttributes()->getConfigurableProductLinks()[$key];
72 $childProductSku = $this->getSkusByProductIdsInterface->execute([$childProductId])[$childProductId];
73 $this->processSourceItems($quantityPerSource, $childProductSku);
85 private function processSourceItems(array
$sourceItems,
string $productSku)
95 $this->sourceItemsProcessor->process($productSku,
$sourceItems);
__construct(SourceItemsProcessor $sourceItemsProcessor, GetSkusByProductIdsInterface $getSkusByProductIdsInterface)
execute(Observer $observer)