New feature; Minimum fee per transaction in payment

Started by inode64, October 11, 2015, 00:15:13 AM

Previous topic - Next topic

inode64

Joomla 3.4.x
Virtuemart 3.0.9.4

Specify a minimum amount in payment type , useful for commissions and overhead.

Milbo

Taken :-)

But I had to change it a bit

$min = !empty($method->cost_min_transaction)? $method->cost_min_transaction: 0.0;
return ($method->cost_per_transaction + (($cost_percent < $min) ? $method->cost_min_transaction : $cost_percent));


Imho more robust to check with !empty first
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/