[solved]Bug in Standard and Paypal payment methods

Started by Marttyn, August 08, 2013, 22:07:15 PM

Previous topic - Next topic

Milbo

Took me some time to reproduce it. It works fine with discount rules per product, but it seems not to take the correct value for the Rule per Bill. Lets see how we can solve this.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

nmihos

Hello,

I have this problem. I set Fee per transaction for every of my three payment methods. Paypal, Check Payment and Payment in Delivery. The two of them are 3.50 and the third 6.50. I use Rupostel One Page Checkout. In total is calculated only the 3.50 euros, even if i choose the payment method with 6.50 transaction per fee. I made some tests and it calculates the fee with the smallest value.  Can you help me?

Milbo

Nmihos, this is a another question and very likely related to the Rupostels One Page checkout.

For the other problem sardonic32 please try the attached file at \administrator\components\com_virtuemart\plugins

[attachment cleanup by admin]
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

sardonic32

Sorry Milbo.

If I replace the file with the new "vmpsplugin.php" you have sent, all I get are blank pages :-(

Maxim Pishnyak

Turn on Error reporting in Joomla config and post here your specific blank screen error, please.
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

sardonic32

Hi Maxim. these are the errors


Strict Standards: Declaration of VirtueMartControllerCart::display() should be compatible with that of JController::display() in /Applications/MAMP/htdocs/KMT-20131002/components/com_virtuemart/controllers/cart.php on line 34

Strict Standards: Declaration of JParameter::loadSetupFile() should be compatible with that of JRegistry::loadSetupFile() in /Applications/MAMP/htdocs/KMT-20131002/libraries/joomla/html/parameter.php on line 512

Fatal error: Cannot redeclare vmPSPlugin::convert_condition_amount() in /Applications/MAMP/htdocs/KMT-20131002/administrator/components/com_virtuemart/plugins/vmpsplugin.php on line 892


Thank you very much for your work.  Best regards

Milbo

ah this was a small error happened due the synch with the both versions

[attachment cleanup by admin]
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

sardonic32

Hello Milbo. I tried the new file and the results are the same as with the old file. I do not know where the error is but 2% of 100 is calculated by the system in 1.96.

Also it does not used the discount amount by plugging amount of product to calculate the correct discount.

I made a downgrade to the web and I installed vm 2.0.8e and calculation is done correctly.

Sorry for the inconvenience. Thanks for your interest

[attachment cleanup by admin]

Milbo

Ehrm did you read the begin of this post?

2% is in case of a payment plugin NOT 2! Please read the begin of the post again.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

sardonic32

Hello Milbo. Now I'm a little lost.

I will try to explain better with my poor English.

I'll do the calculations as simple as possible and without taxes to simplify.

1. I have an order of 100€ and if if the customer chooses the pay by transfer, I do a discount of 2% on the amount. (I'm using "percentage of total amount" = -2) in the shipping plugin.

In this case, Virtuemart deducts 1.96€ instead of 2€.    -- > Is this a mistake or not?  (In the same case vm2.0.8e make a discount of 2€)

2. In another order, I have an amount of € 1,000 for the purchase of 10 products. For being 10 products there is a discount of € 300 which is made with the plug istraxx quantity for quantity discounts.
And besides, if the payment is by transfer, 2% will be deducted from the amount that would be € 14 (2% of 700) is that correct?
This amount is also incorrect.

Am I doing something incoherent?

I don't know where´s the calculation error but clearly there is because previous releases made it properly.

Thank you very much for your time. And for make virtuemart, one great ecommerce platform.

sardonic32

Hello Milbo. Sorry that insists but I think this bug may be important.

1. I installed a clean version of joomla 2.5.14 and the latest version of vm (2.0.24) with example products.
2. I modified the price of one product to 100 € to do it more simple.
3. I created a payment method with 2% discount on the total amount.

The results are:
If I buy 1 product of € 100 and I select the payment method with discount, the amount should be € 98.00 (100 - [2% 100]) isn't it?
But the result is: € 98.04 (100 - [2% {100-2}]) and the error increases when increasing amounts.

I tested with a 5% discount in the payment plug and the discount calculation that the system make is:
5% {TOTAL-AMOUNT-5} instead of 5% of TOTAL-AMOUNT.

It would be interesting to check this calculation because it seems important.

I have not tried to install the plug istraxx quantity for quantity discounts and see if the calculation is correct with it

[attachment cleanup by admin]

sardonic32

Hi Milbo.
I've done several tests and found that the error occurs in changing from version 2.0.22a (working properly) to 2.022b (and miscalculates).
Have you found where the error is?

Best regards

sardonic32

I don't understand.

No one has detected the error in calculating  the percentage discount on the payment plugin?

I think I'm going back to version VM2.0.22a. It was working properly. :-(

regards

pcmilhouse

I experienced the same calculation error in version 2.0.24a with joomla 2.5

Is this bug already fixed?
In which version?
What is the last version without the bug?

Regards

Milbo

Again Sardonic32, you did not read the post.

There is no error, your calculation is wrong. Your calculation is not having the payment costs itself calculated.

you wanna pay 100 euro?,... you have to pay for that 2 euro, yes? So you have to pay actually the fee for 102 euro, which is not 2 anylonger, because it is for 102 and not 100, right? So the fee must be calculated for 102, which is 2.04, so you have to pay 102,04 euro. You could now do the calculation again, but you wont see a difference anylonger due rounding.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/