Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Free Download and Payment Modules


Bill Langlais

Recommended Posts

I have a catalog that only contains downloadable products. I want to provide an eval version which costs nothing but requires the user go through the checkout process so I can capture who is downloading the eval. I tried pricing the eval as $0.00 but the checkout process still wants payment info (i.e. CC #).

 

What I did to get around this is to modify the payment modules I am using to turn off if the order amount is zero, this can be done by adding the line:

 

// Turn off this module if the order amount is $0.00

if ( ($this ->enabled == true) && ( $order->info['total' ] == 0) ) {

$this ->enabled = false;

}

 

just after the line:

 

$this->enabled = ((MODULE_PAYMENT_CC_STATUS == 'True') ? true : false);

 

In each of your payment modules.

 

You need at least one payment module so I am using the COD module. I add the above line but change the condition to > 0 instead of == 0. This means that if the order total is $0.0 you get the COD module. If the order is > $0.00 then you do not get the COD module but you do get all others.

 

To clean this up a bit I plan to create a new, no payment module that takes the place of the COD module in this application.

 

This seems to work but I am having a different problem which may or not be related during the order confirmation, I will post that once I exhaust my debugging.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...