Home > widget-integration > CartDrawerRecommendationController > hideProductFromWidget

CartDrawerRecommendationController.hideProductFromWidget() method

Hide a product from the recommendation widget. Uses CSS display:none for immediate visual feedback.

Signature:

protected hideProductFromWidget(productItem: HTMLElement): void;

Parameters

Parameter

Type

Description

productItem

HTMLElement

The product item element to hide

Returns:

void

Example

Override to use a custom animation or delay before hiding:

window.boostWidgetIntegration.extend('CartDrawerRecommendationController', (Base) => {
  return class extends Base {
    hideProductFromWidget(productItem) {
      productItem.classList.add('rcu-item--sold');
      setTimeout(() => super.hideProductFromWidget(productItem), 500);
    }
  };
});