[SOLVED] How To Increase The Starting Order Number to A Higher Value
Started by deepee, Oct 23 2009 02:13 AM
Hi
I have converted an existing site to Prestashop.
When I place a test order, the order number count starts at "order #1:"
Is there a way to increase the starting order number to somewhere in the thousands, so it doesn't look like I just started a new business?
Thanks
Deepee
I have converted an existing site to Prestashop.
When I place a test order, the order number count starts at "order #1:"
Is there a way to increase the starting order number to somewhere in the thousands, so it doesn't look like I just started a new business?
Thanks
Deepee
Go to Orders > Invoices to change the next invoice number and Orders > Delivery slips to change the next delivery slip number.
Check out Nethercott Constructions for PrestaShop guides and modules. Like us on Facebook for news updates.
Thanks for your reply, Rocky.
I currently have the invoice generator turned off as we generate these separately from our accounting package but I changed the invoice number to a highervalue anyway.
I also changed the delivery slips.
When I try to place another test order I got the confirmation email with :-
"Order details
Order: #000001 placed on 2009-10-23 14:05:39
Payment: Direct Deposit"
Placed another order as a different "customer" and got:-
"Order: #000002 placed on 2009-10-23 14:18:03
Payment: Direct Deposit"
Is there anything else I need to change?
Thanks
Deepee
I currently have the invoice generator turned off as we generate these separately from our accounting package but I changed the invoice number to a highervalue anyway.
I also changed the delivery slips.
When I try to place another test order I got the confirmation email with :-
"Order details
Order: #000001 placed on 2009-10-23 14:05:39
Payment: Direct Deposit"
Placed another order as a different "customer" and got:-
"Order: #000002 placed on 2009-10-23 14:18:03
Payment: Direct Deposit"
Is there anything else I need to change?
Thanks
Deepee
I'm surprised that doesn't work. The only other thing I can think of is that it is using auto-increment to generate the order numbers. If it is, you could execute the following query on your database to set the next order number to 1000:
ALTER TABLE `ps_orders` AUTO_INCREMENT = 1000
Check out Nethercott Constructions for PrestaShop guides and modules. Like us on Facebook for news updates.
From 1256277164:
I'm surprised that doesn't work. The only other thing I can think of is that it is using auto-increment to generate the order numbers. If it is, you could execute the following query on your database to set the next order number to 1000:
ALTER TABLE `ps_orders` AUTO_INCREMENT = 1000
Rocky, could you please explain how to execute this query? What file should I look for?
Thank you very much!
You must go to your cPanel, then select phpMyAdmin, then click the SQL button at the top-left, then enter the above query and click Go.
Check out Nethercott Constructions for PrestaShop guides and modules. Like us on Facebook for news updates.
From 1259717513:
You must go to your cPanel, then select phpMyAdmin, then click the SQL button at the top-left, then enter the above query and click Go.
Rocky, thank you SO much! It worked.
I really appreciate your help.
All the best,
Alex
Thanks for the post - quite easily one of the most useful 'hacks' around.
Nothing worse than firing up a new ecommerce site and your customers receiving the first, second, third orders - looks SUPER lame!
Thanks
Dan
Nothing worse than firing up a new ecommerce site and your customers receiving the first, second, third orders - looks SUPER lame!
Thanks
Dan
Nineplus USA - Now on Prestashop 1.4.7
Ive made a plugin for the backend for this. To use it:
1. Copy the attached file into your admin/tabs folder
2. Go to Tools/Tabs/Add New
3. Enter "Order Options" as the name
4. Enter "AdminOrderOptions" as the class
5. Select "Orders" as the parent
6. Click Save
7. Go to Orders/Order Options
8. Enter the new number you want to start with
9. Click "Change Start number"
Done.
Let me know if there are any problems I'll try and post an update.
1. Copy the attached file into your admin/tabs folder
2. Go to Tools/Tabs/Add New
3. Enter "Order Options" as the name
4. Enter "AdminOrderOptions" as the class
5. Select "Orders" as the parent
6. Click Save
7. Go to Orders/Order Options
8. Enter the new number you want to start with
9. Click "Change Start number"
Done.
Let me know if there are any problems I'll try and post an update.
Attached Files
Cool, initially looks good, installed great although running live shop and don't want to change order number right now.
One thought, what happens if you change it to a number less than the number you are on currently? Will it throw an error, or allow 're ordering' on the same number?
Something worth testing I think although cant right now as running a live shop.
I can test it once home next week on a test environment.
Dan
One thought, what happens if you change it to a number less than the number you are on currently? Will it throw an error, or allow 're ordering' on the same number?
Something worth testing I think although cant right now as running a live shop.
I can test it once home next week on a test environment.
Dan
Nineplus USA - Now on Prestashop 1.4.7
Good question - I may add a line to get the last order number and make sure its lower than the entered value. For new shops its fine though.
[Update]: Just realised, it doesnt matter if you change the autoinc value to a value less than the highest order number - the system will still take the next number and ignore autoinc, so this should be perfectly safe.
I just tried setting 1000, placing an order - OK, then setting 800 and placing an order - I got order number 1001 so no problems.
[Update]: Just realised, it doesnt matter if you change the autoinc value to a value less than the highest order number - the system will still take the next number and ignore autoinc, so this should be perfectly safe.
I just tried setting 1000, placing an order - OK, then setting 800 and placing an order - I got order number 1001 so no problems.
Probably a good idea... I'm not sure how PS would handle reusing order numbers...
Dan
Dan
Nineplus USA - Now on Prestashop 1.4.7
Thanks so much to whoever posted this. I switched hosts for my shop and really wanted to keep the order numbers in sequence. Thanks again :)
<3 Jessica F
From 1256277164:
I'm surprised that doesn't work. The only other thing I can think of is that it is using auto-increment to generate the order numbers. If it is, you could execute the following query on your database to set the next order number to 1000:
ALTER TABLE `ps_orders` AUTO_INCREMENT = 1000
Help please!!!
I use hostgator as my hosting company and followed these steps and got this error.
#1046 - No database selected
ALTER TABLE `ps_orders` AUTO_INCREMENT =2092
Please help.
Thanks in advance.
Try:
Change database_name to the name of your database.
ALTER TABLE `database_name`.`ps_orders` AUTO_INCREMENT = 2092
Change database_name to the name of your database.
Check out Nethercott Constructions for PrestaShop guides and modules. Like us on Facebook for news updates.




Back to top











