VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: sandomatyas on January 07, 2015, 17:42:37 PM

Title: Shipment cost/payment fee + discounts
Post by: sandomatyas on January 07, 2015, 17:42:37 PM
Hi Folks,

I have a problem with my new VM site, could you help me please?
I have 1 shipment method (e.g. car delivery) and three payment methods (paypal, wire transfer and cash on delivery).
The shipping cost is based on the payment method. If you pay by paypal, you have to pay less than COD.
This is fine, I set the shipping cost to zero and payment fee of paypal to $1, wire transfer to $2 and COD to $3.
But there is a problem.
I want to give a free delivery option if the full cart amount is over a specified value (e.g. $100) AND the number of articles is over an other value (e.g. 5).
For example:
If you buy 1 article for $50, you'll pay $1 or $2 or $3, depends on the payment method
If you buy 1 article for $150, you'll pay
If you buy 10 articles for $50, you'll pay
If you buy 10 articles for $150, you won't pay because the amount and the number of the articles booth are over their limit.

Can you give me a hint how can I solve this problem?

Thank you!
Title: Re: Shipment cost/payment fee + discounts
Post by: GJC Web Design on January 07, 2015, 20:11:07 PM
you would have max amounts for the existing methods and a 4th method std. weight plugin (free) that had a min amount..
but number of articles you will need to hack into the payment methods - afaik there is no check for this in any payment method

Look at the protected function checkConditions($cart, $method, $cart_prices) in the payment methods and add a check for item count there