I’m building a grocery app, where users click on items in a menu and it gets added to their basket.
But bubble doesn’t allow duplicate items in a list.
Here’s the problem: How do I get it so that when a new user logs in to the store’s app, and adds 2 bread bags, and 3 toothbrushes to their basket? How do I get the user’s basket list to have multiple instances of the same thing ?
It doesn’t work though.
I have exactly what you’ve said, but in the thing “cart”, where this is the list “items”, if I add more than one instance of the same item, since bubble does not allow duplicates of the same item, it doesn’t get added to the list at all.
I think you may need to consider how you could configure the database…
I haven’t made a shopping cart yet, but I would be soon and with all my projects will do the same thing which is to find online a database scheme or design to follow and tweak to my own needs.
In my mind I would create a database type of shopping cart…then I would have the datafields of product, quantity etc.
I would on the page create a set of custom states to reflect the products and quantities.
At the end of the shopping experience I would transfer all the custom state values to the database of cart…
Again I haven’t made one yet, nor have I looked at a database design online for an e-commerce platform but from what I know about bubble those would be my first thoughts on how to accomplish it because I don’t think having a shopping cart that is just a list of products would be very conducive to adding or subtracting items ( or quantities of items ) or helping with user experience of seeing total costs etc.
I have question regarding this “Cart” topic, but more on the item’s stock.
3 data types;
Product (field; product name, stock count)
Cart (fields; Product, purchased quantities)
Order (fields; list of Carts)
My scenario is like a normal e-commerce shopping cart, where a customer put multiple products with each product has its own quantities. For example, a customer would like to buy Apple x 5, Orange 2, so they put those in the cart and I created two Cart entry. Now when a customer made payment, I created an Order entry. Next I want to deduct the purchase quantities of each fruit from their respective Product Things’s stock count.
How do I do that, mind sharing with me any ideas? I can’t find a solution to change List of Things to List of Things. Tried so many ways.