This module enhances the Drupal Commerce add-to-cart functionality by making the process asynchronous. Instead of reloading the page, items are added to the cart with visual feedback and status messages, and the cart block is updated automatically.
This module ajaxify the add to cart submit button provided by the commerce module.
By default, the add to cart button make a submission and reload the page.
Now :
- Submission does not reload the page
- An animated image show add to cart is processed.
- Messages are displayed in status messages area
- Cart block is reloaded
A configuration needs to be made in /admin/commerce/config/commerce-addtocart-ajax to define the selector to display status messages. This depends of your theme. By default, .status-messages is used.
This module has started as a fork of Ajax add to cart module for multiple reasons :
- ajax_add_to_cart module seemed to not be maintained anymore and was buggy
- The modal feature should not be required
- Does not follow good practices
- Keep it simple