Skip to content

Commit

Permalink
Fix minicart not cleared after order completion
Browse files Browse the repository at this point in the history
Fixes magento#4460 Fixes magento#4416 Fixes magento#1461 Fixes magento#4969 Fixes MAGETWO-52593

(cherry picked from commit 9093ce9)
  • Loading branch information
Anton Evers committed Sep 10, 2017
1 parent 8390ef4 commit 36bebae
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/code/Magento/Checkout/Model/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,8 @@ public function clearQuote()
$this->_quote = null;
$this->setQuoteId(null);
$this->setLastSuccessQuoteId(null);
$this->setLoadInactive(false);
$this->replaceQuote($this->getQuote()->save());
return $this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,13 @@
<a class="action primary continue" href="<?php /* @escapeNotVerified */ echo $block->getUrl() ?>"><span><?php /* @escapeNotVerified */ echo __('Continue Shopping') ?></span></a>
</div>
</div>
<script>
require([
'Magento_Customer/js/customer-data'
], function (customerData) {
var sections = ['cart'];
customerData.invalidate(sections);
customerData.reload(sections, true);
});
</script>
</div>

0 comments on commit 36bebae

Please sign in to comment.