I want to add some custom data to persistent shopping cart like below:


  • Persistent shopping cart enabled
  • Session timeout set to idealy amount of time (eg: 1 week, 1 month)

Scenario (desired):

  1. Visitor visits website (not logged, doesn't add anything to cart)
  2. Prompt visitor to input some custom data (eg: body height, body weight, ...)
  3. Visitor inputs data then click Save
  4. Website saves this data to persistent shopping cart
  5. Several days later, visitor visits website again and this data remains on website, no need to re-input anymore.

How can I do that? When visitor hasn't added anything to shopping cart, is it possible to add custom data to cart? Where to add? Quote or something else?

P/s: I want to add custom data to persisten shopping cart because it seems like the most reliable solution I've known.

1 Answer 1


I did a little check on the persistent functionality and where the data goes. But as far as i can see the persistent row only gets created when a user logs in. But a sessions is made also for guests. If you want to register guest data i think you should use session. Example for get and set:


If you want to prompt a visitor to somewhere based on a condition you could use an event observer. For the form you'll need some custom frontend module. There's loads of tutorials, guides and even generators out there to help you with that.

If you really need the persistent cart feature for this i suggest that you store this information as customer data so it never disappears, if you want that to happen ofcourse.

These are my thoughts, it is untested but i think this is a good starting point. If you require more help just let me know. Goodluck!

  • Yes, I need a solution rather than details code. Thank you for your answer. I'll give a try now then get back later. Commented Jul 12, 2015 at 4:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.