File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
app/code/Magento/Checkout/Controller/Cart Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,12 @@ public function execute()
22
22
$ id = (int )$ this ->getRequest ()->getParam ('id ' );
23
23
if ($ id ) {
24
24
try {
25
- $ this ->cart ->removeItem ($ id )->save ();
25
+ $ this ->cart ->removeItem ($ id );
26
+ // We should set Totals to be recollected once more because of Cart model as usually is loading
27
+ // before action executing and in case when triggerRecollect setted as true recollecting will
28
+ // executed and the flag will be true already.
29
+ $ this ->cart ->getQuote ()->setTotalsCollectedFlag (false );
30
+ $ this ->cart ->save ();
26
31
} catch (\Exception $ e ) {
27
32
$ this ->messageManager ->addError (__ ('We can \'t remove the item. ' ));
28
33
$ this ->_objectManager ->get (\Psr \Log \LoggerInterface::class)->critical ($ e );
You can’t perform that action at this time.
0 commit comments