mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-24 07:55:35 +00:00
[Fix] Session quantity fix
Row exists in session, sum up the session quantity and the new quantity given to the add method.
This commit is contained in:
@@ -99,7 +99,7 @@ class Cart
|
|||||||
$content = $this->getContent();
|
$content = $this->getContent();
|
||||||
|
|
||||||
if ($content->has($cartItem->rowId)) {
|
if ($content->has($cartItem->rowId)) {
|
||||||
$cartItem->qty++;
|
$cartItem->qty += $content->get($cartItem->rowId)->qty;
|
||||||
}
|
}
|
||||||
|
|
||||||
$content->put($cartItem->rowId, $cartItem);
|
$content->put($cartItem->rowId, $cartItem);
|
||||||
|
|||||||
Reference in New Issue
Block a user