File tree Expand file tree Collapse file tree 1 file changed +2
-24
lines changed
app/code/Magento/LoginAsCustomerQuote/Plugin/LoginAsCustomerApi Expand file tree Collapse file tree 1 file changed +2
-24
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ public function __construct(
60
60
}
61
61
62
62
/**
63
- * Remove all items from guest shopping cart
63
+ * Remove all items from guest shopping cart and mark customer cart as not-guest
64
64
*
65
65
* @param AuthenticateCustomerBySecretInterface $subject
66
66
* @param string $secret
@@ -77,31 +77,9 @@ public function beforeExecute(
77
77
$ quote = $ this ->checkoutSession ->getQuote ();
78
78
/* Remove items from guest cart */
79
79
$ quote ->removeAllItems ();
80
+ $ quote ->setCustomerIsGuest (0 );
80
81
$ this ->quoteRepository ->save ($ quote );
81
82
}
82
83
return null ;
83
84
}
84
-
85
- /**
86
- * Mark customer cart as not-guest
87
- *
88
- * @param AuthenticateCustomerBySecretInterface $subject
89
- * @param void $result
90
- * @param string $secret
91
- * @return void
92
- * @throws LocalizedException
93
- *
94
- * @SuppressWarnings(PHPMD.UnusedFormalParameter)
95
- */
96
- public function afterExecute (
97
- AuthenticateCustomerBySecretInterface $ subject ,
98
- $ result ,
99
- string $ secret
100
- ) {
101
- $ this ->checkoutSession ->loadCustomerQuote ();
102
- $ quote = $ this ->checkoutSession ->getQuote ();
103
-
104
- $ quote ->setCustomerIsGuest (0 );
105
- $ this ->quoteRepository ->save ($ quote );
106
- }
107
85
}
You can’t perform that action at this time.
0 commit comments