widget-integration package
Classes
|
Class |
Description |
|---|---|
|
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 - ### Cart Opening Behavior - ### Theme Integration - ### Accessibility & Focus Management - ## Common Customization Patterns | |
|
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 | |
|
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 | |
|
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 | |
|
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. | |
|
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. | |
|
Data model for recommendation widgets containing configuration and product data. | |
|
Service for managing recommendation widgets and their data. | |
|
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 |
|---|---|
|
Cart error types for categorization and handling Used to categorize cart errors for logging, analytics, and customized error handling by Technical Support teams. | |
|
Cart update operation types Defines the types of cart update operations for queue management and conflict prevention. |
Functions
|
Function |
Description |
|---|---|
Interfaces
|
Interface |
Description |
|---|---|
|
Configuration for cart item addition Supports both single product and multi-product addition patterns. Can be extended with custom properties for shop-specific needs. | |
|
Result of add to cart operation Provides structured response for cart operations with success/error status. Includes optional response data and error messages. | |
|
Interface for cart item to be added | |
|
Interface for cart change response | |
|
Cart error context for debugging and logging Provides additional context about errors for better debugging and error tracking in production. | |
|
Rendered cart modal data Contains the rendered HTML and metadata for displaying the cart. | |
|
Configuration for cart rendering Controls how the cart is displayed to users including style, currency formatting, and other display preferences. | |
|
Cart update request for queue management Used internally to queue cart updates and prevent race conditions. | |
|
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. | |
|
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(). | |
|
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/ | |
Type Aliases
|
Type Alias |
Description |
|---|---|
|
AdditionalElement Settings | |
|
Cart Settings | |
|
QuickView Settings | |
|
Configuration properties for initializing the RecommendationWidgetController. | |
|
Internal state management for the recommendation widget controller. | |
|
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. | |