Home > widget-integration > RecommendationModule

RecommendationModule class

Signature:

export declare class RecommendationModule 

Constructors

Constructor

Modifiers

Description

(constructor)(moduleRef, appService)

Constructs a new instance of the RecommendationModule class

Properties

Property

Modifiers

Type

Description

appService

protected

AppService

moduleRef

protected

ModuleRefImpl

Methods

Method

Modifiers

Description

connectWidget(widget, block)

protected

Connects the widget controller to the DOM element. Override this method to customize widget connection parameters or add pre-connection logic.

handleBlockInitError(error, block)

protected

Handles errors during block initialization. Override this method to customize error handling, reporting, or recovery logic.

onInitBlock(block)

protected

Called when a recommendation block is initialized. Override this method to customize widget initialization or add shop-specific setup logic.

parseWidgetId(blockId)

protected

Parses the widget ID from the block ID. Override this method to customize widget ID extraction logic for different shops or naming conventions.

setupBlockListener()

protected

Sets up the TAE App block listener for recommendation widgets. Override this method to customize block registration logic or support additional block types.