Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi and thanks for a great module!
The module works beautifully for authenticated users, but it doesn't for anonymous users. When you're adding something to a cart as anonymous user - "Empty cart" message still persists after page reload. But the anonymous cart is existing and visible in the admin section in "Shopping Carts" tab.
Main modules I've installed:
-authcache
-filecache
-commerce
-commerce_authcache
Please, try to reproduce the problem and see if it works for you. Thanks!
Comments
Comment #1
wadmiraal CreditAttribution: wadmiraal commentedThat's strange. I cannot reproduce this behavior. It works for me with anonymous carts (several anonymous users at once, all carts are different and correct for each user/session).
Did you try emptying your browser cache ? Force-reloading the page ?
Comment #2
jount CreditAttribution: jount commentedIt worked for me after disabling authcache debug mode.
I've been looking to php backtrace, and noticed that drupal_goto() was called with drupal_exit() after adding a product to cart, and "headers already sent" error appeared in Drupal logs. It seems anonymous session was not started because debug headers were sent from authcache on hook_exit. But I'm not 100% sure about it.
After disabling authcache's debug mode, everything worked for me. Hope this information will help people, who experience similar problem.
And thanks again for a great module!
P.S. For future UX improvement of the module - I think it would be great to have some ajax throbber indicating that cart block is currently loading.
Comment #3
wadmiraal CreditAttribution: wadmiraal commentedThanks for the information. This will certainly help other people as well.
As for the throbber, I fully agree. That's why I added a CSS class to the container while the AJAX request is made ;-). I do not want to add any styles or graphics to this module - I want it to be purely functional code. The class is "commerce-authcache-target". The div with this class will be replaced with the cart content. So you can add a throbber to the div background using CSS. It will disapear as soon as the content is replaced.
Comment #4
wadmiraal CreditAttribution: wadmiraal commentedChanging the status so other users with a similar problem find this.
Answer is in #2
Comment #5
wadmiraal CreditAttribution: wadmiraal commentedComment #6.0
(not verified) CreditAttribution: commentedfixed typos
Comment #7
WillowDigit CreditAttribution: WillowDigit commentedI am experiencing a slightly different yet related problem. Refer to Tutorial: Commerce Kickstart 2 and Authcache 2 to Mario Baron's problem.
' if the user visited a few pages before adding a product to cart if for whatever reason that user leaves the cart and returns to one of the pages previously visited the shopping cart view will return the "Shopping cart empty" value even thou there is an item inside the shopping cart.'
He did not install Commerce Authcache, yet I did hoping it would solve that issue, yet it did not.
I have enabled the modules as per the tutorial referred to. Using Drupal 7.28, commerce_kickstart-7.x-2.14, Authcache 7.x-2.0-beta3, and Commerce Authcache 7.x-1.0-beta1+0-dev.
Comment #8
IckZ CreditAttribution: IckZ commentedI've the same Problem as WillowDigit. I've also enabled the same modules as he did. Can anyone confirm a bug or is this such a missing setting or anything else?