Skip to content

Commit 7c61a7a

Browse files
committed
ACP2E-778: REST API: Product names in cart always use default store view values
1 parent 3866450 commit 7c61a7a

File tree

1 file changed

+5
-8
lines changed
  • app/code/Magento/Quote/Model/ResourceModel

1 file changed

+5
-8
lines changed

app/code/Magento/Quote/Model/ResourceModel/Quote.php

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,18 +121,15 @@ public function loadByCustomerId($quote, $customerId)
121121

122122
if ($data) {
123123
//Prevent current StoreId of the quote to be overridden
124-
$isStoreSwitched = false;
125124
$currentStoreId = $quote->getStoreId();
126125
if ($currentStoreId !== null && $currentStoreId !== (int)$data['store_id']) {
127126
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();
135129
$this->quoteRepository->save($quote);
130+
} else {
131+
$quote->setData($data);
132+
$quote->setOrigData();
136133
}
137134
}
138135

0 commit comments

Comments
 (0)