Marketplace Buy/sell

Hi I am building an marketplace type app, where users can buy/sell products. Wondering how to handle non-logged/signup buyers users. How to create a shopping cart for non logged in user.

Please share any idea, Thanks in advance.

Create a new cart when a user adds their first item, and connect it to the ‘current user’ - even though the user isn’t signed up or logged in you can still store and access data on the current user as you would if they were signed up as Bubble stores temporary user data for 3 days.

If you need/want to store the user’s cart for longer than 3 days then you can set your own cookies on the user’s browser and store the cart there (just store the unique ID of the shopping cart on the cookie).

Thanks for the quick reply. That makes sense. So if they were to checkout and pay(they will have to provide some email id). Then i can create a user with that email. Will that work?

Yes, if you run a ‘sign the user up’ action in a workflow, the current user will be changed from a ‘temporary’ user to a ‘permanent’ user and will appear in the database, and any info you’ve stored on the user will still be there, provided it’s within 3 days since the temporary user was created.