W-CF Documentation - v11.0.0
    Preparing search index...

    Class Basket

    Hierarchy (View Summary)

    Index
    enablePseudoArticleCalculation: boolean

    If true the calculation for pseudo articles will be based on a subtotal of all sub-articles. Otherwise pseudo articles will have an empty calculation (price = 0.00).

    false
    
    eventClear: ListenableEvent<void, Basket> = ...

    Will be triggered from Basket.clear()

    eventHeaderCalculationChanged: ListenableEvent<
        HeaderCalculationChangedEventData,
        BaseItemManager<BasketItem, Basket>,
    > = ...

    Triggered every time the header calculation has changed. Note: A changed header calculation may also imply that the calculation of all items has changed if some conditions depend on header conditions. The event eventItemUpdated may not be triggered for all items in these cases (e.g. for indirect changes).

    eventItemCreated: ListenableEvent<
        BasketItem,
        BaseItemManager<BasketItem, Basket>,
    > = ...
    eventItemDisposed: ListenableEvent<
        BasketItem,
        BaseItemManager<BasketItem, Basket>,
    > = ...
    eventItemsPasted: ListenableEvent<EventDataItemsPasted, Basket> = ...

    Will be triggered everytime if items got pasted into the basket. (e.g. copy/paste or OEX import)

    eventItemUpdated: ListenableEvent<
        ItemUpdateEventData<BasketItem>,
        BaseItemManager<BasketItem, Basket>,
    > = ...

    Triggered every time an item changed. Note: The event will not be triggered if the item calculation has indirectly changed by some header conditions. You should also listen to the event eventHeaderCalculationChanged.

    eventModified: ListenableEvent<void, Basket> = ...

    Will be triggered if this basket instance gets modified.

    eventOfmlArticleUpdated: ListenableEvent<ArticleItem, Basket> = ...
    eventOfmlMigrationInfoChanged: ListenableEvent<ArticleItem, Basket> = ...

    Will be triggered if the migration info of an article item was changed.

    ArticleItem.getMigrationInfo

    eventOfmlUpdateStateChanged: ListenableEvent<ArticleItem, Basket> = ...
    eventSelectionChanged: ListenableEvent<
        void,
        BaseItemManager<BasketItem, Basket>,
    > = ...
    eventUpdateSessionLanguage: ListenableEvent<void, Basket> = ...

    Will be triggered from Basket.updateSessionLanguage()

    includeCalculationErrorsInInconsistencies: boolean

    If true calculation line errors will be also included in the inconsistencyReason of the article ItemProperties.

    true
    
    itemTextFormat: TextFormat

    Text format used for the item properties. Text that is stored as plain text will not be converted and will be returned as Plain. The following legacy properties will not be available if a format other than Plain is used:

    • ArticleProperties.shortText
    • ArticleProperties.longText
    • ArticleProperties.featureText
    • FolderProperties.name
    • TextItemProperties.text
    "Plain"
    
    mContext: EaiwsContext
    mExtraPriceInfoSelectors: string[] | undefined
    mRoot: BasketItem
    mSelection: BasketItem[]
    mViewId: string | undefined
    • get isValid(): boolean

      Returns boolean

    • get loadedBasketConfig(): BasketConfig

      The basket config which was loaded from the last call of loadFromSession.

      Returns BasketConfig

    • get root(): T

      Returns T

    • get selection(): readonly T[]

      Returns readonly T[]

    • get views(): readonly View[]

      Returns readonly View[]

    • Checks the consistency of all articles. Returns false if at least one of the articles or its configuration is inconsistent. Note: Errors of invisible calculation lines will be ignored.

      Parameters

      • pCheckCalculation: boolean = true

        If true the calculation will be also checked for error. (default: true)

      Returns Promise<boolean>

    • Returns void

    • Parameters

      Returns Promise<void>

    • Should only be called if basket items were modified without using the methods provided by this bsk module. Calling this function reloads the whole item list.

      Returns Promise<void>

    • Removes a view and disposes it.

      Parameters

      Returns void

    • Can be used to specify the default options for the article image. Note: The default camera is only used if an image is generated the first time for an article.

      Parameters

      Returns Promise<void>

    • Should be called if the locale and or data language of the eaiws session has changed to update all language related data.

      Returns Promise<void>

    • Create necessary basket columns if they don't exist yet in the provided session. Note: This function will be also called from Basket.loadFromSession().

      Parameters

      Returns Promise<void>