I’ve built a “shopping cart” like functionality in the past using Bubble’s database and overall didn’t like the user experience. Perhaps I went about it the wrong way but here are the cons I ended up with (skip past these bullet points to get to my actual question):
- Updates to the user cart were slow (needing to wait for the database to update in order for the cart to update). Granted, when I say slow, I mean it takes a half second to a second… so it’s not a show stopper but it’s not great.
- Showing order totals and quantities is clunky - needing to set element states for quantities and totals on item groups in a repeating group, and then summing across the repeating group to get an order total.
- Saving carts to the database is nice because you can email existing customers with abandoned carts to increase conversion BUT Bubble does funky things with associating carts in the case when a pre-existing user is logged out, then creates a cart, then signs in (In my case the cart would “vanish” because Bubble wouldn’t intelligently recognize the signed in user as the one that had just been signed out, despite it intelligently working in cases where users did not have a pre-existing account)
- Finally, saving abandoned carts server side creates the janitorial requirement that I’d need to regularly flush stale carts. Not really an issue, but this gets more complex when trying to build a marketplace using Bubble (where you’re keeping track of multiple sellers plus all of their respective customer’s abandoned carts).
removeItem handle everything:
As you see, we are able to easily output a list of objects which I want to save to a user’s “Order” thing. What’s the best way to publish this list of objects to Bubble? Three lists? One for
ItemId, one for
price, and one for
quantity? Ultimately, I want my
orders database table to look like: