简体   繁体   中英

Magento can I disable cookies?

I'm testing a new Magento site. I see each time a customer selects a product, if cookies are NOT enabled, they are unable to add product to the cart. Searching for a solution, I found a message that can be enabled to popup telling the customers cookies need to be enabled.... That's great but if a customer doesn't want to enable cookies a sale is lost.

  1. Is there a away to disable Magento from even checking if you have cookies enabled or disabled? In other words, I don't care if the customers have cookies enabled or disabled.

  2. Or is that the way Magento is created- Meaning it was created to check cookies in order to add product(s) to cart?

In order to maintain sessions so the cart will work when cookies are not being accepted by the client, you will have to enable SID with the Use SID on Frontend setting on the System=>Configuration=>Web=>Session Validation Settings section.

This adds an SID= parameter to the URL string.

Play with the above to see if it's stable enough in your environment to do what you're attempting to do, it's normally intended for use on sites that have certain issues when switching from insecure http to secure https or have the secure domain on a separate domain from the insecure content domain and is expected to be a supplement to SID cookies.

Magento expects cookies to be passed because you need to maintain state in order to have a cart remember who you are. This is done by establishing a session and then exchanging a cookie token back and forth so the customer/webserver interaction all connects together during the cookie lifetime. Things usually go south pretty quickly if you don't allow cookies to be set and you start having issues like Magento creating a new cart every time something is added to the cart, disappearing cart contents and general inability to use customer accounts.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM