# Cart

## Add items to the cart

To add items to the cart, you can use the `add` method that needs the id or the sku of a variant.

**Add an item using the id**

```php
cart()->add(id: $variant->id);
```

**Add an item using the sku**

```php
cart()->add(sku: 'the-sku-123');
```

**Set the quantity**

Quantity is 1 by default. You can set it using the `quantity` parameter.

```php
cart()->add(
    sku: 'le-sku-du-produit',
    quantity: 2,
);
```
