VM OPC2 Issues

Please post your issues and questions about One Page Checkout for Virtuemart 2 to this forum.

VM OPC2 Issues

Postby atrus80 » Thu Sep 20, 2012 10:55 am

Hi Stan,

Hope you are doing well! We are starting to use OPC2 in our VM2 site and we need your assistance with the following issues:

1. OPC2 (.84) is not working properly with children in cart. More specifically we get the message:

"Fatal error: Class 'VirtueMartModelProduct' not found in /home/qualtun/public_html/components/com_onepage/helpers/loader.php on line 742"

You can see this here: http://www.quality-tuning.co.uk/group-n ... er-twister

2. Rounding issues in some cases noted as follows:

We have a product which costs 131,10 + 17% VAT = 153,39 € (http://www.quality-tuning.gr/universal- ... -l400-id51)
Shipping cost is 23,92 € = 17% VAT = 27,99 €. So far so good. So total must be 181.38 €. But OPC2 gives 181.37 €

3. When a customer is from UK for example, his currency is British Pounds, but when he goes to Paypal through OPC2, the currency goes back to Euro, which is the default. I.e. the correct currency is not passed to Paypal. Maybe also the correct language is not passed to Paypal?

4. We noted that when a Greek customer checkouts in Paypal, the greek characters are not displayed properly, see attached image.

Would appreciate your assistance! We are using Paypal sandbox, so you can make any test orders you like.

Rgrds,
Chris
Attachments
paypalgr.JPG
paypalgr.JPG (41.26 KiB) Viewed 13456 times
atrus80
 
Posts: 85
Joined: Mon Feb 06, 2012 6:22 pm

Re: VM OPC2 Issues

Postby admin » Fri Sep 21, 2012 3:21 pm

Hello Chris,
i will surely check n. 1

Regarding n2
- opc2 does not do any sort of calculation of totals - you should check your calculation plugin configuration. i would strongly recommend to keep up with the latest vm versions in this matter. Virtuemart in the latest version still's got the 1 cent bug because the underlying subtotals are not rounded. i will check if there is anything to do with this from opc view. paypal and other systems usually accept 1 cent error. What is the actual total saved or processed by payment processor?

3. what is your payment plugin config? do you accept both pounds and euro within the plugin and also paypal?
4. ok, i will check this, but this might concern db encoding and your underlying php encoding. the language string there should say (products), i will check how paypal plugin sends it (/plugins/vmpayment/paypal/paypal.php)

Which version of VM are you using?

Regards,
Stan
admin
Site Admin
 
Posts: 2708
Joined: Wed Jan 06, 2010 11:43 pm

Re: VM OPC2 Issues

Postby atrus80 » Fri Sep 21, 2012 3:55 pm

Hi Stan,

Thanks for your reply, i'm using latest VM 2.0.11d;

1 - Just for your information, i'm talking about stockable variants plugin. Haven't tried the other ones.

2 - Noted, thanks for the info; in this particular example the 181.37 (which is wrong) is processed.

3 - In VM config, i have selected both Euro and BP, but in Paypal plugin, i can see that only 1 currency can be set! This is very weird, could u confirm this?

4. Thanks for your assistance!

Rgrds,
chris
atrus80
 
Posts: 85
Joined: Mon Feb 06, 2012 6:22 pm

Re: VM OPC2 Issues

Postby admin » Fri Sep 21, 2012 8:42 pm

chris, i strongly recommend to downgrade to 2.0.10 as your release of VM only in beta testing. i am using svn updates with a ping of (http://svn.rupostel.com) and then (http://svnonj25.rupostel.com) which uses the latest svn files. usually these version have minor bugs which needs to get tuned, tested till the stable release is made including my component and any other cross compatiblity.

regarding the paypal currency, i do see now that in the latest versions it accepts only one currency or vendor's currency. i recommend to create two paypal plugins and set restrictions on the currency one for euro and the other for pounds. they should not render for both currencies.

regarding to the rounding
- i strongly recommend to test combinations of these settings
One test
- checkout prices or prices configuration within the shop: set all to "-1"
- currency settings (both euro and pound, etc...) set to 2 digits
Second test
- set prices config to 2 digits
- set currency settings to 2 digits

I would test this my self if i know exacly what
- price and currency is the product
- what currency is used by shopper
- what is the vat rate used to get the 1 cent error

I've seen cent errors on products when you set 1 000 quantity (and more) on an item of calculated price from other currency - this all concerns the rounding issues.

I fixed the possible fatal error in loader.php by the 2.0.86 release.

Kind Regards,
Stan
admin
Site Admin
 
Posts: 2708
Joined: Wed Jan 06, 2010 11:43 pm

Re: VM OPC2 Issues

Postby atrus80 » Sat Sep 22, 2012 8:49 am

Hi Stan,

Thanks for the assistance!

1. We confirm that latest 2.0.86 solves the problem with the children products, great!

2. I checked better, it seems that VM2 calculates the final price correctly after all. It is only a matter of display of the subtotals, let me explain:

You have 1 product which costs 131.10 € + 17% VAT = 153.387 €. VM2 rounds this to 153.39 €
Shipping cost for this product is 23.92 € + 17% VAT = 27.9864 €. VM2 rounds this to 27.99 €

If the total was produced by adding the rounded subtotals above, it would be 153.39 € + 27.99 € = 181.38 €

However, the correct price for the customer is indeed the rounded total of the unrounded subtotals: 153.387 € + 27.9864 € = 181.3734 € = 181.37 € .

VM2 shows indeed the 181.37 € which is correct; the inconsistency is because the subtotals are shown rounded also.

3. The only way is indeed to create multiple paypal payment methods; i have advised VM2 forum about that, it would be better to support multiple currencies.

4. I managed to solve the encoding issue through my Paypal account. For your information, one should log-in to his Paypal account and then go to Profile -> My Selling Tools -> Paypal Button Language Encoding -> More Options -> Select UTF-8 from the dropdown menus

Regards,
Chris
atrus80
 
Posts: 85
Joined: Mon Feb 06, 2012 6:22 pm

Re: VM OPC2 Issues

Postby admin » Sun Sep 23, 2012 1:35 pm

hello chris, this is great news and very usefull for all of my customers. i will reply in points:
1. good
2. i found the lines in /administrator/components/com_virtuemart/helpers/calculationh.php where the price array comes from. After checking all of this, i must say that OPC indeed does a little calculation for the product unrounded subtotals which is displayed with it's loader.php in the top basket. The problem with the rounding here is that the customer should pay what he sees - therefore if he sees the price incl. VAT rounded to two digits, this price is not the same as the unrounded price with vat divided by vat rate times vat rate (due to rounding of the price which he sees). This problem is even larger because there is no actual setting in VM which would tell (php) if the customer sees the price incl. vat or not. US customers usually use "basePrice" for product prices display and EU customers use "salesPrice" for the product price display -> but it does not mean that the salesPrice is including tax.

What would you suggest for this point?
My opinion:
If the product prices are set to be shown with 2 digits, VM should count total as sum of rounded product subtotal and rounded shipping and payment fee where product subtotal equals (rounded prices which the customer sees times quantity). Depending on whether it's incl. tax or without tax VAT should be always when the subtotals are known. Both ways there should be an Item (the same as shipping or payment fee) called rounding which would say about the one cent.

3. I think the reason for this is that you can use two different paypal accounts for receiving money. I think i've read somewhere that paypal does not accept two currencies via ecommerce solution.

4. this is extremely usefull for all of paypal users and thank for letting everybody know

Best Regards,
Stan
admin
Site Admin
 
Posts: 2708
Joined: Wed Jan 06, 2010 11:43 pm


Return to One Page Checkout for Virtuemart 2