Type aliases
CartEvents
CartEvents: "cart:requestStarted" | "cart:requestComplete" | "cart:ready"
CartItemAdd
Type declaration
Optional quantity?: number
CartItemIndex
CartItemIndex: number
CartLevelDiscountApplications
CartLevelDiscountApplications: { allocation_method: string; created_at: string; description: string; key: string; target_selection: string; target_type: string; title: string; total_allocated_amount: number; type: string; value: string; value_type: string }
Type declaration
Readonly allocation_method: string
Readonly created_at: string
Readonly description: string
Readonly key: string
Readonly target_selection: string
Readonly target_type: string
Readonly title: string
Readonly total_allocated_amount: number
Readonly type: string
Readonly value: string
Readonly value_type: string
CartLineItem
Cart
Line
Item
: { featured_image
: FeaturedImage; final_line_price
: number; final_price
: number; gift_card
: boolean; grams
: number; handle
: string; id
: number; image
: string; key
: string; line_level_discount_allocations
?: LineLevelDiscountAllocation[]; line_price
: number; options_with_values
: OptionsWithValues[]; price
: number; product_description
: string; product_has_only_default_variant
: boolean; product_id
: number; product_title
: string; product_type
: string; properties
: LineItemProperties; quantity
: number; requires_shipping
: boolean; sku
: string; taxable
: boolean; title
: string; url
: string; variant_id
: number; variant_options
: string[]; variant_title
: string; vendor
: string }Type declaration
Readonly final_line_price: number
Readonly final_price: number
Readonly gift_card: boolean
Readonly grams: number
Readonly handle: string
Readonly id: number
Readonly image: string
Readonly key: string
Readonly line_price: number
Readonly price: number
Readonly product_description: string
Readonly product_has_only_default_variant: boolean
Readonly product_id: number
Readonly product_title: string
Readonly product_type: string
Readonly quantity: number
Readonly requires_shipping: boolean
Readonly sku: string
Readonly taxable: boolean
Readonly title: string
Readonly url: string
Readonly variant_id: number
Readonly variant_options: string[]
Readonly variant_title: string
Readonly vendor: string
CartRoute
CartRoute: "/cart.js" | "/cart/add.js" | "/cart/update.js" | "/cart/change.js" | "/cart/clear.js" | "/cart/shipping_rates.json" | "/cart/prepare_shipping_rates.json" | "/cart/async_shipping_rates.json"
CartSettings
CartSettings: { postConfig?: RequestInit; updateState?: boolean; url?: string }
Type declaration
Optional Readonly postConfig?: RequestInit
Optional Readonly updateState?: boolean
Optional Readonly url?: string
CartState
Cart
State
: { attributes
: Attributes; cart_level_discount_applications
: CartLevelDiscountApplications[]; currency
: string; item_count
: number; items
: CartLineItem[]; items_subtotal_price
: number; note
: string; original_total_price
: number; requires_shipping
: boolean; token
: string; total_discount
: number; total_price
: number; total_weight
: number }Type declaration
Readonly attributes: Attributes
Readonly currency: string
Readonly item_count: number
Readonly items_subtotal_price: number
Readonly note: string
Readonly original_total_price: number
Readonly requires_shipping: boolean
Readonly token: string
Readonly total_discount: number
Readonly total_price: number
Readonly total_weight: number
DiscountApplication
DiscountApplication: { allocation_method: string; created_at: string; description: null; key: string; target_selection: string; target_type: string; title: string; total_allocated_amount: number; type: string; value: string; value_type: string }
Type declaration
allocation_method: string
created_at: string
description: null
key: string
target_selection: string
target_type: string
title: string
total_allocated_amount: number
type: string
value: string
value_type: string
FeaturedImage
FeaturedImage: { alt: string; aspect_ratio: number; url: string }
Type declaration
Readonly alt: string
Readonly aspect_ratio: number
Readonly url: string
LineItemKey
LineItemKey: string
LineItemProperties
LineItemProperties: {}
LineLevelDiscountAllocation
OptionsWithValues
OptionsWithValues: { name: string; value: string }
Type declaration
Readonly name: string
Readonly value: string
VariantID
VariantID: number | string
Shopify cart attributes https://shopify.dev/docs/themes/liquid/reference/objects/cart#cart-attributes