Lets Get Technical: Ubercart Free Order with Recurring billing

Web Development

In working on a recent project we encountered a problem. The client wanted the ubercart to have certain functions, namely:

  • Recurring billing
  • Coupon codes up to and including 100% off

No rocket science, right? It wasn’t that easy to make it work though, we needed three modules:

In working on a recent project we encountered a problem. The client wanted the ubercart to have certain functions, namely:

  • Recurring billing
  • Coupon codes up to and including 100% off

No rocket science, right? It wasn’t that easy to make it work though, we needed three modules:

How to allow for free checkouts without a payment method?

You probably understand the need for the first two, but why do we need the last one? When you shop online and are told you are getting a 100% coupon, and then on the last step of checkout are asked for Credit card details, it sure looks suspicious, and could turn away a lot of customers.

Replacing the credit card payment method

The solution to that is to tell Ubercart that when order total is less then one cent, there is a different payment method that is to replace the credit card method. This is where this module comes in. Here is how the module creator summarized it:

“The UC Free Order Payment Method module works in conjunction with the payment checkout pane using the order total preview to present a “Free order” payment method to customers when their order total drops to $0.00 or less. By default, this method will be hidden with Javascript and displayed only when appropriate. Server side verification of an order total on checkout form submission is used to prevent customers from gaming the system.”

And it does work great, except when you have a recurring item in the cart, at which point Ubercart acts confused, on one side it has the free order method saying that since you have a $0 order you should use the “free payment method”, on the other end is the recurring payment module saying since this order has recurring product, you should use one of the payment methods (like paypal wps) that support recurring billing. The solution we came up with was to extend the free payment method to support the recurring billing.

The developers who worked on this are:

Share: