2.0 Beta

Smootify 2.0 is in public beta. Your 1.x store keeps working. Move when you want.

What changed

Smootify.addBoxToCart()

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

v2.0 beta
Open .md
On this page
  1. Types
  2. CartLineInput

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;
}

    ↑ ↓ to moveEnter to openEsc to close