Home > widget-integration

widget-integration package

Classes

Class

Description

CartAPI

CartController

Cart controller managing UI interactions, modal display, and cart operations

This controller provides extensive customization capabilities for Technical Support teams through protected extension points. All timing, selectors, translations, and behavior can be customized per-shop without modifying core code.

## Key Extension Points

### Button State Management - updateButtonState() - Customize button UI updates (text, disabled state, styling) - getButtonStateTranslations() - Override button text for different locales - getButtonSuccessResetDelay() - Control how long "Added!" shows (default: 500ms) - getButtonFailureResetDelay() - Control error state duration (default: 300ms)

### Cart Opening Behavior - shouldOpenCartAfterAdd() - Control when cart opens after add-to-cart - openCart() - Customize cart opening logic and animations - closeCart() - Customize cart closing and cleanup

### Theme Integration - getCartEnabledBodyClass() - Override body class for cart enabled state - getModalId() - Customize modal element ID - getModalOpenBodyClass() - Override body class when modal is open - getButtonTextSelectors() - Add custom theme button selectors

### Accessibility & Focus Management - setupWCAGAccessibility() - Extend WCAG compliance features - saveFocusElementBeforeCart() - Customize focus saving logic - restoreFocusAfterCart() - Customize focus restoration logic

## Common Customization Patterns

CartModule

Cart module managing cart functionality via Widget Integration framework

This module orchestrates cart operations including: - Cart modal display and interactions - Add to cart functionality - Cart state management - Theme-specific cart icon handling

Technical Support teams can extend this module for shop-specific customization: - Override block listener setup via - Customize block initialization via - Add custom error handling via

CartSelectors

Cart selectors managing theme-specific cart icon configurations

Provides cart icon selectors and update actions for 30+ Shopify themes including: - Dawn, Debut, Sense, Craft, Refresh, Studio, Taste, Ride, Crave - Prestige, Empire, Impulse, Motion, Flex, Flow, Venue, Warehouse - Turbo, Testament, Venture, Symetry, Superstore, Icon, Ella - BlockShop, ColorBlock, Broadcast, Focal, Expanse - And more custom themes

Technical Support teams can: - Add custom theme configurations via window.boostWidgetIntegrationConfig - Override theme detection logic - Customize cart count update behavior

CartService

Cart service managing cart operations and business logic

Provides cart functionality including: - Adding products to cart (single or multi-product) - Cart quantity management with queue to prevent race conditions - Cart modal rendering with template customization - Post-add-to-cart action handling (redirect, drawer, etc.) - Cart backup/restore functionality

Extension points for Technical Support customization: - - Custom redirect/drawer behavior after adding items - - Custom cart page redirect logic - - Shop-specific cart rendering defaults - - Custom cart item formatting and enrichment - - Custom cart template loading - - Custom validation rules for cart items - - Add shop-specific data to cart responses - - Custom error handling and user feedback

RecommendationAnalytic

Service for handling recommendation widget analytics and tracking data storage.

This service manages the persistence of recommendation widget tracking data to localStorage, enabling analytics and tracking of user interactions with recommendation widgets. It provides customizable storage key generation and error handling that can be extended by Technical Support teams for shop-specific requirements.

RecommendationAPI

API service for handling recommendation widget requests to the Boost recommendation engine.

This service extends to provide specialized functionality for fetching product recommendations from the Boost API. It manages request construction through extensible protected methods that allow Technical Support teams to customize query parameters and body payloads for shop-specific requirements.

The service uses a functional pipeline approach to transform request parameters, applying currency settings and B2B configurations automatically while allowing additional customizations through method overrides.

RecommendationModel

Data model for recommendation widgets containing configuration and product data.

RecommendationModule

RecommendationService

Service for managing recommendation widgets and their data.

RecommendationWidgetController

Controller for managing recommendation widget lifecycle, rendering, and carousel functionality.

This controller orchestrates the complete lifecycle of recommendation widgets, from data fetching to rendering and carousel initialization. It provides numerous extension points for Technical Support teams to customize widget behavior for specific shops without modifying core code.

Enumerations

Enumeration

Description

CartErrorType

Cart error types for categorization and handling

Used to categorize cart errors for logging, analytics, and customized error handling by Technical Support teams.

CartUpdateOperation

Cart update operation types

Defines the types of cart update operations for queue management and conflict prevention.

Functions

Interfaces

Interface

Description

AdditionalElementExtendAppConfig

AddToCartItem

Configuration for cart item addition

Supports both single product and multi-product addition patterns. Can be extended with custom properties for shop-specific needs.

AddToCartResult

Result of add to cart operation

Provides structured response for cart operations with success/error status. Includes optional response data and error messages.

ApplicationConfig

AppSettingsExtendedConfig

AssetFilesLoaderExtendedAppConfig

B2BExtendedConfig

BackInStockExtendAppConfig

CartAddItem

Interface for cart item to be added

CartAttributes

CartChangeResponse

Interface for cart change response

CartErrorContext

Cart error context for debugging and logging

Provides additional context about errors for better debugging and error tracking in production.

CartExtendedConfig

CartModalData

Rendered cart modal data

Contains the rendered HTML and metadata for displaying the cart.

CartRenderConfig

Configuration for cart rendering

Controls how the cart is displayed to users including style, currency formatting, and other display preferences.

CartResponse

CartState

CartUpdateRequest

Cart update request for queue management

Used internally to queue cart updates and prevent race conditions.

CollectionFilterExtendedConfig

ContainerInternals

ContainerOptions

EnhancedContainerOptions

FactoryProviderDef

FallbackExtendedAppConfig

FeaturedImage

FocusedElementRef

HTTPError

HTTPRequestConfig

HTTPResponse

HTTPServiceConfig

InterceptorManager

ModuleClass

ModuleMetadata

ModuleRef

OptionsWithValue

PerformanceMetrics

Platform

PlatformRouter

ProcessedCartItem

Processed cart item ready for template rendering

Extends the base Product type with formatted display fields and filtered options. Used by cart templates for rendering.

QuantityRule

RequestInterceptor

ResolveOptions

ResponseInterceptor

SearchExtendedAppConfig

SEOEnhancementExtendedAppConfig

ShopifyMetafieldExtendedConfig

SignalOptions

SimplifiedIntegrationExtendAppConfig

SlickInstance

Slick carousel instance interface for type-safe method calls.

Provides type definitions for interacting with an initialized Slick carousel. Represents the jQuery plugin instance returned by $('.element').slick().

SlickOptions

Slick carousel configuration options.

Defines the behavior and appearance of the Slick carousel used for recommendation widgets with carousel layout. For complete options reference, see: https://kenwheeler.github.io/slick/

StickyConfig

TemplateManagementExtendedAppConfig

ThemeCartConfig

TypeProvider

ValueProviderDef

Type Aliases

Type Alias

Description

Abstract

AdditionalElementThemeSettings

AdditionalElement Settings

AppBlock

ApplicationLifecycleEvent

AssetFilesLoaderState

AsyncFactoryProvider

B2BRequestParams

BoostTAEConfig

CartButtonSettings

Cart Settings

CartGeneralLayoutSettings

CartStyle

CartThemeSettings

ClassProvider

CollectionAndPageTabDescriptionSettings

CollectionAndPageTabTitleSettings

CollectionHeaderSettings

Constructor

CurrencyParams

DeepPartial

FactoryProvider

FilterTreeBaseElementSettings

FilterTreeCheckbox

FilterTreeElements

FilterTreeFilterOption

FilterTreeFilterTitle

FilterTreeLine

FilterTreeProductCount

FilterTreeRefineBy

FilterTreeSearchBox

FilterTreeSettings

HTTPMethod

IBoostTAE

ISWBaseElementSettings

ISWDidYouMeanResultsSettings

ISWDidYouMeanSettings

ISWElements

ISWProductCompareAtPriceSettings

ISWProductPriceSettings

ISWProductSalePriceSettings

ISWProductSKUSettings

ISWProductTitleSettings

ISWProductVendorSettings

ISWResultsSettings

ISWSettings

ISWTitleMultipleElement

ISWViewAllButtonSettings

LineSettings

OptionsWithValues

PaginationButtonStyleSettings

PaginationNumberStyleSettings

PaginationSettings

PlaceholderSearchSettings

Positions

PreOrderExtendedAppConfig

Product

ProductCountPaginationSettings

ProductImageGrid

ProductImageGridRow

ProductImgElement

ProductInfoElementSettings

ProductInfoInventoryStatusSettings

ProductInfoPriceSettings

ProductInfoTitleSettings

ProductInfoVendorSettings

ProductItemCTASettings

ProductItemGeneralSettings

ProductItemImageSettings

ProductItemInfoSettings

ProductItemLabelSettings

ProductItemsInfoElements

ProductItemThemeSettings

ProductItemVariant

ProductListThemeSettings

ProductMetaField

ProductSwatchItemSettings

Provider

QuickViewButtonOverallSettings

QuickViewButtonSettings

QuickView Settings

QuickViewThemeSettings

RecommendationExtendedAppConfig

RecommendationModelProperties

RecommendationPayload

RecommendationQueryParams

RecommendationResponse

RecommendationWidget

RecommendationWidgetControllerProps

Configuration properties for initializing the RecommendationWidgetController.

RecommendationWidgetControllerState

Internal state management for the recommendation widget controller.

RecommendationWidgetTrackingData

Tracking data structure for recommendation widgets.

Defines the shape of data stored for recommendation widget analytics and tracking. This data is persisted to localStorage to track user interactions with recommendation widgets and enable analytics reporting.

ScopedSuggestionItemSettings

ScopedSuggestionLabelSettings

SearchBaseElementSettings

SearchElementWithBackground

SearchHeaderTextSettings

SearchPageElements

SearchPageSettings

SearchProductCountSettings

StickyOverride

SupportedPage

Templates

ThemeSettings

TipForYouSettings

TitleTabSettings

Token

ToolbarElements

ToolbarFilterText

ToolbarProductCount

ToolbarRefineBy

ToolbarSettings

ToolBarShowLimitList

ToolbarSorting

ToolbarViewAs

Widget

WidgetDesignSettings