This commit is contained in:
parent
98a9545bb9
commit
231e9390b8
@ -35,7 +35,7 @@ class HiltesImport
|
||||
$this->stockRepository = $stockRepository;
|
||||
$this->logger = $logger;
|
||||
|
||||
$this->currentDirPath = getcwd();
|
||||
$this->currentDirPath = getcwd() . '/www';
|
||||
}
|
||||
|
||||
|
||||
@ -75,7 +75,7 @@ class HiltesImport
|
||||
{
|
||||
$finder = Finder::create();
|
||||
$finder
|
||||
->in($this->currentDirPath . '/www/hiltes/h2c/')
|
||||
->in($this->currentDirPath . '/hiltes/h2c/')
|
||||
->depth(0);
|
||||
|
||||
if ($delta) {
|
||||
|
@ -73,8 +73,6 @@ class Jtl
|
||||
|
||||
$this->logger->info('No stock for product ' . $product->getId());
|
||||
}
|
||||
// dump($data);
|
||||
|
||||
}
|
||||
|
||||
return $data;
|
||||
@ -88,20 +86,18 @@ class Jtl
|
||||
public function createExportFile($data): void
|
||||
{
|
||||
try {
|
||||
$writer = Writer::createFromPath(getcwd() . '/jtl/cds-export.csv', 'w+');
|
||||
$writer = Writer::createFromPath(getcwd() . '/www/jtl/cds-export.csv', 'w+');
|
||||
$bytes = $writer->insertAll(new ArrayIterator($data));
|
||||
|
||||
if ($bytes) {
|
||||
$this->logger->info('Exported ' . $bytes . ' bytes');
|
||||
|
||||
$FTP = new Ftp();
|
||||
$FTP->uploadFile(getcwd() . '/jtl/cds-export.csv');
|
||||
$FTP->uploadFile(getcwd() . '/www/jtl/cds-export.csv');
|
||||
}
|
||||
|
||||
} catch (Exception $e) {
|
||||
$this->logger->error($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user