mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-23 15:41:24 +00:00
Update Cart.php, fix CartItem::fromAttributes call
The CartItem::fromAttributes call is missing the $weight parameter, and the CartItemOptions don't work any more because of this.
This commit is contained in:
@@ -710,7 +710,7 @@ class Cart
|
|||||||
$cartItem = CartItem::fromArray($id);
|
$cartItem = CartItem::fromArray($id);
|
||||||
$cartItem->setQuantity($id['qty']);
|
$cartItem->setQuantity($id['qty']);
|
||||||
} else {
|
} else {
|
||||||
$cartItem = CartItem::fromAttributes($id, $name, $price, $options);
|
$cartItem = CartItem::fromAttributes($id, $name, $price, null, $options);
|
||||||
$cartItem->setQuantity($qty);
|
$cartItem->setQuantity($qty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user