# Smootify.addBoxToCart()

> adds lines as one Magic Box, with its title, image and discount percentage (`___dp`)

Status: Ready (Smootify 2.0)  
URL: https://www.smootify.io/docs/reference/api/methods/addboxtocart  
Updated: 2026-10-13

adds lines as one Magic Box, with its title, image and discount percentage (`___dp`) Since 1.x.

```ts
addBoxToCart( lines: CartLineInput[], boxOptions?: { title?: string; image?: string; ___dp?: string }, goToCheckout?: boolean, ): Promise<void>
```

## Types

### CartLineInput

```ts
/** A line to add: `merchandiseId` is the variant gid. */
export interface CartLineInput {
  merchandiseId: string;
  quantity?: number | null;
  attributes?: AttributeInput[] | null;
  sellingPlanId?: string | null;
  parent?: { lineId?: string | null; merchandiseId?: string | null } | null;
}
```
