Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/MAGETWO-59050' into pr2.0-develop
Browse files Browse the repository at this point in the history
  • Loading branch information
vnayda committed Oct 28, 2016
2 parents 3fd6c8e + 565b701 commit a03ce7d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/code/Magento/Checkout/Model/Cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,11 @@ public function addOrderItem($orderItem, $qtyFlag = null)
if ($orderItem->getParentItem() === null) {
$storeId = $this->_storeManager->getStore()->getId();
try {
$product = $this->productRepository->getById($orderItem->getProductId(), false, $storeId);
/**
* We need to reload product in this place, because products
* with the same id may have different sets of order attributes.
*/
$product = $this->productRepository->getById($orderItem->getProductId(), false, $storeId, true);
} catch (NoSuchEntityException $e) {
return $this;
}
Expand Down

0 comments on commit a03ce7d

Please sign in to comment.