Zaktualizowano rozmiar pliku google-merchant_id-1.xml oraz dodano logikę aktualizacji źródła zamówienia dla zamówień Empik w klasie OrderFulfiller.
This commit is contained in:
@@ -83,6 +83,7 @@ class OrderFulfiller
|
||||
|
||||
// add cart
|
||||
$cart = $this->cartProvider->provide($data);
|
||||
|
||||
$order->setCart($cart);
|
||||
|
||||
// add order lines
|
||||
|
||||
@@ -18,7 +18,7 @@ class OrderProcessor
|
||||
{
|
||||
const CODE_WAITING_ACCEPTANCE = 'WAITING_ACCEPTANCE';
|
||||
const CODE_SHIPPING = 'SHIPPING';
|
||||
|
||||
|
||||
/** @var EmpikClientFactory */
|
||||
protected $empikClientFactory;
|
||||
|
||||
@@ -59,7 +59,7 @@ class OrderProcessor
|
||||
if (!$this->allowAccept && !$this->allowImport) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$response = $this->empikClient->getOrders([
|
||||
'order_state_codes' => implode(',', $this->getOrderCodesForProcess()),
|
||||
]);
|
||||
@@ -111,19 +111,19 @@ class OrderProcessor
|
||||
$this->logger->logError(sprintf('Error accepting order [%s]', $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected function getOrderCodesForProcess()
|
||||
{
|
||||
$codes = [];
|
||||
|
||||
|
||||
if ($this->allowAccept) {
|
||||
$codes[] = self::CODE_WAITING_ACCEPTANCE;
|
||||
}
|
||||
|
||||
|
||||
if ($this->allowImport) {
|
||||
$codes[] = self::CODE_SHIPPING;
|
||||
}
|
||||
|
||||
|
||||
return $codes;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user