Clean All - Wishlist
Clear the visitor's saved items for one configured post type. Use it as a deliberate list-management action on a wishlist page or saved-content panel, with an optional confirmation popup.
Setup and First Use
Before starting, enable the relevant element or feature family under Bricks → BricksUltimate → General Elements, save, and reopen the Bricks editor. Integrations also require their corresponding plugin to be active.
- Enable Favourite/Wishlist and create a working saved-items list first.
- Add (BU)Clean All - Wishlist outside the repeated wishlist cards so it appears once.
- Set Post type to match the list that should be cleared.
- Choose Button type, enter clear Button Text, and set an accurate Aria label.
- Enable confirmation modal if clearing the list should require confirmation. Edit its nested content and set Cancel button selector and Confirm button selector to the actual controls.
- Style the button, loading feedback, modal, and backdrop; test cancel, confirm, and the final empty state.
Controls and Settings
| Control | Purpose and usage |
|---|---|
| Post type | Clears that list, not every wishlist across all post types and not other users' lists. |
| Button type / Text / Aria label | Choose a normal button or plain-link presentation and make the destructive action clear. |
| Size / Style / Circle / Outline | Button variants apply when the Button type uses button presentation. |
| Icon / Loading / Hover | Customize visual states and keep the loading state recognizable. |
| Enable confirmation modal | Adds the confirm/cancel workflow. Use Show preview on builder to edit the popup content. |
| Cancel / Confirm button selector | Must match the nested controls you actually create. A mismatched selector leaves a visible dialog without a working action. |
| Modal / Backdrop | Set background, border, shadow, dimensions, and overlay behavior with narrow viewport checks. |
List Scope and AJAX Updates
Clearing the product wishlist should not clear saved articles if their post types differ. Counters and listings must use the same saved-list context to update consistently. Verify AJAX-rendered panels as well as a full page reload after clearing. This is not an admin bulk-delete tool for all customers.
Confirmation and Empty Presentation
Explain the scope in the dialog, for example Remove all saved products? Provide a clear Cancel action and avoid using the same CSS selector for both buttons. After success, display the wishlist's empty state and hide list-only actions where appropriate; an empty frame and active Clear All button are confusing.
Practical Example
Place Remove all saved products above a product wishlist. Enable confirmation, use unique .wishlist-clear-confirm and .wishlist-clear-cancel selectors, then confirm that Cancel changes nothing and Confirm clears the list and counter.
Troubleshooting
- Nothing clears: check Post type and inspect the AJAX response.
- Modal opens but buttons do nothing: fix the confirmation selectors.
- Unexpected list clears: correct the configured post type before publishing.
- Stale cards remain: inspect the saved-list refresh wrapper and page caching.