Skip to content

Cross-Sell Widget Methods

SmartCart.getAllCrossSellWidgetIdsArray.<string>

Get all cross sell widget IDs in Cross-Sell components in the current Smart Cart settings

SmartCart.getWidgetIdByComponentIdstring | null

Get the widget ID by component ID

SmartCart.hasCrossSellWidgetsboolean

Check if there are cross sell widgets in the current Smart Cart settings

SmartCart.getAllCrossSellWidgetIdsArray.<string>

Get all cross sell widget IDs in Cross-Sell components in the current Smart Cart settings

Returns: Array.<string> - Array of widget IDs

SmartCart.getWidgetIdByComponentIdstring | null

Get the widget ID by component ID

Returns: string | null - The widget ID

Param Type Description
componentId string The component ID

SmartCart.hasCrossSellWidgetsboolean

Check if there are cross sell widgets in the current Smart Cart settings

Returns: boolean - True if there are cross sell widgets