Vote up!
Vote down!

Update payment methods upon coupon selection

I have the coupon pane, the order review and the payment info panes all on the same checkout page. When I add a coupon, an ajax callback is fired and the order summary is automatically updated to reflect the coupon, but the payment info pane is not updated.

I have a rule for two payment methods. One for non-zero order totals, and one for zero total orders. If I add a coupon that brings the total to zero, and then refresh the whole page, the rule action does apply and enab;es my 'free' payment method. However, it only works with a full refresh.

Is there a way to get the payment info pane to refresh during the coupon add ajax callback?

Otherwise, my customers see a zero total and they still see the payment info that requires them to put in a credit card to finish the order.

Asked by: c m
on January 27, 2015

1 Answer

Vote up!
Vote down!


A solution to this occurred to me. I just experimented with a setup and it appears to work. I'd be curious about your thoughts on this.

Use the Commerce Checkout Pages module: https://www.drupal.org/project/dc_co_pages

Add an extra page to the checkout sequence and move the Payment piece out of Review page to the new page you create that comes after Review. This gives us the page refresh we need.

It adds an extra page/step to the checkout process but it solves the problem.


Dan Royer
Answer by: Dan Royer
Posted: May 28, 2015