VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: infofuturo on April 11, 2014, 17:52:04 PM

Title: COD pay method
Post by: infofuturo on April 11, 2014, 17:52:04 PM
Good afternoon to everybody,

I have the following situation with the web store of a client.

It is about the configuration of Cash On Delivery pay method.

I´m running Virtuemart 2.0.24 which has two options in the configuration of the COD pay method to insert a fee or charge.

A fix amount.
A percentaje of the amount.

The problem is that I need to combine both cases. I will explain myself:

Under 100 € order I need to charge 3 extra euros to the customer, because this is the minimun amount my client shipping company charge him.
Over 100 € order I need to apply only a 3% of the total amount of the order, it will be over the 3 euros minimun.

I search online for a solution, but i didn't find one. I suppose I need to modify Virtuemart core, but I'm not sure where.

Can anybody give me a hand?
Title: Re: COD pay method
Post by: JoomTut on April 12, 2014, 04:51:59 AM
Please take a look at this post: http://forum.virtuemart.net/index.php?topic=108469.0
Title: Re: COD pay method
Post by: infofuturo on April 14, 2014, 17:52:14 PM
I read the link you suggest to me, but what I need is a pay method, no a shipping method, because I already have an unique shipping method and the cliente don't want to change that.

Is that posible? I´m sure somebody was in my situation before. I believe I have to do a hack in the estandar pay method, but I'm not sure.

Thanks in advance for the help, everything will be appreciate!
Title: Re: COD pay method
Post by: jenkinhill on April 14, 2014, 20:53:54 PM
Simple logic.

Make one standard payment method, in configuration tab set Maximum Amount 100  and Fee per transaction 3

Make a second payment method, set Minimum Amount 100.01  and  Percent of the total amount 3   (ie 3%)

The appropriate method will be shown/applied at checkout.