Hey there, I'm using boost + uc_ajax_cart, all is fine but after reloading the page, the cart become empty. Is there any solution to that?

Comments

torgosPizza’s picture

You might consider using authcache and this UC contrib: http://www.ubercart.org/contrib/13521

Also take a look and see if this issue helps: #679422-6: hook_exit() causes Ubercart "Add to Cart" to fail

Erik Seifert’s picture

Version:6.x-1.x-dev» 6.x-2.x-dev
Status:Active» Needs review

Try 2.0-beta1 Version. And remove following paths from caching by boost:

uc_ajax_cart
uc_ajax_cart/*

Should work.

quicksilver1024’s picture

"And remove following paths from caching by boost:"

How do you do that?
Thanks.

torgosPizza’s picture

I think you do that by adding the paths to the Boost "ignore these paths" settings field.

Erik Seifert’s picture

#4 Correct ;- )

quicksilver1024’s picture

Sorry to sound like a total noob, but do you mean this section of the Boost settings?
"Statically cache specific pages: Cache every page except the listed pages."

Thanks again!

Erik Seifert’s picture

Yes ;- )

admin/settings/performance/boost

Statically cache specific pages: Cache every page except the listed pages

Now add these lines in the textarea below

uc_ajax_cart
uc_ajax_cart/*
quicksilver1024’s picture

Caching for anonymous users using my shopping cart still doesn't work.
:'(

Is there a work around for Boost + Ubercart? Or can you please suggest a caching module that will work with anonymous shoppers?

Thank you, erikseifert!

Erik Seifert’s picture

Do you have the correct version ? ( uc_ajax_cart 2.* ) . You must also update your .htaccess file with boost settings.

quicksilver1024’s picture

Yes, I have the correct version and also I have made the necessary additions to the .htaccess file in my installation folder. :X

torgosPizza’s picture

Have you looked at the (sort of longish now) thread in my original reply?#679422-6: hook_exit() causes Ubercart "Add to Cart" to fail - It sounds like your issue might be the same thing I was having before, although I'm pretty sure the latest Ubercart-6.x-2.x fixes it. But give it a try anyway.

You'll want to read the entire thing to understand where we are with it. Could always use more people testing it.

a_c_m’s picture

This with the latest version of Boost works for me!

a_c_m’s picture

One final issue, it seems.

If you have normal caching turned off, but still have boost or similar enabled, the 'cache' variable (which is checked in uc_ajax_cart_block) will still be 0.

I think perhaps if uc_ajax_cart_cart_cached_load is enabled, it should overrule, cache.

edulterado’s picture

a_c_m: What do you mean by "this"? Are you referring to the solution in #7?

I'm using Boost (6.x-1.x-dev) and Ubercart Ajax cart (6.x-2.x-dev) and I'm unable to use both modules together. I don't know if I'm using the right versions to test the solution.

stewart.adam’s picture

Status:Needs review» Postponed (maintainer needs more info)

Boost now has support for automatically excluding ajax pages from the cache, although it would still be worthwhile to add 'uc_ajax_cart*' as one of the excludes just in case. There is also a non-Boost related known issue with the current releases that breaks the ajax cart for anonymous users when page caching is enabled with UC 2.7+, see #1317986: Updating to Ubercart 6.x-2.7 breaks Ajax Cart. It has been resolved in the latest dev release.

Can the issue be reproduced when using the latest dev of uc_ajax_cart and the latest Boost release?