Shopping Cart History Feature

Hi Glide Community,
I am building this shopping app using Glide. I have created a table for the Shopping List giving below with some other header values

Now I want to add a feature which saves the shopping cart history when a button checkout is clicked. I want to know what is the best way to achieve this. I tried creating a new table for Shopping Cart History but I didn’t find a way to copy the existing Cart Items to the History table.

I want to add all the existing items in the shopping cart so that they can be referenced as a single purchase, maybe one row in the Shopping Cart History table.

Please guide

You can add a table with a column called “Item IDs”.

Add a rowID column to your Shopping List table.

Gather all item’s rowIDs that the user is checking out with, then add them to the History table as a comma-delimited list.

That way, you can later on use a split text column and relate back to the Shopping List table to know what items an order contains.

Hi @ThinhDinh , thank you for your response. I am trying to gather the item’s rowIDs after a button click action but I am not sure how to do it. Can you please let me know how to tackle this. Thanks

Do you mean this part? If you’re storing the user’s ID/email with the Shopping List table, you can do a query in the User Profiles column, targetting the Shopping List table, filter by ID/email is this row’s ID/email, and relation to the History table is empty.

Then, add a joined list column on top of that query to return the list of IDs that have not been submitted, and add it to the “Item IDs” column in History once the user submits.