Forums / Customization from the Admin / 'Set next order number' - is this stored anywhere?

'Set next order number' - is this stored anywhere?

Started by simon1066 on 29 Oct 2014, 9:51 AM · Views: 1,357

Results 1 to 7 of 7
29 Oct 2014, 9:51 AM
#1
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

'Set next order number' - is this stored anywhere?

A 'New Order ID' is entered in Admin - Store Manager. At a later date, and before any orders are taken, I want to check the value that was entered. How would I go about doing that?

The number entered is not stored in the database.

Simon

29 Oct 2014, 10:46 AM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: 'Set next order number' - is this stored anywhere?

simon1066:

A 'New Order ID' is entered in Admin - Store Manager. At a later date, and before any orders are taken, I want to check the value that was entered. How would I go about doing that?

The number entered is not stored in the database.

It is stored as the next primary key for the table orders. Can be found using myphpadmin or an appropriate sql statement to retrieve the same.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

29 Oct 2014, 11:41 AM
#3
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: 'Set next order number' - is this stored anywhere?

Thank you, I never would have found that without help.

Simon

30 Oct 2014, 3:00 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: 'Set next order number' - is this stored anywhere?

... and that number is incremented on every order, so the only way to find out "what number was entered" is to look at your actual orders (Admin->Customers->Orders) and see where the order-numbers suddenly started at a new value.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

30 Oct 2014, 3:52 PM
#5
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: 'Set next order number' - is this stored anywhere?

DrByte:

... and that number is incremented on every order, so the only way to find out "what number was entered" is to look at your actual orders (Admin->Customers->Orders) and see where the order-numbers suddenly started at a new value.
If I may add for clarity, the above would "post mortem" identify what value was entered as an order would have been placed after the "change" was made as the original question was more along the lines of how to identify the next order number without having any the historical information provided by having orders placed.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

30 Oct 2014, 5:04 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: 'Set next order number' - is this stored anywhere?

True. He did say "At a later date, and before any orders were taken". I was replying based on only the "at a later date" part ... somehow I missed the "before any orders were taken" part.
Thanks for clarifying. :)

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

30 Oct 2014, 6:05 PM
#7
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: 'Set next order number' - is this stored anywhere?

DrByte:

True. He did say "At a later date, and before any orders were taken". I was replying based on only the "at a later date" part ... somehow I missed the "before any orders were taken" part.
Thanks for clarifying. :)

Thing was, and true to form, it was still correct and further beneficial to readers of the thread.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...