Home > widget-integration > CartDrawerRecommendationService > getWidgetConfig

CartDrawerRecommendationService.getWidgetConfig() method

Get widget configuration from TAE recommendationWidgets.

Override this method to provide custom widget configurations or fallback values for specific shops.

Signature:

protected getWidgetConfig(widgetId: string): {
		widgetName: string;
		widgetDesignSettings: CartDrawerWidgetDesignSettings;
	} | null;

Parameters

Parameter

Type

Description

widgetId

string

The widget ID to look up

Returns:

{ widgetName: string; widgetDesignSettings: CartDrawerWidgetDesignSettings; } | null

Widget config with name and design settings, or null if not found

Example

Override to provide a custom widget title:

protected getWidgetConfig(widgetId: string) {
  const config = super.getWidgetConfig(widgetId);
  if (config) {
    config.widgetName = 'You May Also Like';
  }
  return config;
}