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.

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

Returns: Array. - Array of widget IDs

SmartCart.getWidgetIdByComponentIdstring | null

Get the widget ID by component ID

Returns: string | null - The widget ID

ParamTypeDescription
componentIdstringThe 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