import hiltes
This commit is contained in:
@@ -73,6 +73,13 @@ class Shopware
|
||||
public function setProduct(Products $product){
|
||||
$context = new Context($_ENV['SHOPWARE_API_URL'], $this->shopwareAuth());
|
||||
|
||||
//prüfen ob Shopware Produktid schon bekannt ist
|
||||
if($product->getProductId() == null){
|
||||
$this->logger->error('Shopware Produkt ID ist nicht bekannt');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$productRepository = RepositoryFactory::create(ProductDefinition::ENTITY_NAME);
|
||||
$productRepository->update($product, $context);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user