This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user