Results 1 to 8 of 8
  1. #1
    Join Date
    Mar 2011
    Location
    Portland, OR
    Posts
    8
    Plugin Contributions
    0

    cart error Problem - session consistency and Add to Cart buttons - CEON URI

    The main symptom I'm experiencing is that some customers are following a link to a product on my web site, then clicking the Add to Cart button, which then takes them to the "Your Shopping Cart is empty" page. The item can be added successfully to the cart by going to a category where the product is listed and clicking the Buy Now button under the product in the listing. I am able to duplicate this problem consistently using Firefox 3.6.13 on Windows XP by clearing my cookies (and cache, but I don't know if that is required), going to the below link, and clicking Add to Cart:
    http://arkhambazaar.com/oddities/other/cthulhu-fish

    What seems to be happening is that when I visit the link, Zen cart sets a zenid session cookie (I never really get the zenid in my URL, during this test, but sometimes I get it when browsing the site in general). However, when I click on Add to Cart, I appear to get assigned a new (and different) zenid session cookie. If I go back to the same product page, I see the item I tried to add is listed in the minicart in the righthand column. Perusing my cookies at this point shows that I have two active zenid session cookies. If I click on the shopping cart link it takes me to the same "Your Shopping Cart is empty" page. However, if I go to a category (like Oddities) and click the Buy Now button under the same product (the Cthulhu Fish), it takes me to my shopping cart with the product successfully added (but only the one I added with the Buy Now button, not the one I tried to add with the Add to Cart button from the product info page).

    While on the "good" shopping cart page, it seems like I normally only have the one "good" session cookie, but if I go back to the product page, I often have two... both a good and bad session cookie. This results in me being able to see the products that I tried to add to the cart using the Add to Cart button from the product page in the minicart (so if I add two of the same product, I see two in the minicart), but when I click to the Shopping Cart, I now see only the product I added with the Buy Now button from the category page (so only one of the product, versus the two showing in the minicart on the product info page).

    I am using Zencart 1.3.9g with the FEC module, one of the lightbox modules, Image Manager 2, and Ceon URI mapping. I started with a fresh install of Zencart 1.3.9g (back in October), applied customized templates, and added the newest versions of the above modules. I am using customized templates, but switching back to the Classic green template doesn't seem to fix the problem - it is still reproducible for me using the same method above - so I don't think it is directly a template problem.

    I think the problem has been ongoing since then, but it does not seem to affect all users... I sell stuff every day. After clicking around my site for a while, sometimes the problem seems to go away, or if I add a product that has variations (like a T-shirt with size options), that *sometimes* seems to "fix" the problem... then again, not always. Sometimes the problem persists for the initial product, however the product is not necessarily limited to the same Cthulhu Fish product, but it does seem to occur the most with products that do not have variations, as far as I can tell (I did have a customer tell me that he couldn't add a T-shirt with a size variation, though I haven't experienced that in my testing).

    This almost certainly has something to do with the Ceon module... when I turn it off I can't reproduce the problem, and everything works well. The reason I'm not posting this in the Ceon URI mapping support thread, frankly, is that I want to understand how the session/cookie management is becoming mucked up. If I can figure out for myself why Zencart is giving me a new session cookie when I try to add to cart, I think I can get at the heart of the problem and keep it from happening regardless of module usage. I am already seeking help from Conor by direct e-mail (but he seems to be gone for the weekend).

    My SSL certificate (though this problem appears before things start getting to the secure part of the checkout process) is for arkhambazaar.com (no www), so I have made adjustments to the site to only use arkhambazaar.com sitewide - it is specified in both my includes/configure.php file, and I have a Rewrite rule in my Apache config (I'm not using .htaccess files) that redirects www to non-www. My rewrite rules for the Ceon mapping module are also in my Apache config files, and I've doublechecked them against the installation instructions for the module.

    I've been through most of the forum entries I could find concerning similar subjects, but the causes seem to be many and varied (though I'm sure session management is the cause of all the symptoms), as are the solutions. None of the solutions I tried have kept me from reproducing the problem, but frankly it's hard to keep them all straight from the disparate forum entries, especially in the long third-party contribution support threads.

    Can someone describe to me what might be at the heart of these session issues? Any suggestions for fixing it? A solution would be great, but (as when I visit the doctor) I'd prefer a diagnosis, not just a pill (but the pill is okay too). Let me know if I can supply more information to assist with the diagnosis!

    Server info:
    PHP Version: 5.3.3
    Database: MySQL 5.0.51a-24
    HTTP Server: Apache/2.2.15

    Thanks in advance for any help!

    Brian

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Problem - session consistency and Add to Cart buttons - CEON URI

    If you turn off the SEO/rewrites does it start working properly?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Mar 2011
    Location
    Portland, OR
    Posts
    8
    Plugin Contributions
    0

    Default Re: Problem - session consistency and Add to Cart buttons - CEON URI

    Yes, that seems to be true. When I turn off the rewrites, Zencart seems able to keep track of my session, and I don't get two conflicting zenid cookies. I don't know if it's the Ceon module, though, or a server misconfiguration.

    It's driving me a bit bonkers

    For what it's worth, I do have control over all the software on the server... I set up all the packages (Apache, MySQL, PHP, etc.) and have access to the full configuration, so I can modify any of this stuff fairly easily as needed.

    Cheers

    Brian

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Problem - session consistency and Add to Cart buttons - CEON URI

    I don't know the conflict but it sounds like that is the cause of your problem ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Mar 2011
    Posts
    1
    Plugin Contributions
    0

    Default Re: Problem - session consistency and Add to Cart buttons - CEON URI

    hi i have i think the same problem
    please explain
    SEO/rewrite
    How to do this

    Thanks
    Warren

  6. #6
    Join Date
    Mar 2011
    Location
    Portland, OR
    Posts
    8
    Plugin Contributions
    0

    Default Re: Problem - session consistency and Add to Cart buttons - CEON URI

    I had a little help from Conor at CEON, though he was ultimately unable to devote time to my problem, so maybe someone here can help me get to the root of the issue, so I can fix it myself. He seemed to think that the problem had to do with Zencart's sessions, not the CEON mapping module (turning it off may fix the problem, but it seems only because all the products end up being on the same path, i.e. '/'... see below).

    The main problem seems to be that the zenid session cookie is getting set both for the path in the URL (so, '/oddities/other/cthulhu-fish' from the example above), and then when something is added to the cart, it sets a new zenid session cookie with a path of '/'. Those two cookies seem to be at odds with each other, as if Zencart looks at the zenid cookie with one path, and says "that's not right" then sets a new cookie with a new zenid, which causes the shopping cart to show empty.

    Does this help any of those more zenned than I to suggest a solution?

    I'm thinking that if I can find where the cookie path is getting set for the zenid cookies, I can maybe brute force it to set all cookies to the '/' path... is that something that might work? If you think it might, can you suggest what function I can perhaps alter to make that happen?

    Cheers

    Brian

  7. #7
    Join Date
    Mar 2011
    Location
    Portland, OR
    Posts
    8
    Plugin Contributions
    0

    Default Re: Problem - session consistency and Add to Cart buttons - CEON URI

    Well, early indications are that the problem is fixed.

    After posting my last reply, I happened to look at the release notes for 1.3.9h (I was using 'g') and noticed that a switch was added to default session cookie paths to '/'. Since that's what I was looking to do with brute force, I upgraded to 1.3.9h (since my version was fairly recent already, I just had to copy the altered files as listed in the documentation... a quick upgrade).

    For the sake of accuracy, I tested the site again, using the test from my first post, and it was still broken, so I logged into the admin and went to Configuration->Sessions, where I set "Use root path for cookie path" to true.

    I cleared all of my cookies, closed and reopened the browser, then went back to http://arkhambazaar.com/oddities/other/cthulhu-fish and clicked "Add to Cart."

    Lo and behold, I was taken to my shopping cart, now showing the Cthulhu fish, instead of "Your shopping cart is empty." On perusing my cookies, I could see that they were all getting set to the root path, and so the "cookie confusion" went away.

    In short, upgrade to 1.3.9h and set "Use root path for cookie path" in Configuration->Sessions to fix this particular "Your shopping cart is empty" bug, specifically while using the Ceon URI Mapping module.

    Brian

  8. #8
    Join Date
    Feb 2010
    Posts
    33
    Plugin Contributions
    0

    Default Re: Problem - session consistency and Add to Cart buttons - CEON URI

    Quote Originally Posted by w0rl0ck View Post
    Well, early indications are that the problem is fixed.

    After posting my last reply, I happened to look at the release notes for 1.3.9h (I was using 'g') and noticed that a switch was added to default session cookie paths to '/'. Since that's what I was looking to do with brute force, I upgraded to 1.3.9h (since my version was fairly recent already, I just had to copy the altered files as listed in the documentation... a quick upgrade).

    For the sake of accuracy, I tested the site again, using the test from my first post, and it was still broken, so I logged into the admin and went to Configuration->Sessions, where I set "Use root path for cookie path" to true.

    I cleared all of my cookies, closed and reopened the browser, then went back to http://arkhambazaar.com/oddities/other/cthulhu-fish and clicked "Add to Cart."

    Lo and behold, I was taken to my shopping cart, now showing the Cthulhu fish, instead of "Your shopping cart is empty." On perusing my cookies, I could see that they were all getting set to the root path, and so the "cookie confusion" went away.

    In short, upgrade to 1.3.9h and set "Use root path for cookie path" in Configuration->Sessions to fix this particular "Your shopping cart is empty" bug, specifically while using the Ceon URI Mapping module.

    Brian
    Was you able to fix the problem? I would really appreciate if you can share the solution..

 

 

Similar Threads

  1. Problem with CEON URI Mapping
    By nicksab in forum All Other Contributions/Addons
    Replies: 8
    Last Post: 23 Apr 2014, 03:42 PM
  2. v151 Ceon URI Mapping (SEO) installation problem.
    By jmac2020 in forum General Questions
    Replies: 1
    Last Post: 23 Oct 2012, 01:06 PM
  3. v150 Problem with Ceon Uri Mapping Add on
    By GodfatherAntiques in forum General Questions
    Replies: 5
    Last Post: 2 Jul 2012, 08:04 PM
  4. Replies: 3
    Last Post: 25 Oct 2010, 04:39 PM
  5. Ceon URI Mapping (SEO) Module and Blog = problem!
    By linda408 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 21 Oct 2009, 04:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg