import hiltes

This commit is contained in:
mmoeller
2023-02-06 10:11:39 +01:00
parent 991dd95e9d
commit 0c04e6da7c
24 changed files with 100882 additions and 563 deletions

View File

@@ -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);
}