Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Payment Methods to bigger orders


Guest

Recommended Posts

Posted

Dear all...

 

There is any contribution to force the payment method when the ordered products exced an certain amount...

 

For example what i'm searching is in orders bigger than 500,00 € only it's allowed payment method by Wire transfer.... There is any contribution to do this???

 

Any help will be great ....

 

 

Best Regards

João Carrolo

Posted

I do not know about any contributions - but you could easily edit the file:

catalog/includes/classes/payment.php

to do this..

 

Around Line 30-33

reset($this->modules);

while (list(, $value) = each($this->modules)) {

$class = substr($value, 0, strrpos($value, '.'));

$include_modules[] = array('class' => $class, 'file' => $value);

}

 

To:

if ($cart->show_total() > 500,00 €) {

$this->selected_module = $module;

$include_modules[] = array('class'=> 'freecharger', 'file' => 'wire_transfer.php');

} else {

reset($this->modules);

while (list(, $value) = each($this->modules)) {

$class = substr($value, 0, strrpos($value, '.'));

$include_modules[] = array('class' => $class, 'file' => $value);

}

 

You will need to add $cart as a global on line 18:

global $payment, $language, $PHP_SELF, $cart;

 

Please be advised I did not test this.. but it should be close

Lloyd

Posted

Thank you very much for your answer...

 

I already think on something very similar, after search and dont find nothing i think i will do what you suggest....

 

 

Thank you very much for your help...

 

 

Best Regards

João Carrolo

Archived

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

×
×
  • Create New...