/** * {@inheritdoc} */ protected function handleProductAssociationCalls(array $associationCalls) { foreach ($associationCalls['remove'] as $removeCall) { try { $this->webservice->removeProductAssociation($removeCall); $this->productExportManager->updateProductAssociationExport($this->getJobInstance(), $removeCall['product']); } catch (SoapCallException $e) { throw new InvalidItemException(sprintf('An error occured during a product association remove call. This may be due to a linked ' . 'product that doesn\'t exist on Magento side. Error message : %s', $e->getMessage()), $removeCall); } } foreach ($associationCalls['create'] as $createCall) { try { $this->webservice->createProductAssociation($createCall); $this->productExportManager->updateProductAssociationExport($this->getJobInstance(), $createCall['product']); } catch (SoapCallException $e) { throw new InvalidItemException(sprintf('An error occured during a product association add call. This may be due to a linked ' . 'product that doesn\'t exist on Magento side. Error message : %s', $e->getMessage()), $createCall); } } }
/** * Compute an individual product and all its parts (translations). * * @param array $product */ protected function computeProduct($product) { $sku = $this->getProductSku($product); parent::computeProduct($product); $this->productExportManager->updateProductExport($this->getJobInstance(), $sku); }