Create custom product collections

Hello community! I hope you are well.

I am creating a directory of products and I want to allow users to create collections so that I can save products in each of them.

It would look something like this:

User creates:
Collection 1
Collection 2

User adds product 1 and 2 in collection 1 and then can view it in their collection lists

I tried to do it but I was creating duplicate products for each time the user wants to add something to the collection.

I would like to know if the user can create his list of collections and then add products in there without repeating information. I was thinking of a user-specific type column called collection in the products table and that in some way the user can insert the name of the collection, but I’m very stuck.

Any ideas?

EDIT: To clarify: The user adds to his collections products that have already been created by other users and are already published.

Thank you!

Do you use a form? If you try to use an “Add row” action on-submit then it will create duplicate records, because the form by itself already adds the row.

My idea of the structure should be something like this:

Collections table: RowID, Collection Name, Added By ID (User’s rowID)

Products table: Collection ID (Collection’s rowID), Product Name, Added by ID.

Then when the user has created a collection, you can show a form inside the collections view to let users add products to that specific collection. Use a special value component to add the collection ID to the new Product’s row.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.