From 0458f272ba2a32b184cc27f3415f92682f9cbbd0 Mon Sep 17 00:00:00 2001 From: iesus Date: Thu, 28 Jun 2018 09:36:55 +0200 Subject: [PATCH] session replace quote when inactivatequote runs --- app/code/community/Svea/Checkout/Helper/Data.php | 1 + .../community/Svea/Checkout/controllers/IndexController.php | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/app/code/community/Svea/Checkout/Helper/Data.php b/app/code/community/Svea/Checkout/Helper/Data.php index 7dc9c98..aa36289 100644 --- a/app/code/community/Svea/Checkout/Helper/Data.php +++ b/app/code/community/Svea/Checkout/Helper/Data.php @@ -81,6 +81,7 @@ public function replaceQuote() ->collectTotals() ->save(); $oldQuote->setIsActive(0); + $session->setQuoteId($newQuote->getId()); return $newQuote; } diff --git a/app/code/community/Svea/Checkout/controllers/IndexController.php b/app/code/community/Svea/Checkout/controllers/IndexController.php index 354d98a..1de705b 100644 --- a/app/code/community/Svea/Checkout/controllers/IndexController.php +++ b/app/code/community/Svea/Checkout/controllers/IndexController.php @@ -299,6 +299,11 @@ protected function _getSveaResponse($sveaOrder) $response = $this->_invalidateQuote($sveaOrder, $quote); } + if ($response['Status'] == 'Cancelled') { + + $response = $this->_invalidateQuote($sveaOrder, $quote); + } + if ($svea->sveaOrderHasErrors($sveaOrder, $quote, $response)) { $message = sprintf( $this->__('Error code 205-q%d - Could not load Svea Ekonomi checkout%s'),