Add Stock & Warehouse

This commit is contained in:
Marko
2022-07-01 15:31:34 +02:00
parent 460411ab43
commit a2ef85c188
9 changed files with 486 additions and 23 deletions

View File

@@ -69,22 +69,7 @@ class SwGetOrdersCommand extends Command
//offene Bestellungen aus Datenbank holen
$this->orderData = $this->getOrders();
//Bestelldetails aus SW holen
$this->getOrdersDataFromSW();
foreach ($this->orderData as $order) {
$io->info('Bestellung ID: '.$order->getId());
$io->info('Bestellung Order-ID: '.$order->getOrderId());
$io->info('Bestellung Data: '.var_export($order->getData(),1));
$this->saveOrdersData($order);
}
$this->getOrderDetails();
$io->success('Done!');
return Command::SUCCESS;
@@ -98,6 +83,19 @@ class SwGetOrdersCommand extends Command
return $this->ordersRepository->findAll();
}
/**
* @return void
*/
public function getOrderDetails(): void
{
//Bestelldetails aus SW holen
$this->getOrdersDataFromSW();
foreach ($this->orderData as $order) {
$this->saveOrdersData($order);
}
}
/**
* @return \Vin\ShopwareSdk\Data\AccessToken|void
*/