News:

Support the VirtueMart project and become a member

Main Menu

Order and ID numbers

Started by gpessoa, May 14, 2014, 19:23:14 PM

Previous topic - Next topic

gpessoa

Hi
I recently installed a 2.60 VM and I realized that the order number on this version is a 6 digit against the 8 digits from 2.026VM.
Can this order number field be edited? If yes, where or how to do that?
Is there also possible to set the order number match (last digits, just the number part) with the order ID number?
Also, can this Order ID number be edited?
Thanks in advanced
Guilherme
J 4.4.4; VM 4.2.6; PHP 8.3.6

Milbo

The ordernumber changed? Actually I changed the customer number, hmmm
anyway here is a small program doing that http://extensions.virtuemart.net/vm-orders/order-number-plugin-detail
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

gpessoa

Hi Max,
Yes it has.
See image!

About that plugin doesn't do the job I want.
I want to change the numbers (like ordernumber be the same as order ID number) and as I will be online with a new clean VM260 installation I also (if possible) want to change this numbers to the next ones I have on the VM2026d installation. I will only import clients from that older DB.



[attachment cleanup by admin]
J 4.4.4; VM 4.2.6; PHP 8.3.6

AH

Look to the right hand side of the order page and you will see the order-id

You will need to crete overrides for a number of templates if you want the order-id to be used in communications and on some screen shots
Regards
A

Joomla 4.4.5
php 8.1

gpessoa

Hi Hutson,
I know that the order ID is on the right side, but I don't want to use it (template override).
As you know, the order number  (last digits) and order ID number are both sequential , but by default they don't match.
What I want is to make this mach, like order number 1fh356 order ID number 356.
Is there same SQL that I could run on DB to do this?
Thanks in advanced
Guilherme
J 4.4.4; VM 4.2.6; PHP 8.3.6

capewellmj

I use that Order Number Plugin and I think it does do what you want and you can get the numbers to match. First install the plugin and configure the order number plugin.

Then you need to edit the database tables in PHPMYADMIN:


http://www.open-tools.net/component/content/article.html?id=41

"It is, however, possible to change the counter entry manually in the MySQL database. In particular, in the mysql database the counters are stored in a table called (prefix)_virtuemart_shopper_plg_ordernumber, where (prefix) depends on your installation, sometimes it's jml, sometimes jos, or something entirely different. That table will be created on the fly when the first order is processed by the plugin, so you might make a test order directly after installation."

-) The number_type column means: 0=orderNr, 1=invoiceNr, 2=customerNr
-) The number_format gives the value of the format.
-) The count is the current count for the given format. The value in the database is the previously used number, so the next order/invoice will be incremented by 1."

Then once you have set the order number, do a test order.

Then you can go to the database table prefix_virtuemart_orders. Go to the last entry which will be the test order and change the order ID to match the order number. Then do another test order and they should now be synchronized. Note: All the data from the test order will be missing now unless you go to all the other appropriate VM tables and update the order ID's on those too.