ShoppingCart Widget
The ShoppingCart widget displays the current cart item count as a badge in a selected page element. It checks the cart when the page loads and updates the badge when a shopper adds an item.

Add the widget to a page
Load the widget through SitePages.config and select the page element where CyberStore should insert the badge.
<Control src="LoadWidgetControl.ascx"
FileLocation="ShoppingCart.html"
Options="badgeParentSelector: '.icon-banknote',
checkCartInterval: 5000" />
The selected badgeParentSelector can be an element ID, CSS class, or HTML element name. Confirm that the target exists in the page or theme where the widget is loaded.
Widget options
| Option | Default | Valid values or format | Effect |
|---|---|---|---|
badgeParentSelectorString | Not specified | Element ID, CSS class, or HTML element name | Identifies where the cart badge is inserted. |
checkCartIntervalNumber | 5000 | Milliseconds | Sets how often the widget checks the cart for an updated item count. |
For the cart rules behind the count, see Shopping Cart Logic.
Validate the badge
- Load a page that contains the configured badge target.
- Confirm the current item count appears after the page loads.
- Add an item to the cart and confirm the count updates.
- Test the page at the configured check interval to confirm the badge continues to reflect the active cart.