Shopfront Embedded Bridge Emitable Events

The Shopfront Embedded Bridge includes a number of emitable events which allow you to control elements of Shopfront's user interface without the user interacting with your application or responding to an event generated from Shopfront.

Constructed events need to be sent to Shopfront to be actioned, see Sending Components & Events to Shopfront for more information

Sell Screen Option

This allows you to add or modify a sell screen option (buttons that appear at the bottom of the sell screen next to sales keys and parked sales). This is typically used to update the title (option text) of the option. It is expected that you still return all of your sell screen options when you receive the REQUEST_SELL_SCREEN_OPTIONS event.

The URL specified must be using the HTTPS protocol.

Constructor

Field Type Description
url string The URL of the frame to insert when the user selects this option
title string The button label of the option, this can either be plain text or any valid HTML (this will inherit style from the POS)
Sell Screen Option Constructor
import { SellScreenOption } from "@shopfront/bridge";

const option = new SellScreenOption(
    "https://example.com", 
    "Example Option"
);

Sell Screen Promotion Applicable

This allows you to toggle Promotions on / off based on their activatedBy value. Activated promotions will be applied to any products in the sell screen that meet the required criteria

The current state persists until a follow-up event is sent with the opposite enabled value.

Constructor

Field Type Description
key string The activatedBy value of the promotion(s) to toggle
enabled boolean Whether the promotion(s) should be enabled or disabled
Sell Screen Promotion Applicable Constructor
import { SellScreenPromotionApplicable } from "@shopfront/bridge";

const promotionToggle = new SellScreenPromotionApplicable(
    "embedded-promotions", 
    true
);