This module add some Ajax behaviors to the Add to Cart form in Drupal Commerce 2.x in order to dynamically refresh the Price when the Quantity changes.

Warning: currently, you need to apply this patch in order to use this module.

...
"extra": {
  "patches": {
    "drupal/commerce": {
      "#3019102 - Add $form_state to add_to_cart Ajax event": "https://www.drupal.org/files/issues/2018-12-09/3019102-add-form_state-to-ajax-event-1.patch",
    }
  }
}
...

Core features

This module is still experimental. It covers the following features for now:

  • Refresh Price when Quantity changes in add_to_cart form
  • Trigger a custom event when an Order Item's quantity changes

Development

Please, use the drupal.org issue queue to create issues.

Project information

Releases