diff --git a/src/Helper/HiltesImport.php b/src/Helper/HiltesImport.php index 817e2bf..84e892e 100644 --- a/src/Helper/HiltesImport.php +++ b/src/Helper/HiltesImport.php @@ -217,7 +217,7 @@ class HiltesImport $warehouse2 = false; if(empty($this->cachedWarehouseIds[$wareHouseName])){ #*** Check - $warehouse2 = $this->warehouseRepository->findOneBy(['id'=> (int)$wareHouseName]); + $warehouse2 = $this->warehouseRepository->findOneBy(['name'=> $wareHouseName]); #dump($warehouse2); if(empty($warehouse2)){ $warehouse = new Warehouse(); @@ -226,7 +226,8 @@ class HiltesImport # $this->warehouseRepository->save($warehouse,true); #***************** - $warehouse2 = $this->warehouseRepository->findOneBy(['id'=> (int)$wareHouseName]); + #$warehouse2 = $this->warehouseRepository->findOneBy(['name'=> $wareHouseName]); + $warehouse2 = $warehouse; #dump($warehouse2); } $this->cachedWarehouseIds[$wareHouseName] = $warehouse2; @@ -250,7 +251,7 @@ class HiltesImport # $this->productRepository->save($prod,true); #***************** - $prod2 = $this->productRepository->findOneBy(['gtin'=> $gtin]); + $prod2 = $prod;#$this->productRepository->findOneBy(['gtin'=> $gtin]); #dump($warehouse2); } $this->cachedProdIds[$gtin] = $prod2->getId();