I am using Commerce Ajax Add to Cart on my site as well as Commerce Nocart (https://www.drupal.org/project/commerce_nocart).
Commerce Nocart is designed to bypass the cart functionality all together and redirect the user straight to checkout when that option is set.
The expected behavior would be to use Ajax Add to Cart only if the cart is not being bypassed. Currently the Commerce Ajax Add to Cart is overruling the ajax set by Commerce Nocart and I am getting a shopping cart Ajax popup when I am trying to bypass the cart.
I wrote a small patch that checks if the submit button has already been modified by Commerce Nocart before modifying the form futher with Commerce Ajax Add to Cart.
If this isn't the appropriate place to make a patch I apologize in advance!
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | commerce-nocart-integration-2758039-2.patch | 728 bytes | tomdisher |
Comments
Comment #2
tomdisher commentedComment #3
tomdisher commentedComment #4
subhojit777Since this is a Drupal Commerce module, I would like to update this module as per any updates made in the core Drupal Commerce. Doing integrations with other Drupal Commerce module, and this module would end up having integration code of every Drupal commerce module :) And that is not possible.
Please do this in a custom module. You can set the weight so that the custom module's form alter hook fires before this module's.
Thank you for using this module.