7 replies [Last post]
mikejoconnor's picture
Offline
AdministratorBug FinderGetting busy with the Ubercode.
Joined: 08/07/2007
Juice: 536
Was this information Helpful?

Before the crash I remember a post about caching problems with anonymous users and the cart block. Was this ever resolved?

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Anonymous users and the cart block

I'll cross-reference this post:
http://www.ubercart.org/forum/bug_reports/392/problems_caching

I am not sure what part of the problem persists, but I don't remember doing anything specific to address it. I remember noticing it first at bwv's store but not on the Livetest, and I think it may have been due to our performance settings like mimetic2 suggests.

I think we'll really need more info to address this.

mathews.kyle's picture
Offline
Joined: 08/09/2007
Juice: 44
Re: Re: Anonymous users and the cart block

Caching problems with anonymous users still definitely exist.

Two customers pointed out problems. One added a product, then removed it and added two others. When he went to example.com/cart and example.com/cart/checkout -- both still had listed the first product that he'd added then removed.

The second was filling out his credit card info and mistyped his expiration date. When validation failed, he typed the expiration right and was ushered on to the review page. But the first expiration date for his credit card was showing up.

Luckily both still bought something:>

I found a module that has solved that problem for me in the meantime:
http://drupal.org/project/cacheexclude

I added these pages to be excluded from the cache and it seems to have solved any problems.
cart
cart/checkout
cart/checkout/review

This module might be a good source of code to add directly to ubercart to fix the caching problem.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Re: Anonymous users and the cart block

Good call. I think I may have noted that module in the past and forgotten about it. It would be very simple to copy that module's hook_exit() into uc_cart.module. Putting it on my battle plans.

EDIT: The module's author posted a link to this post which is another (better?) interesting solution - http://www.drupal4hu.com/node/48.

mikejoconnor's picture
Offline
AdministratorBug FinderGetting busy with the Ubercode.
Joined: 08/07/2007
Juice: 536
Re: Re: Re: Re: Anonymous users and the cart block

Will the cart block be affected by this issue?

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Re: Re: Re: Anonymous users and the cart block

I imagine so, because I was having an issue w/ a dynamically generated block at my wedding website. I'm not sure when blocks started getting cached, though, or how that might be stored differently from pages.

mikejoconnor's picture
Offline
AdministratorBug FinderGetting busy with the Ubercode.
Joined: 08/07/2007
Juice: 536
Re: Re: Re: Re: Re: Re: Anonymous users and the cart block

What do you think about an ajax cart block. That way you could have caching enabled with no worries.

Mike O.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Re: Re: Re: Re: Re: Anonymous users and the cart block

Hmm... very interesting idea. The e-commerce module's cart block simply shows a link to the cart view page, and we could use something similar as the default block then fill in the contents w/ AJAX.

I like it. (Although I don't know that I could get on it right away.)