Orders doubled and numbering not applying after update

If you are runnig Joomla 3.x and Virtuemart 3.x please post to this forum your questions or support tickets about One Page Checkout

Orders doubled and numbering not applying after update

Postby registrazioni@.....it » Fri Nov 15, 2019 11:21 am

After having configured our production site according to your guidelines (see viewtopic.php?f=7&t=3867&sid=af67d827890ee622ecb5719f9cb2c3ae#p7962 and private emails), we are now experiencing two problems with VirtueMart, if OPC is active.
Please, note that we had to update VirtueMart due to its payments issues; now VirtueMart is updated to the most recent version. We also updated OPC.

1. Orders doubled
--- Payment method: PayPal or Credit Card
If a customer places an order paying by PayPal or Credit Card, the system generates two identical orders. The status of the first is Confirmed, the status of the other one is Pending. The order number is different, so this makes the customer confused.
--- Payment method: cash or by bank transfer
If a customer places an order paying cash or by bank transfer, the system shows an error message “Cart Empty”. More, only if the customer uses Firefox (not Chrome) the following message appears:

To display this page, Firefox must send information that will repeat any action (such as a search or order confirmation) that was performed earlier.
Cancel Resend

If the customer cancels, the order is sent regularly and the message “Order confirmed” appears.
If the customer resends, the order is sent regularly but the message “Cart Empty” appears.

2. Invoice numbering not resetting
We changed the invoice numbering from nnnn-{05}-YYYY to YYYYMMDD{-05-}nnn, with the reset New Day.
But the actual numbering always follows the previous setting.

Please, can you fix these issues? If needed, we will be glad to pay for your support. We will provide you with a Super User account. You can find the production site here: https://www.latteriadelsole-shoponline.it/.
registrazioni@.....it
 
Posts: 5
Joined: Fri Aug 30, 2019 4:38 pm

Re: Orders doubled and numbering not applying after update

Postby admin » Thu Nov 21, 2019 1:30 pm

hello, i will check your site now, please write us an email to info @ rupostel.com so we can have this sorted asap. i reply to the forum only once a week these days as there is quite lot's of work going on.

regarding your issues, it seems you got problems with session (or cookie to domain set up), generally the most stable session handling is:
- files - in joomla it's called "NONE" and php.ini 's default is to use file session
- session timeouts should be all setup similarly in php.ini and joomla config for file sessions
- make sure your cookies are shared among your www to non-www domain if it's possible to visit both at the once and make sure you use https and no http cookies are being used or stored as you can end up with 2 versions of session per http vs https

the file sessions compared to the joomla's default database session support "locking" which means that if you are using https/2 protocol and there are 2 queries with the same connection into your site (such as a 404 rendering your index.php + an ajax call + another ajax call) --> all these accesses share the same session and it's not clear which session state will be written (the one that was finished as the last).

to fix this you can use file sessions on your server (nfs, samba or ssh shares or else may not support locking) and thus all 3 requests even when they are run at once (concurrently) will wait until the session file is unlocked.

this mechanism is missing in joomla and thus it makes it extremely complicated to get it right with database session and concurrent requests from the same connection. if "delayed write" is enabled on the database, it makes it even many times worse as you you'll end up with empty cart on most add to cart attempts.

best regards, stan
admin
Site Admin
 
Posts: 2708
Joined: Wed Jan 06, 2010 11:43 pm

Re: Orders doubled and numbering not applying after update

Postby admin » Thu Nov 21, 2019 1:38 pm

hello, i am trying to see the problem that you described on the forum and i see that the checkout landing page is called twice. 

you can try to disable OPC's tracking plugins (or the feature generally) which could be causing this issue - it refreshes the page when an order status change is detected and there was a bug in some of the OPC versions for the page refresh. 

if not caused by the tracking system, it could be caused by some 3rd party plugin which refreshes the page upon order status changes. the second order is caused by background refresh of the landing thank you page which shows either thank you page, or does the redirect to paypal.

best regards, stan
admin
Site Admin
 
Posts: 2708
Joined: Wed Jan 06, 2010 11:43 pm

Re: Orders doubled and numbering not applying after update

Postby admin » Tue Nov 26, 2019 2:56 pm

hello, i checked your site and i see this:

/plugins/system/bit_vm_change_shoppergroup/js/trigger_change.js

within your source code which triggers the page reload due to shopper group change upon registering a new user (from anonymous to default).

you can contact the 3rd party dev or disable this extension as neeeded, or just supress this script itself since the only thing it's supposed to do is to refresh the page when it detects shopper group change per what i understand.

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


Return to One Page Checkout for Virtuemart 3 on Joomla 3.x