mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-11 18:54:33 +00:00
Update Cart.php
This commit is contained in:
@@ -130,7 +130,7 @@ class Cart
|
||||
throw new InvalidArgumentException('$nameOrQty must be of int (quantity) or null when adding with raw parameters');
|
||||
}
|
||||
|
||||
return $this->addCartItem(CartItem::fromAttributes($id, $nameOrQty, $price, $qtyOrOptions ?: 1, $weight, $options ?: new CartItemOptions([])));
|
||||
return $this->addCartItem(CartItem::fromAttributes($id, $nameOrQty, $price, $qtyOrOptions ?: 1, $weight ?: 0, $options ?: new CartItemOptions([])));
|
||||
}
|
||||
/* Also allow passing a Buyable instance, get data from the instance rather than parameters */
|
||||
else if ($id instanceof Buyable) {
|
||||
|
||||
Reference in New Issue
Block a user