Home > widget-integration > CartSelectors > updateCartCount
CartSelectors.updateCartCount() method
Update cart count in theme-specific cart icon
Exposes configuration to window and updates cart count using matched theme action Automatically detects current theme and applies appropriate update logic
Signature:
updateCartCount(cartItemCount: number): void;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
cartItemCount |
number |
Number of items in cart |
Returns:
void
Example
cartSelectors.updateCartCount(3); // Updates cart icon to show 3 items
cartSelectors.updateCartCount(0); // May hide cart count bubble for some themes