I need some help with a launch-blocking issue on my Bubble application.
I’m building a platform to sell three types of interior design packages. However, we’ve hit a major problem with the shopping cart: when a user adds a package to the cart, navigates to another page, and then returns to the cart, the item is gone.
My development team has suggested this might be a Bubble limitation. It’s crucial for items to remain in the cart so customers can continue shopping.
Could you please advise on how to make the cart’s data persist throughout a user’s session?
Just as @senecadatabase said, my guess is that you are storing the data as a custom state, where you need to create the cart as a data type, then have that update. This will then stay with the user even if they log off and return 6 months later.
@erica1 keep in mind with the suggestion above the user MUST be logged in under a registered account when making the cart or they need to be logged out and then create a new account and create the cart for this to be true of their ability to return 6 months later. Bubble has built in cookies, where a logged out unregistered user can create data and for up to 72 hours if they return and create an account, then Bubble automatically maps their account to that created data as the built in field of ‘creator’. This cookie feature does not work for a logged out user who then logs into their pre-existing registered account.
Best choice would be Local Storage as you do not need the user to be logged in, nor do you need to create anything in database, and can just rely on the user returning to the site using the same device and browser. Local storage only persists across the same browser and device.