Skip to content

Additional configuration properties

Additional configuration properties

The following additional properties can be configured on the window.BilberryWidgetsGlobal object.

  • Enable giftcards using enableGiftcards?: boolean;. Default is false.
  • Enable promo codes using enablePromoCodes?: boolean;. Default is true.
  • Enable using promo codes in gift card checkout using enableGiftcardPromoCodes?: boolean;. Default is false.
  • Add newsletter checkbox in checkout using enableNewsletter?: boolean;. Default is false.
  • Enable week numbers in calendar components using showWeekNumbers?: boolean;. Default is false. Shows ISO 8601 week numbers (1-53) alongside calendar dates. Commonly used in Nordic countries (Norway, Sweden, Finland).
  • Enable extra products in checkout using enableExtras?: boolean;. Default is false.
  • Enable related products in checkout using enableRelatedProducts?: boolean;. Default is false.
  • Control if the shopping basket should be displayed when clicking “Book now” using skipBasketOnBook?: boolean;. Default is false. When enabled, users are taken directly to checkout instead of seeing the basket first. Note: If the cart contains waiting list items, users will be routed to the appropriate waiting list flow. For mixed carts (containing both regular and waiting list items), the basket will still be shown to allow users to choose their preferred flow.
  • Enable quick checkout (less required contact info fields) using quickCheckout: boolean;. Default is false.
  • Disable Sentry (Bilberry’s error reporting service) using disableSentry?: boolean;. Default is false.
  • Disable Bilberry Widget Metrics (Bilberry’s statistics & debugging service) using disableBilberryWidgetMetrics?: boolean;. Default is false. NOTE: This will reduce efficiency of support and helper tools in the Bilberry software suite.
  • Disable the usage of membership when booking using disableMembershipBooking?: boolean;. Default is false. This is relevant if you need to use membership only for timeslots, but also sell activities and do not want these to be used with membership. Timeslots will always use memberhsip. If using packages, you MUST set disableMembershipBooking to true for pages selling packages.
  • Set the timeszone of the widgets using timezone: string;. Default is “Europe/Oslo”, but this will be overwritten from API-call. You do not need to set this as it will follow the settings of your Bilberry instance.
  • Set the default country selected in the checkout form using defaultCountry: string;. Default is “no”. The value should be the ISO 3166-1 alpha-2 code for the country.
  • Set a global promo code that will be applied to all carts using globalPromoCode?: string;. Unset by default.
  • Set a custom url for the “Continue shopping” link / button using continueShoppingUrl?: string;. Default behavior is to stay on the same page.
  • Enable event propagation on widgets using enableEventPropagation?: boolean;. Default is false. When set to true, widgets will allow external script event handling. Set to true if you need to handle events originating from within the widgets

Using widgets on an external / partner website

If you wish to use the Bilberry Widgets on an external/partner website, you need to add the referral code (created in Bilberry) for your distributor to the widget base configuration.

This is necessary in order for bookings to be listed as purchased via the distributor.

Add the following code to the base configuration, replacing the content between (and including) the << and >> characters:

window.BilberryWidgetsGlobal.referralCode = '<<Referral code goes here>>';

External/partner linking to your website

If a customer lands on your widget-enabled website with a url that contains a special bref query parameter, e.g.: www.bilberry-tours.no?bref=abc123 then the referralCode will be automatically set so that a possible sale is registered on the referral code abc123

The referral code will be kept through user navigation on your site for a default of 14 days.

If you would like to extend or reduce this period of time, that’s possible by adding the following code to the base configuration (Configuration ).

window.BilberryWidgetsGlobal.brefTTL = 30; // TTL = Time To Live

This would extend the duration to 30 days.

If the user arrives on your site with the bref in place a day or two later, the duration will be extended.

If the user arrives on your site but with a different bref code, the new referral code will replace the old one.

Configuration for Bilberry Developers for widget use inside Bilberry backoffice

  • Set authorization token with extended privileges using backoffice_authorize?: string;. Unset by default.
  • Skip payment by setting backoffice_skipPayment?: boolean;. Unset by default.
  • Enable god mode using enableGodMode?: boolean;. Unset by default. God mode will ignore cutoff times when booking.