Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • CfgrUtils

Index

Methods

Static convertHtmlToPdf

  • convertHtmlToPdf(componentName: string, resourceName: string, html: string, pdfOptions?: Html2PdfOptions): Promise<void>
  • Converts a given HTML to PDF and uploads the resulting pdf to the given resource

    Parameters

    • componentName: string

      Name of the component which contains the resource

    • resourceName: string

      Name of the resource to which the generated PDF should be uploaded

    • html: string

      The HTML itself which needs to be converted to a PDF

    • Optional pdfOptions: Html2PdfOptions

      PDF generation options

    Returns Promise<void>

Static getCfgnCtrlr

Static getCfgrParent

Static getCheckoutLogicCtrlr

Static getCspdMgrCtrlr

Static interceptCheckout

  • interceptCheckout(interceptorFn: (shopInput?: string) => Promise<boolean>, timeoutMS?: number): void
  • This function can be used to call a custom interceptor function before the checkout is executed.
    The checkout is waiting until the interceptor function has finished or the timeout has elapsed.
    This function can only be called once, every other call will be rejected!

    Parameters

    • interceptorFn: (shopInput?: string) => Promise<boolean>

      The intercepting checkout function.
      It has to return a boolean value which indicates, if the original checkout should be executed or not.
      True: execute original checkout, False: skip original checkout

        • (shopInput?: string): Promise<boolean>
        • Parameters

          • Optional shopInput: string

          Returns Promise<boolean>

    • Optional timeoutMS: number

      Timeout value in ms.
      Original checkout will be called after this timeout, even interceptor function is still pending.

    Returns void

Static onCfgrReady

  • onCfgrReady(callback: () => void): void
  • Parameters

    • callback: () => void

      Called as soon as the configurator has been rendered, its controls are accessible in the DOM and the product plan has been loaded (at least one CspdUpdate has been received)

        • (): void
        • Returns void

    Returns void

Static onCheckoutStarted

  • onCheckoutStarted(callback: () => void): void
  • Parameters

    • callback: () => void
        • (): void
        • Returns void

    Returns void

Static onCheckoutSucceeded

  • onCheckoutSucceeded(callback: () => void): void
  • Parameters

    • callback: () => void
        • (): void
        • Returns void

    Returns void

Generated using TypeDoc