Skip to content

Commit

Permalink
Merge pull request #86 from riha112/3452
Browse files Browse the repository at this point in the history
[3452] Adding qty instead of replacing for same item in cart
  • Loading branch information
carinadues authored Oct 8, 2021
2 parents d1078e2 + d0a7d0d commit 69f56ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Model/Quote/Item/Processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function prepare(Item $item, DataObject $request, Product $candidate): vo
if ($request->getResetCount() && !$candidate->getStickWithinParent() && $item->getId() == $request->getId()) {
$item->setData(CartItemInterface::KEY_QTY, 0);
}
$item->setQty($candidate->getCartQty());
$item->addQty($candidate->getCartQty());

if (!$item->getParentItem() || $item->getParentItem()->isChildrenCalculated()) {
$item->setPrice($candidate->getFinalPrice());
Expand Down

0 comments on commit 69f56ab

Please sign in to comment.