Home > widget-integration > CartDrawerRecommendationController > getWidgetDesignSettings

CartDrawerRecommendationController.getWidgetDesignSettings() method

Extract widget design settings from the recommendation container data attributes or from the TAE config (same approach as other recommendation widgets like volume-bundle).

Signature:

protected getWidgetDesignSettings(container: Element | null): Record<string, unknown> | null;

Parameters

Parameter

Type

Description

container

Element | null

The recommendation container element (optional, for data attribute fallback)

Returns:

Record<string, unknown> | null

Widget design settings object, or null if no settings found

Example

Override to merge additional shop-specific design settings:

protected getWidgetDesignSettings(container: Element | null) {
  const settings = super.getWidgetDesignSettings(container);
  return {
    ...settings,
    imageWidth: 400,
    numberOfProductPerRowSlideCart: 3,
  };
}