Page 1 of 1

Cookie Info when adding product to the cart

Posted: Thu Apr 15, 2021 3:39 am
by ash_sp99
Hello,

I am using opencart 2.1.0.2. We want to know when we add the product in the cart then info is added in the phpsessionid and no separate cookie is created.

Is that possible, when product is added in the cart by the Guest, then one cookie is created either empty or simple value 1, so we can use that cookie to serve cache or non cache content. And when product removed from cart or purchased then the cookie is deleted.

We required this cookie, to use Cloudflare Bypass cache on cookie page rule.

Thanks in advance.

Re: Cookie Info when adding product to the cart

Posted: Thu Apr 15, 2021 5:28 am
by straightlight
ash_sp99 wrote:
Thu Apr 15, 2021 3:39 am
Hello,

I am using opencart 2.1.0.2. We want to know when we add the product in the cart then info is added in the phpsessionid and no separate cookie is created.

Is that possible, when product is added in the cart by the Guest, then one cookie is created either empty or simple value 1, so we can use that cookie to serve cache or non cache content. And when product removed from cart or purchased then the cookie is deleted.

We required this cookie, to use Cloudflare Bypass cache on cookie page rule.

Thanks in advance.
I would not suggest this solution.

Re: Cookie Info when adding product to the cart

Posted: Thu Apr 15, 2021 6:16 pm
by paulfeakins
ash_sp99 wrote:
Thu Apr 15, 2021 3:39 am
We required this cookie, to use Cloudflare Bypass cache on cookie page rule.
Rather than talking about cookies and sessions, can you tell us what the problem actually is?

Re: Cookie Info when adding product to the cart

Posted: Sat Apr 17, 2021 4:28 am
by ash_sp99
there is no problem, using that cookie we can serve the differentiate between in new and repeat visitor and serve the content faster from the cache.