Sending a List of Text as a parameter joining each item with characters

Hello :woman_kneeling: :woman_kneeling: :woman_kneeling:

I would like to send each item on a List of Text into a parameter, joining each item with “&c=”.

HOWEVER, sending it into a parameter converts “&c=” into “%26c%3D” which interferes with my regex extracting :sob: :sob: :sob:

Long Long Long Backstory:
My ultimate goal is to make a cart system that does not need users to sign in using URL appending for each item they add to the cart. In which I use a URL appender plugin which looks like &c=11111&=c22222&c=33333 for each Cart thing’s unique ID.

The URL is then extracted with regex to identify each Cart thing to display the items added to the cart. This List of Text of unique IDs is stored in a custom state, so that it can be manipulated, such as to be deleted.

ALL IS GOING SWELL UNTIL :cloud_with_lightning_and_rain: :cloud_with_lightning_and_rain: :cloud_with_lightning_and_rain:

I need to delete a Cart thing. I taken out the unique id to be deleted from the custom state. But as I want to change the parameter… sending the parameter into the URL turns my & into %26 and my = into %3D :volcano: :volcano: :volcano: :volcano:

AFTER CONQUERING SO MANY OBSTACLES TO MAKE THIS HAPPEN I am left with this one small obstacle which is to send &c= into my URL without it changing into %

PS: I also tried thought I had a big brain moment to directly use %26c%3D and I laughed at the results because it converted my % into %2526c%253D LMFAO

:woman_kneeling: :woman_kneeling: :woman_kneeling: :woman_kneeling: :woman_kneeling: I am exasperated, tired, mentally drained, and I hereby desperately, humbly, seek for the bubble gods’ enlightenment.

Hi @weiean

Two possible approaches I think:

If you don’t want people to sign in, there’s no need to send them to a different page for cart or checkout, you can do it all on one page.

USE STATES: Create a Page State called Cartwhich is a list of products. When user adds product to cart, add it to the list. I think you can figure out the next steps from here!

Or just go to your user data type and add cart type which is list of products

You can then add products to the current user’s cart and it should be saved across pages as even if a user is not signed in, there’s still a user created by bubble during the session.

Let me know if you have any questions if anything is not clear!

Hope that helped!


Parshva | Book a call

Replace ‘join with’ with ‘append’ then use the format as text operator on a search for item by cart id.

Your separator will be &c0=

&c(calculate this field + 1)=

This topic was automatically closed after 70 days. New replies are no longer allowed.