VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Development Projects, Modifications, Hacks & Tweaks. VM1.1 => Payment Modules => Topic started by: punkrazio on February 22, 2011, 13:01:14 PM

Title: Custom payment method based on cash on delivery
Post by: punkrazio on February 22, 2011, 13:01:14 PM
Hi all
I've tried to look around to find more information about PHP code for simply calculate a cash on delivery rate.

For example i need:

if totalamount is less than 516€
CODcharge is 3.7€
else
CODcharge is (totalamount - 516)/100*1.4

Is it possible to do it in the configuration of the payment inside vm and not creating payment file and stuff...???
For the moment i've setted the payment for address only, probably to use PHP I need to set it on HTML bases??
I know PHP code needed is pretty simple but I don't know how to interact with vm and the dev manual is pretty poor of information about this.

Hope you could help me
Thank you
Bye