Options used to initialize the wallpaper cutout frame

interface WallpaperFrameOptions {
    articleNumber: string;
    wallWidth: number;
    wallHeight: number;
    customerId: string;
    price: {
        unitPrice: number;
        vatRate?: number;
        currency?: string;
        unitCampaignPrice?: number;
    };
    panelOptions?: {
        showPanel?: boolean;
        showBuyButton?: boolean;
        showPrice?: boolean;
        showWallDropdowns?: boolean;
    };
    culture?: string;
    onAddToCart?: ((event: AddToCartEvent) => void);
    onCuttingsDataChanged?: ((event: CuttingsDataChangedEvent) => void);
    mode?: "production" | "development" | "test";
}

Properties

articleNumber: string

The article number of the wallpaper that is used

wallWidth: number

The customer's initial wall width

wallHeight: number

The customer's initial wall height

customerId: string

Your unique customer id, used to identifify and validate your domain

price: {
    unitPrice: number;
    vatRate?: number;
    currency?: string;
    unitCampaignPrice?: number;
}

The unit price, and the campaign unit price, if any, for which you sell the specified wallpaper. This is used to calculate the total price based on the wall size.

Type declaration

  • unitPrice: number

    Required unit price per square meter, used to calculate the total price based on the wall size

  • OptionalvatRate?: number

    Optional vat rate. The value should be set in percentage, ie. 0.25, 0.15 etc. If no vat rate is set, the vat rate is set to the default vat rate for the customer's country, based on the given customerId. If no related country could be found for the given customerId, the fallback value is set to 0.25 (25%).

    Consider always passing in this value to make sure you always get a correct vat rate.

  • Optionalcurrency?: string

    The currency code (ISO 4217), used to format the price correctly

  • OptionalunitCampaignPrice?: number

    Optional unit campaign price

panelOptions?: {
    showPanel?: boolean;
    showBuyButton?: boolean;
    showPrice?: boolean;
    showWallDropdowns?: boolean;
}

Configure the panel which holds some information such as the product name, price and the buy button.

Type declaration

  • OptionalshowPanel?: boolean

    Show/hide the panel

    false
    
  • OptionalshowBuyButton?: boolean

    Show/hide the buy button

    false
    
  • OptionalshowPrice?: boolean

    Show/hide the price

    false
    
  • OptionalshowWallDropdowns?: boolean

    Show/hide the wall dropdowns to enable changing the wall size inside the frame

    false
    
culture?: string

Used to determine the language of the page (RFC 4646, languagecode2-country/regioncode2)

sv-SE if omitted

onAddToCart?: ((event: AddToCartEvent) => void)

Triggered when the add to cart button is pressed

Type declaration

    • (event): void
    • Parameters

      • event: AddToCartEvent

        Event data such as price, article number, cuttings data etc.

      Returns void

onCuttingsDataChanged?: ((event: CuttingsDataChangedEvent) => void)

Triggered when the selection window is moved or if any cutout property is changed, such as zoom level

Type declaration

    • (event): void
    • Parameters

      Returns void

mode?: "production" | "development" | "test"

The mode of the frame.

production