News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

[Guide] Remove shipping fee from cart when calculating payment min/max amounts

Started by rallisf1, October 22, 2015, 14:13:33 PM

Previous topic - Next topic

rallisf1

Ok so you have an item that costs 95euro and the shipping fees are 5 euro
If you have set a maximum amount of 99 euro in your payment plugin it won't be an available option

If you wish to change this behaviour edit : /administrator/components/com_virtuemart/plugins/vmpsplugin.php @line 928

find:
$amount= $cartPrice + $cart_prices['salesPriceShipment'] + $cart_prices['salesPriceCoupon'] ;
replace with:
$amount= $cartPrice + $cart_prices['salesPriceCoupon'] ;

Now the payment plugins will take in consideration only the sum of the cart items and coupons (including tax and discounts) without the shipping fee.

P.S. This works with all payment plugins (even 3rd party)
P.S.2 This does not affect the final payment ammount.

P.S.3 This could be implemented in the core as a checkbox option in general checkout configuration (e.g. Include Shipping Fee when calculating Payment amount conditions ☑)