Video by @Keith on building a cart the right way


I hope this is the right place to ask.

In one of his other videos early 2020 (Loom | Free Screen & Video Recording Software | Loom), @keith mentioned, that he’d record a video on how to create a cart the right way.

I searched the forum up and down and I couldn’t find anything that would be that video.

Does anyone know if he recorded that video, and where to find it?

Thanks a bunch!

Hey, @Sascha, I don’t think I ever got around to recording such a video - the one you point to above is basically what I have to say about carts, so I might have just been extemporaneously blabbing when I said that.

I assume you’ve seen the thread which inspired that video, but if you’re looking for this video in context, it originally appeared here:

Thanks for the reply, @keith . Appreciate it.

I was curious how you’d create a shopping cart, because I’m closely following your development and discussion regarding Floppy (already purchased it) and am really intrigued by it’s power.

Naturally, I was pondering to use it as an “offline” storage to allow users to create their cart in the browser (I’m not building a cart, but the concept is similar) and then have them push everything to the Bubble DB at the end with a button.

From reading your posts, I understand that you don’t recommend such an approach, so I was curious when I heard your remark in the video how you would actually do it. As you mentioned, creating these kind of things is a recurring theme in the community and it is easy to get it wrong or do it the wrong way.

Hey @Sascha yeah, what I was probably getting at is that I’d build a plugin to manage my cart and it would have features like storing the cart locally, etc.

In fact, I did build a plugin like that which was designed to be a generic solution for common cart problems in Bubble. However, it is very complex and fiddly because of how Bubble handles objects (which is to say, it basically does not easily let us deal with objects in the page) and I grew to hate its interface and got tired of working on it and didn’t want to explain how it works.

Floppy is sort of the kid sister of that plugin. And I know that people are going to use it to help them build carts (and it is helpful in that context for sure).

If I wanted to build a simple cart, I would probably do it mostly with the Floppy Reader element. If you haven’t played around with that, you should. Floppy Reader is a simplified version of Floppy in the sense that it doesn’t have all of the fancy “RAM List” features and utility actions and such.

But it lets you read and write up to 6 scalar and 6 list type keys from a single element, and each of those keys can be of different types. And what I would do is set it up to use the IndexedDB storage option, with the database named “MyApp” or something and the data store named to “Cart”. And it would have list keys for Products (type Product) and Quantities (type number) and whatever else I might want to know about my cart.

And now I can sort of think about the contents of the Cart datastore as containing a list of objects, even though it’s really several keys of different types (again, the whole “parallel lists” concept) and then I’d update items in it using Floppy Reader’s Store Keys action, which lets me update all of the keys at the same time.

(One might need individual Floppy elements to more easily manipulate individual items in the lists using the RAM List features, but one might not.)

If I ever get done with videos about all of the core Floppy features, I might do a video about how you might use Floppy in building a cart.

1 Like