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

error Paypal with coupon

Started by MaxMi, September 04, 2013, 14:43:37 PM

Previous topic - Next topic

MaxMi

Hello,
I open again the problem here and I hope it is the right room. I have VM 2.0.22b and Joomla 2.5.13.

I have a problem in payment when coupon change to zero the price in the cart. The selection of the method of payment, in fact, takes place on price without considering the coupon.

I set 2 methods of payment:
1) Paypal, with a minimum amount of € 1
2) ZERO (standard), with a maximum amount of € 1

In this way Virtuemart use PayPal only if the order exceeds € 1 and ZERO only when the order is less than 1 €, but chooses based on the amount before applying the coupon.

When the order is more than 1 € and I put a coupon code even if the total becomes 0 (zero) there is only Paypal, but the payment does not continue because virtuemart sends an informational message indicating that "This amount is not valid for payment with Paypal.".

It seems to me that virtuemart decide on the method of payment without considering the coupon. I tried to edit the plugin standard.php (payment standard) as follows:
from
$ amount = $ cart_prices ['salesPrice'];
to
$ amount = $ cart_prices ['billTotal'];

It seems to work, check the total price. I do not find, however, how to change paypal.php (and then I would not make errors).

Same developers know how to do? I think it's everyone's problem and then I would be sure that the change is correct.

Thank You

Max

alatak

Hello
This is actually the fix
replace
$amount = $cart_prices['salesPrice'];

by

$amount=$cart_prices['salesPrice'] + $cart_prices['salesPriceShipment'] + $cart_prices['salesPriceCoupon'] ;


The problem is that $ cart_prices ['billTotal']; is not correct when displaying the list of shipement methods

AH

Regards
A

Joomla 3.10.11
php 8.0

MaxMi

Perfect! It works, I modified paypal.php and standard.php.
Thank you very much!

alatak

Hello
Is this fixed in 2.0.22c ?

No , not in that one.
It is fixed for the next one.

AH

Regards
A

Joomla 3.10.11
php 8.0