Home » Magento27 April 2010

Magento: Enable Cookies Problem

Problem:

When I try to add products to shopping cart, I get redirected to enable-cookies CMS page. Similarly, when I try to login as customer from customer account login, I get redirected to the same (enable-cookies) page.

The enable-cookies page asks me to enable cookies in my browser. The message says:

Please enable cookies in your web browser to continue

The page describes about Cookies and shows step-by-step instruction to enable cookies in browsers like Internet Explorer, Mozilla Firefox, and Opera.

When I check my browser options, I see that Cookies are enabled in my browser.

Solution:

There are two solutions:

1) Increase Cookie Lifetime

– Go to System –> Configuration –> General –> Web –> Session Cookie Management –> Cookie Lifetime = 5400
– By default, Cookie Lifetime = 3600. You can make it more than 5400 and try if it works.

2) Disable redirect to enable-cookies CMS page

– Go to System –> Configuration –> General –> Web –> Browser Capabilities Detection –> Redirect to CMS-page if cookies are disabled = No

The second one helped me. After implementing the second solution, I was able to add products to shopping cart page and was also able to login as customer.

Hope this helps. Thanks.

Magento

Get New Post by Email

Find me on

FacebookTwitterGoogle+LinkedInRSS Feed
  • It is really nice to see Magento help from your blog. Nice one. Keep it up.

  • jazkat

    I changed copy on this cookies site. I replaced it with “Your session has timed out”, because in my opinion that’s more often a problem as it happened to me constantly while testing. It never had to do with cookies…

  • Pingback: Kolya()

  • We had a couple of customers complaining they couldn’t log in, add to basket etc. I suspected it was because they had cookies disabled but couldn’t be sure.

    I created a test page that uses JS so when they rang up we could test if there browser would accept cookies or not:

    http://www.shore.co.uk/test

    Turns out every person that was having problems had cookies disabled. I’m working on a quick module that will display a warning at the top of the page when they first visit the site.

  • These solutions did not work for me.

    While I saw the problem rarely under 1.3, once I installed 1.4.2 this became a show-stopper.
    Firefox never suffers. It is only Opera and IE…

    I am using centOS. Updating NTP saved my bacon:
    http://www.voodish.co.uk/articles/magento-cookie-problem-in-ie-chrome-opera-fixed/

  • Anonymous

    trying checking the following values:

    SELECT * FROM core_config_data WHERE path LIKE ‘%cookie%’

    check that the cookie_domain and other settings are correct.

  • Alxrud

    Excellent! Worked for me!

  • Tjardo Krijt

    Just disabling the redirect isn’t good, because users won’t see any
    notice at all. If they try to login, for example, the page will simply
    refresh and they won’t understand why.

    There is a file for notices, which works perfectly for when javascript is turned off. In the folder
    appdesignfrontendbasedefaulttemplatepagehtml
    you can find the file ‘notices.phtml’

    A piece of code here SHOULD be activated to display a code on top of the page (I can’t post it because my comment won’t show with html code in it)

    However,
    it doesn’t seem to be displayed when cookies are disabled. Neither when
    “Redirect to CMS-page if cookies are disabled” is set to “no” as when
    set to “yes”.

    I’m not an expert on JS and PHP area, so anyone who
    could fill up above info with the solution part would be very much
    appreciated!

    —————
    I’m using Magento 1.7.0.2

  • nabz

    Praise the lord!

  • Geetika Sharma

    Still showing problem with Chrome? Let me know if any other solution you have!

  • Thanks alot, this solved my problem.