Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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
Comment #1
torgosPizzaYou 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
Comment #2
Erik Seifert CreditAttribution: Erik Seifert commentedTry 2.0-beta1 Version. And remove following paths from caching by boost:
uc_ajax_cart
uc_ajax_cart/*
Should work.
Comment #3
quicksilver1024 CreditAttribution: quicksilver1024 commented"And remove following paths from caching by boost:"
How do you do that?
Thanks.
Comment #4
torgosPizzaI think you do that by adding the paths to the Boost "ignore these paths" settings field.
Comment #5
Erik Seifert CreditAttribution: Erik Seifert commented#4 Correct ;- )
Comment #6
quicksilver1024 CreditAttribution: quicksilver1024 commentedSorry 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!
Comment #7
Erik Seifert CreditAttribution: Erik Seifert commentedYes ;- )
admin/settings/performance/boost
Statically cache specific pages: Cache every page except the listed pages
Now add these lines in the textarea below
Comment #8
quicksilver1024 CreditAttribution: quicksilver1024 commentedCaching 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!
Comment #9
Erik Seifert CreditAttribution: Erik Seifert commentedDo you have the correct version ? ( uc_ajax_cart 2.* ) . You must also update your .htaccess file with boost settings.
Comment #10
quicksilver1024 CreditAttribution: quicksilver1024 commentedYes, I have the correct version and also I have made the necessary additions to the .htaccess file in my installation folder. :X
Comment #11
torgosPizzaHave 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.
Comment #12
a_c_m CreditAttribution: a_c_m commentedThis with the latest version of Boost works for me!
Comment #13
a_c_m CreditAttribution: a_c_m commentedOne 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.
Comment #14
edulterado CreditAttribution: edulterado commenteda_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.
Comment #15
stewart.adam CreditAttribution: stewart.adam commentedBoost 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?