I’m building a little webshop and am storing all the data between product pages in a session, which then I call up in a controller.
But I am also using kirby uniform to collect buyer’s informations before the order is being placed. And I am doing this in a different page (checkout page) than where the form is (cart page).
I guess I can store also this informations in a session, or doing something else?
The only other option that comes to mind is to save the form in a page.txt and then loop over those values again to save them in another page.txt (for the final order page, with buyer’s infos and order infos — quantity, price, etc).
I’d like to keep both the order infos and buyer’s info in one page and create a new array by merging both dataset and then create a new page/file with that.
I would think storing it on the file system, even temporarily, is a security & data protection risk. The file contains a certain amount of personal information. If you must store it, do it in the session.
I guess you could use local storage but would have to use Javascript to get / set the values because its client side.
Alternatively, why not make the checkout page and the cart page the same page and make the page a wizard of some kind? Something like these.
Hey, thanks for replying as usual — took a break of sort from client projects the past two weeks.
Yes, I combined both cart and registration form in the same template. How do I go about binding Uniform’s send button w/ a hook that redirects the cart page to the checkout page right after you clicked on it?
I take it you want the checkout page to handle the form submission, right? Then all you need to do is set the form’s action attribute to the checkout page.
OK so, I moved the Uniform code in the cart template, but I still want to merge the form data with the checkout data (which handles the order’s informations).
I realise only now why two weeks ago I was asking this…
I see Uniform offers the SessionStore Action, and I did as they suggest, but the whenever I call the session, it says it’s null.
Are these two different forms you are storing in the session or why do you store user-form in the session and then try to get reg-form from the session?