VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: szumik on February 12, 2016, 10:00:42 AM

Title: Shipping and discount on cart
Post by: szumik on February 12, 2016, 10:00:42 AM
Joomla: 3.4.8
VirtueMart 3.0.12

I have discount on cart only. Shipping is free above some amount. But it must be amount with that discount.
I've installed "Advanced Shipping by Rules" plugin. Unfortunately, it doesn't work properly. I've thought it is because the plugin bug, but the plugin developer answered me:

"Unfortunately, VirtueMart handles shipping costs before the discounts on the cart are applied (...). See the Virtuemart core file administrator/components/com_virtuemart/helpers/calculationh.php, function getCheckoutPrices(&$cart), around line 886, where first the shipping cost is determined (i.e. the plugin does its job, line 886), then the payment cost is calculated (line 888) and then the cart-wide discounts are added (line 892)."

Is any way to change the calculating order and solve the problem? Maybe there is other solution...

Thnx
Title: Re: Shipping and discount on cart
Post by: reinhold on February 15, 2016, 16:31:14 PM
Dear Szumik,
Can you please try the latest version 6.1 of the plugin, which we just released. There we added variables

 
Please note that these new variables will not be influenced by the evaluate_for_XXX function, as they are always defined cart-wide, so it does not make sense to restrict them to certain categories etc.

Best regards,
Reinhold