VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: welrachid on May 24, 2018, 12:41:20 PM

Title: Virtuemart_order_id vs order_number not following each other
Post by: welrachid on May 24, 2018, 12:41:20 PM
Hi guys
I've tried to search forum for answer but cannot find the previous discussions we had about virtuemart_order_id / order_number increment.

After we updated to VM3.2.14 J!3.8.8 VP OPC 6.0 (within last 24 hour) we have experienced that our order_number column and virtuemart_order_id column no longer match.

i remember reading a thread where there was a discussion about increasing order numbers and then lowering them again or something like that? I cannot recall what the issue was exactly

MY issue however is that somehow the order_number column is ahead of the virtuemart_order_id column. See attached photo. These are all orders from today (So its not happening to all orders!)
Im not sure if this is related to my other issue: http://forum.virtuemart.net/index.php?topic=140243.0
But i would really like to have those to numbers to match because having them this close is very confusing.

28102 was first order AFTER update..

We've had those numbers follow eachother for the last year or so without any problems..

Thanks
Title: Re: Virtuemart_order_id vs order_number not following each other
Post by: AH on May 24, 2018, 12:52:06 PM
Please talk to the OPC developers

This is not a VM issue
Title: Re: Virtuemart_order_id vs order_number not following each other
Post by: welrachid on May 24, 2018, 13:16:26 PM
Ok. i'll see what they will say:

https://www.virtueplanet.com/forum/vp-one-page-checkout/24977-virtuemart-order-id-vs-order-number-not-following-each-other#35541
Title: Re: Virtuemart_order_id vs order_number not following each other
Post by: welrachid on May 24, 2018, 18:11:09 PM
So basically VP OPC reply it has nothing to do with their plugin:

-----------
This has nothing to do with VP One Page Checkout plugin. Such things are purely managed by core VirtueMart component. The plugin can never affect your order number.

For verification, you can always disable the plugin and check using standard VirtueMart checkout system. You will not find any difference.

It seems like a database issue of your site which was probably generated due to a recent VirtueMart component update.
----------

Any ideas?
Title: Re: Virtuemart_order_id vs order_number not following each other
Post by: welrachid on May 25, 2018, 09:32:48 AM
I've been using Advanced Ordernumbers for VirtueMart to control the order_numbers
So to solve this right now i have increased the auto_increment ID of the virtuemart_orders table and also changed the order_number counter in the plugin to match.

Hopefully this was a glitch in the update and will not be a problem in the future
Title: Re: Virtuemart_order_id vs order_number not following each other
Post by: Milbo on May 29, 2018, 14:46:54 PM
No, welrachid, it is a security feature, which you just disabled. There is an extra possibility to provide an offset.
Title: Re: Virtuemart_order_id vs order_number not following each other
Post by: welrachid on May 29, 2018, 16:34:27 PM
Hi milbo
Thanks for taking time to answer. Im not sure how this increases security.
What i want is that all displayed order number/ids/whatever are the same everywhere, so that when people ask for something they have a reference number and so that for (tax-services) we always have a increased-by-1 number on all orders.
Title: Re: Virtuemart_order_id vs order_number not following each other
Post by: Milbo on May 29, 2018, 19:43:20 PM
The virtuemart order id is always an integer. The order id is a pure database thing. The order NUMBER is for the customers and shopowners. Not the id. And there is an extra offset to avoid, that someone can use the ordernumber to get the id.
Title: Re: Virtuemart_order_id vs order_number not following each other
Post by: welrachid on July 02, 2018, 23:18:20 PM
I've gone away from using id to purely order number.
had to rewrite all my functions so that rely on the order number instead.but works again now.