15 public function save(array $data)
18 foreach ($collection as $exportedProduct)
20 $productId = $exportedProduct->getProductId();
21 $exportedProduct->setTimestampX(
new DateTime());
22 $error = $data[$productId][
'ERROR'] ??
null;
23 $exportedProduct->setError($error);
24 unset($data[$productId]);
27 foreach ($data as $productId => $productData)
31 ->setServiceId(self::SERVICE_ID)
32 ->setProductId($productId)
33 ->setError($productData[
'ERROR'] ??
null)
35 $collection[] = $exportedProduct;
38 return $collection->save(
true);