Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
1) User adds item to cart, Ajax refreshes the cart pane
2) User clicks back button to return to a previously viewed page
bug: the items added to cart in 1) are not shown
Comments
Comment #1
tunicBug confirmed. I'm working on it.
Comment #2
tunicI guess that when page is loaded browser uses a cached copy, so cart info is outdated. It has been fixed adding an option to force reload of cart contents with registered users on page load. This solution may put a little bit load on server (because server must calculate cart content on every page served and when ajax call is made).
I don't know if there's a way to detect, in JS layer, if page is loaded from server of loaded from browser cache. if there's a way to know this JS layer could make the ajax call only when a cached copy is used.
Commited fix to dev.
Comment #3
sirleech CreditAttribution: sirleech commentedTested latest dev, this fix works. Nice job.