Skip to content

Commit 1c4434c

Browse files
committed
Merge remote-tracking branch 'origin/MAGETWO-50198' into MAGETWO-51806
2 parents a5df61f + 268992a commit 1c4434c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/code/Magento/Checkout/Model/Cart.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,11 @@ public function addOrderItem($orderItem, $qtyFlag = null)
257257
if ($orderItem->getParentItem() === null) {
258258
$storeId = $this->_storeManager->getStore()->getId();
259259
try {
260-
$product = $this->productRepository->getById($orderItem->getProductId(), false, $storeId);
260+
/**
261+
* We need to reload product in this place, because products
262+
* with the same id may have different sets of order attributes.
263+
*/
264+
$product = $this->productRepository->getById($orderItem->getProductId(), false, $storeId, true);
261265
} catch (NoSuchEntityException $e) {
262266
return $this;
263267
}

0 commit comments

Comments
 (0)