File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
app/code/Magento/Quote/Model/ResourceModel Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -121,18 +121,15 @@ public function loadByCustomerId($quote, $customerId)
121
121
122
122
if ($ data ) {
123
123
//Prevent current StoreId of the quote to be overridden
124
- $ isStoreSwitched = false ;
125
124
$ currentStoreId = $ quote ->getStoreId ();
126
125
if ($ currentStoreId !== null && $ currentStoreId !== (int )$ data ['store_id ' ]) {
127
126
unset($ data ['store_id ' ]);
128
- $ isStoreSwitched = true ;
129
- }
130
- $ quote ->setData ($ data );
131
- $ quote ->setOrigData ();
132
-
133
- //Update StoreId to quote on store switching
134
- if ($ isStoreSwitched ) {
127
+ $ quote ->setData ($ data );
128
+ $ quote ->setOrigData ();
135
129
$ this ->quoteRepository ->save ($ quote );
130
+ } else {
131
+ $ quote ->setData ($ data );
132
+ $ quote ->setOrigData ();
136
133
}
137
134
}
138
135
You can’t perform that action at this time.
0 commit comments