-
-
Save bronius/6371145 to your computer and use it in GitHub Desktop.
One way around Drupal 7 Ubercart 7.x-3.5 cache anonymous cart (in IE?). I found that 'cart' was always getting added to Drupal's cache_page table. Doesn't it make sense that it *not*? In fact, it broke checkout for our anonymous users. Try it out, let me know if it works for you.
Thanks @neclimdul! Note: the fix is just the 'cart' -> drupal_page…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements hook_init(). | |
*/ | |
function uc_cart_init() { | |
global $conf; | |
$conf['i18n_variables'][] = 'uc_cart_breadcrumb_text'; | |
$conf['i18n_variables'][] = 'uc_cart_help_text'; | |
$conf['i18n_variables'][] = 'uc_continue_shopping_text'; | |
// Don't cache any cart of checkout pages. | |
// Code based on CacheExclude - http://drupal.org/project/cacheexclude | |
// Thanks @neclimdul! | |
if (arg(0) == 'cart') { | |
drupal_page_is_cacheable(FALSE); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment