Skip to content

Commit 9ef56a9

Browse files
committed
MAGETWO-50972: Move to Shopping Cart action does not work inside creation offline order
- Move recollectCart() method at the end of applySidebarData() method
1 parent 86618d0 commit 9ef56a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/code/Magento/Sales/Model/AdminOrder/Create.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,6 @@ public function applySidebarData($data)
902902
$this->removeItem($itemId, 'cart');
903903
}
904904
}
905-
$this->recollectCart();
906905
}
907906
if (isset($data['add_wishlist_item'])) {
908907
foreach ($data['add_wishlist_item'] as $itemId => $qty) {
@@ -926,13 +925,14 @@ public function applySidebarData($data)
926925
foreach ($data['remove'] as $itemId => $from) {
927926
$this->removeItem($itemId, $from);
928927
}
929-
$this->recollectCart();
930928
}
931929
if (isset($data['empty_customer_cart']) && (int)$data['empty_customer_cart'] == 1) {
932930
$this->getCustomerCart()->removeAllItems()->collectTotals();
933931
$this->quoteRepository->save($this->getCustomerCart());
934932
}
935933

934+
$this->recollectCart();
935+
936936
return $this;
937937
}
938938

0 commit comments

Comments
 (0)