Hierarchy

  • CartItem

Constructors

Properties

children: CartItem[] = []

field 'children' contains duplicated(due to id) products copies, which have different prices(usually discount prices) it's required to merge products that are basically the same

createdAt: number
currency: string
precalculatedInitialPrice: null | number = null
precalculatedPrice: null | number = null
product: ProductListed
productSchemas: SchemaListed[]
qty: number
schemas: CartItemSchema[]

Accessors

  • get basePrice(): Price | {
        currency: string;
        gross: string;
    }
  • Returns Price | {
        currency: string;
        gross: string;
    }

  • get discountValue(): number
  • Total discount value of the item (without children)

    Returns number

  • get initialPrice(): number
  • Singular initial (before discounts) price of the item (without children)

    Returns number

  • get price(): number
  • Singular price of the item (without children)

    Returns number

  • get totalDiscountValue(): number
  • returns sum of core-product discounts and all childrens' discounts to be able to display info about total discount on one particular product

    Returns number

  • get totalInitialPrice(): number
  • Total initial price (before discounts) of the item including quantity and children

    Returns number

  • get totalPrice(): number
  • Total price of the item including quantity and children

    Returns number

  • get totalQty(): number
  • Number of given items in the cart, also includes nested items

    Returns number

Methods

Generated using TypeDoc