Wishlists / Favourites

Allow site users to favourite posts and/or add products to a private wishlist. Supports use with SureCart v3+ products, WooCommerce products & any other post types. Query loops can then be used to output the users’ chosen items for each post type.

[Feature upcoming]

Common Use Cases

  • Users creating a shopping wishlist of products to come back to purchase.
  • Users creating a ‘Favourite’ blog posts list.
  • Users building a ‘Watch Later’ list for videos posts.
  • Users saving their favourite recipes.

This element is in development. If there’s a particular use case you have, or any functionality that you’d like to see built here, send in feature requests with your idea. This documentation is still being written.

Wishlist Button

The nestable Wishlist Button element handles all the functionality, and can be used for three different behaviours..

  • Adding/removing current post/product from users wishlist or favourites (from the current post being viewed or inside of a query loop).
  • Clear a specific item from the list (when used inside the users list).
  • Clear a list completely.

Access

By default the functionality is only available to site members when logged in, the buttons are automatically disabled for logged out users. The data (only the post ids for each list created) is stored in the user’s meta data for each time the user returns.

If you wish to allow logged out users to start to create their own lists before logging in, you can choose the ‘allow all’ option in the access setting. This will make the wishlist buttons active for all users, whether logged in or out. In this case, for logged out users they will be storing their choices as a 7 day cookie. After logging in, the data is then stored in the user’s meta data instead. (no cookies are added unless the user actually uses the button/feature)

(our recommendation is to encourage users to login to use this type of feature, as then they can visit the site from any device/browser and see their saved posts).

Wishlist Query Loop

The Wishlist Button element is for adding/removing items from a user’s list. But you’ll also need to display that list somewhere, which can be done using the Wishlist Query Loop.

Simply set a query loop to ‘Wishlist’ and then output your posts or products like you would any standard query loop. In the image below, we’re using the nestable table element to output the users product selection.

To allow the user to remove items while viewing the list, use the Wishlist Button element inside of the loop and set behaviour to ‘Clear item from list’. Clicking that button with then remove that specific item from the list.

Tooltips

Tooltips can be added to the buttons to help with visual feedback for when the user interacts with the element. The tooltip content can be changed based on whether an item has been added, removed, or if the button is disabled.

The usual tooltip settings are available for lots of behaviour & style customisation.

This content is restricted to BricksExtras users. Login if you already have an account.

Note that ‘Element Interactions’ must be enabled in BricksExtras > Misc settings.

This element adds new triggers to Bricks’ interactions options, so you can trigger actions based on the state of the element.

Triggers

Item added – triggered the moment the item has been successfully added
Item removed
– triggered the moment the item has been successfully removed
All Items Cleared
– triggered the moment all items have been successfully removed

Options

Delay – How long to wait after the event until the chosen action takes place .

This content is restricted to BricksExtras users. Login if you already have an account.