Add to Favorites

Available in Zephyr version 8.29 and later. Live example

Every logged-in user can create their own list of favorites items (wishlist) via the "Add to Favorites" Button element.

This element works for all post types (posts, pages, products) including custom.

For logged-in users:

  • first click on the "Add to Favorites" button saves the current item to their list (user specific custom field).
  • second click will delete the current item from their list.

For unregistered users:

  • click on the "Add to Favorites" button shows the message specified in element settings.

Saved favorite items can be shown via the Post List and Product List elements. Learn how.

Currently, the "Add to Favorites" Button element doesn't take into account cached pages, so it's recommended to disable HTML caching for logged-in users.

"Add to Favorites" Button on product pages #

Open the template you use for the product page at Templates > Page Templates and include the Add to Favorites Button element.

"Add to Favorites" Button in the Grid Layout #

Open the Grid Layout you use for the list(s) of products at Templates > Grid Layouts and include the Add to Favorites Button element.

"Add to Favorites" Button Customization #

Element settings allow you to choose the button's style, show/hide the favorites icon, specify the labels for different button states, and customize the notification message for non-logged users. 

How to Show Favorite Items #

Add a Post List or Product List element and set it up to Show > Favorites of the current user

Every user can see only their own favorite items.

Unregistered users will always see the "No results found" state of the list element.