What is Ubercart AJAX Cart?
This module provides a drop-in replacement for the default Ubercart cart block that is entirely AJAX enabled, allowing users to add, update or remove items from their cart without needing to refresh the page.
Ubercart AJAX Cart has been tested with Ubercart version 6.x-2.11. Attention: Some refactorings in 6.x-2.2 may have caused a bug that results in anonymous users not getting their cart contents refreshed when caching is enabled. This issue is being investigated and will be resolved within the next 48h. See #1881758: 6.2.2 works only with caching OFF.
Current maintainers do not currently have the resources to port Ubercart AJAX Cart to Drupal 7, although there are some people involved in the port. Help/patches are welcome! See #1120590: Ubercart Ajax Cart upgrade for Drupal 7 . Please send a message if you are interested in becoming maintainer for the 7.x branch.
6.x-2.x (recommended for all Drupal 6 users)
This is the recommended release series for all users. Bugfixes and new features are being implemented here. Below is a list of current features:
- AJAX operations on cart (add to cart, remove, update) for registered and anonymous users (incl. with anonymous caching enabled).
- CSS class to include/exclude products from this AJAX functionality.
- Supports product kits (also restrictions for the single products in a product kit).
- Supports Ubercart's Cart Links module.
- No extra theming required (this module takes theming of normal cart, although you are free to implement your own customizations).
- Products will not be added to cart unless all of their required attributes are filled out by the user
- Collapsible cart block (optionally, with a animation effect).
- On screen themeable notifications (centered with overlay, Growl-like).
Roadmap for future development of this branch:
- Better handling of caching.
- A documentation for developers.
This branch has been deprecated in favour of the 2.x branch and is only accepting security fixes.
5.x-1.0rc4 (no development anymore)
This branch has been deprecated in favour of the Drupal 6/7 branches. No further development.
You need jquery_update for Drupal 5 version.
UC Ajax Cart seems to be very stable, but there are some issues when used with other modules:
- #823988: Variable Price Support
- #1215486: Adding Item From Upsell Cart Pane Makes the Rest of the Upsell Items Disappear
Use with Boost (or other caching modules)
If your caching module has an ignore list, be sure to add
uc_ajax_cart* as well as the Ubercart checkout pages (
cart as well as
checkout*) to the cache-less page list.
In Boost, you can do so by setting the 'Statically cache specific pages' Boost option to 'Cache every page except the listed pages' and then adding
uc_ajax_cart* to the list.
If you are using authacache, see here.
Use with Ubercart Cart Links
If you want to use Cart Links, uc_ajax_cart needs to know which links are cart links. Do this simply by adding the
ajax-cart-link class to all your cart links.
Using cart block with anonymous page caching enabled
If just want a cart block for anonymous users with cache enabled but you don't want the AJAX cart, go settings page and:
- Enable 'Ajax Support for anonymous users'
- Disable 'Ajaxify cart page'
- Select 'Ajaxify only products that have the specified CSS class' in 'Apply Ajax Cart functionality to specified products', and use a nonexistent CSS class.
Use with Secure Pages (or other SSL modules)
uc_ajax_cart* to the ignore settings of secure pages module to ensure that the AJAX callbacks complete successfully. Otherwise, you may experience problems due to the browser's same origin policy.
chellman help with the initial set up this project. Original development of the module was sponsored by Erik Seifert of b-connect. Recent development of this module is sponsored by Metadrop and Grindflow Management LLC.