Home > widget-integration > CartDrawerRecommendationController > hideEmptyRecommendationBlock
CartDrawerRecommendationController.hideEmptyRecommendationBlock() method
Hide the recommendation block when it contains no product items. Prevents showing an empty/broken layout in the cart drawer.
Signature:
protected hideEmptyRecommendationBlock(): void;
Returns:
void
Example
window.boostWidgetIntegration.extend('CartDrawerRecommendationController', (Base) => {
return class extends Base {
hideEmptyRecommendationBlock() {
// Custom logic before hiding
super.hideEmptyRecommendationBlock();
}
};
});