Creating a favorite feature in bubble

Hello, I want to include a favorite feature on the product page on a marketplace I’m building but I’m out of ideas on how to go about it any help or suggestions would be very much appreciated .

So, I suppose you have at least 2 data types User and Product. And you’d like users to be able to add products to their favourites?
If yes, you can create a separate Data Type “Favourites” and store User - Product relation there (when user clicks on “add to favourites icon” → create a new Favourites, where User = Current User and Product = Current page/current cell/parent group product (depends on where you are displaying the icon).

P.S. There is also an option to use list fields, but they are recommended for storing relatively small (<100 items) of items.

it worked but when i want to display my selected favorites on a page it seems to show only the first selected product

Share how are you doing a search.

when i make it a single favorites it only displays the first selection

Hello, do you mean you want to have a feature where usre will be having there favourites and if they went to the favourite page the user should be able to see the product on the list osmf his/her favourites.
Am i right?

yes you are right that’s what i’m trying to achieve

1 Like

If that is what you are looking forward to…
You don’t need to have another data type for favourites.
What you just need is that creat a field in the product datatype, name it favourite and let it be type user and make it a list field.

After that add an icon for each product (maybe like icon :heart:, ☆), then set a workflow on the icon that when the Icon is clicked its should make changes to product I.e current cell product or parent group product the you should the favourite field then you add instead of ‘=’ you will use ‘add’ current user.

Now on the user favourite page what you will query for is that do a search for product then you add a constraint then you add the favourite field, the you will use contain syntax then next current user.

It’s will definitely shows all the product that the current user has liked.

I think these should lead you through if you think you need much explanation on this. You can get back to me on mail

I’ll love to help you archive that.

1 Like

thanks it worked!!

My pleasure, will like to help more if you want.:+1: