News:

Support the VirtueMart project and become a member

Main Menu

Discrepancy between order total and paypal with discount

Started by maxxer, October 26, 2010, 18:40:26 PM

Previous topic - Next topic

maxxer

Hi.

I'm having a problem with order with discounts and paypal payments.

If I pay an order which has a discount using paypal, the payment is a little lower than the total of the order in VM.
I checked the PP code from the one stick on this forum, and there are no differences on the discount calculation.
I'm having this on 1.1.4, but also on old 1.0.x versions!

Is this a known problem? There's a solution already?
I did several searches, without luck... :(
thanks

seyi

I wrote a blog on discounts before tax and coupons in virtuemart, maybe that is the the same problem you are having?  Here is the link:

http://dev.awofadeju.com/blog/virtuemart-coupon-error-discount-before-tax

This is the paypal edit for 1.1.4 from the blog, maybe it will help:

====================================

If you are using paypal, the total passed into paypal is incorrect. To fix, you should log into the admin panel, go to store->"List Payment Methods"->Paypal. Click on the "Configuration" tab and within the "Payment Extra info" section replace this:

<?php
"amount" => round$db->f("order_subtotal")+$tax_total-$discount_total2),
?>



with this:

<?php
//"amount" => round( $db->f("order_subtotal")+$tax_total-$discount_total, 2),
"amount" => round$db->f("order_total")-$db->f("order_shipping"), 2),
?>





Seyi A
--------------------
Promotion enhancement for Virtuemart:
   - AwoCoupon FREE - http://www.awocoupon.com/starter
   - AwoCoupon Pro - http://awodev.com/products/joomla/awocoupon
   - AwoRewards - http://awodev.com/products/joomla/aworewards
   - AwoAffiliate - http://awodev.com/products/joomla/awoaffiliate

maxxer

i believe I saw your blog post, but i have apply discount *after* tax, so i'm not sure it's the same issue...
I'll give a try anyway, thanks