Local Storage & Key-Value Pair

Hi, everyone:

I am trying to set up my shopping cart in local storage for the first time. I am not sure whether to use one of the storage plugins or the toolbox plugin as I am having trouble testing them out. I have noticed that the plugins ask for data to be in key-value pairs, and the data I have looks like the following:

Obj1 = {“Item”: “Membership”, “Version”: “VIP”, “Price”: 40}
Obj2 = {“Item”: “Sunday Dance”, “Version”: “2Hr”, “Price”: 20}

My understanding of my example is that there are 6 key-value pairs, but isn’t there a way to store the data so that key = Obj and value = {…}?

Or is my approach in setting up a cart for logged-out users completely wrong?


Get the Floppy plugin by @keith for all your local storage needs and much more!

I swear that it will do what you need and then some. Pretty sure Floppy saved my cat from a tree the other day!


Glad that Floppy and I could save the cat. As I gently descended to Earth using my superpowers, the cat asked, “Can has drag/drop cross repeating groupseses?” And I said, “Yes cat, after I fix these bugs.” And then, everyone applauded, saying, “Thank you, sir!”


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