News:

Looking for documentation? Take a look on our wiki

Main Menu

Shipping and discount on cart

Started by szumik, February 12, 2016, 10:00:42 AM

Previous topic - Next topic

szumik

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

reinhold

Dear Szumik,
Can you please try the latest version 6.1 of the plugin, which we just released. There we added variables

 
  • billSubtotal ... The product subtotal (all products in the cart) before price modifiers per bill and before taxes per bill (but including modifiers and tax per product)
  • billDiscountAmount, billTaxAmount ... the per-bill tax and discount amounts
  • billTotal ... The order total after per-bill modifiers and taxes have been applied (but excluding shipping and payment fees).

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