How do I make products that I have saved as favorites appear when a specific person logs in?

How do I log in with one account and collect products as favorites so that when a specific person logs in, they can see the products that I have collected?

Add a user specific Boolean column to your Products table. When a user wants to favourite a product, set that column to true. Use it as a filter.

I understand a bit, but are there any images, videos, or links I can refer to?

So you want one user to collect the favorites, and then allow a different user to view them?


Then you would have to save the users’ “favorites” into a basic column, since user-specific columns will make it impossible for users to share the “favorites” list.

Is row count a concern for you?

I think what I would do is create a new table that contains three columns (‘UserA ID’, ‘UserB ID’, and ‘Product ID’). How it gets populated is up to you, You could have one product per row, or you could have a comma delimited list of multiple products in one row per UserA/B combination . One way is simple to set up but uses more rows, and the other way is more complex to set up but uses less row. Basically when UserA wants to share a product with UserB, they would create a row in this new table with the ID’s for both users along with the Product Id.

1 Like