Smootify.addBoxToCart()
adds lines as one Magic Box, with its title, image and discount percentage (`___dp`)
On this page
adds lines as one Magic Box, with its title, image and discount percentage (___dp) Since 1.x.
addBoxToCart( lines: CartLineInput[], boxOptions?: { title?: string; image?: string; ___dp?: string }, goToCheckout?: boolean, ): Promise<void>Types
CartLineInput
/** 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;
}