Skip to content

Commit a03ce7d

Browse files
author
vnayda
committed
Merge remote-tracking branch 'origin/MAGETWO-59050' into pr2.0-develop
2 parents 3fd6c8e + 565b701 commit a03ce7d

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
@@ -261,7 +261,11 @@ public function addOrderItem($orderItem, $qtyFlag = null)
261261
if ($orderItem->getParentItem() === null) {
262262
$storeId = $this->_storeManager->getStore()->getId();
263263
try {
264-
$product = $this->productRepository->getById($orderItem->getProductId(), false, $storeId);
264+
/**
265+
* We need to reload product in this place, because products
266+
* with the same id may have different sets of order attributes.
267+
*/
268+
$product = $this->productRepository->getById($orderItem->getProductId(), false, $storeId, true);
265269
} catch (NoSuchEntityException $e) {
266270
return $this;
267271
}

0 commit comments

Comments
 (0)