[Drupal] How can free order payment be implemented in ubercart

| | 1 min read

The client requirement was to add an option to enable the purchase of free products in an eCommerce site implemented using the Ubercart module of Drupal. This option can be implemented using the module named 'uc_free_order'(with Ubercart and other dependent modules installed). At the time of purchase, the 'uc_free_order' module checks the price of the product to verify if the amount is less than or equal to zero. In this scenario, the checkout page and the credit card options will not be displayed. Instead 'No payment required' message will be displayed inside the 'Payment method' box. Read on to know how to configure it in the site.

Currently the 'uc_free_order' module is only available in Drupal 6 version(http://drupal.org/project/uc_free_order). Hence, we have made a few changes in the 'uc_free_order.info' file, so that it can be installed and used in the Drupal 7 site. The following changes need to be made in the uc_free_order.info file:

Change the 'core' from 6.x to 7.x
Change the 'version' from 6.x-1.x-dev to 7.x-1.x-dev (if its a Dev version)

Applying these changes will enable the 'uc_free_order' module to be used in your Drupal 7 sites. Code changes need to be made in the uc_free_order.module, since the hook functions currently used in this module are supported in the Drupal 7 version too.