Sunnysideup\Ecommerce\Api\ShoppingCart::setQuantity
Sets quantity for an item in the cart.
returns null if the current user does not allow order manipulation or saving (e.g. session disabled)
Signature
public function setQuantity(BuyableModel
$buyable,
float
$quantity,
[array
$parameters = ] )
Parameters
$buyable
— Sunnysideup\Ecommerce\Interfaces\BuyableModel- - the buyable (generally a product) being added to the cart
$quantity
— float- - number of items add
$parameters
— array- - array of parameters to target a specific order item. eg: group=1, length=5
Returns
- bool|OrderItem