I have found how to set/get browser cookies using older versions of EE (1&2) and can obviously do this also in EE 3 using legacy functions/libraries.

How would I do this in EE 3 NOT using legacy functions?

I would like to store a shopping chart for not yet registed users.


EE3 still uses the legacy Input library internally, so the same methods apply.


Or, use the Cookie Helper.

The one new method you can use for getting a cookie is the Request service.

ee('Request')->cookie($name, $default_value);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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