protected insertRow ( string $rawId, string $id, string $name, integer $qty, float $price, array $attributes = [] ) : |
||
$rawId | string | The ID of the new row |
$id | string | Unique ID of the item |
$name | string | Name of the item |
$qty | integer | Item qty to add to the cart |
$price | float | Price of one item |
$attributes | array | Array of additional options, such as 'size' or 'color' |
return |
protected function insertRow($rawId, $id, $name, $qty, $price, $attributes = [])
{
$newRow = $this->makeRow($rawId, $id, $name, $qty, $price, $attributes);
$cart = $this->getCart();
$cart->put($rawId, $newRow);
$this->save($cart);
return $newRow;
}