Skip to main content

Reset invoice numbers

More
14 years 5 months ago #48716 by Gregory
Hi,

I made a lot of test and of course, invoice number in now reaching 44.

My website will be online tomorrow and I would like to reset invoice number to start again with number 1.

How can I do this ?

Thank you in advance
The following user(s) said Thank You: klimmbimm

Please Log in or Create an account to join the conversation.

More
14 years 5 months ago #48724 by Gregory
Replied by Gregory on topic Re: Reset invoice numbers
Nobody knows ??

Please Log in or Create an account to join the conversation.

More
14 years 5 months ago #48744 by tony@10uk.net
The support on this forum is excellent, but there aren't any SLAs for replies. :-)

I haven't got the system in front on me, but when I looked at the database a while ago, most of the IDs are mySQL auto increment attributes.

I'm guessing this is where the order number comes from. You need to be absolutely sure that you have cleared down all your test orders and then reset the auto increment value directly in mysql against the correct table and attribute. There will be loads on google for how to do this with mySQL depending on how you access your DB.

But I've never done this with HikaShop so attempt at your own risk and see if it does what you want. A backup first would be a good idea :-)

Please Log in or Create an account to join the conversation.

More
14 years 5 months ago #48751 by Mohamed Thelji
Hello,

tony@10uk.net is right, you should clean your "hikashop_order" table with a "TRUNCATE TABLE" and delete all your test orders in your hikashop's backend.

Please Log in or Create an account to join the conversation.

More
14 years 5 months ago #48759 by tony@10uk.net
Watch out with TRUNCATE TABLE if you replicate your database.

Probably fixed now, but mySQL couple of years back used to get into a right mess with the replication.

I prefer..
ALTER TABLE <table name> AUTO_INCREMENT = 1;

And as ALTER TABLE is DDL, you will prob have to do same to the replication DB.

If you don't replicate, then no worries.

Please Log in or Create an account to join the conversation.

More
14 years 5 months ago #48827 by Gregory
Replied by Gregory on topic Re: Reset invoice numbers
Merci, ça marche

Please Log in or Create an account to join the conversation.

More
14 years 4 months ago #50259 by klimmbimm
Replied by klimmbimm on topic Re: Reset invoice numbers

tony@10uk.net wrote: I prefer..
ALTER TABLE <table name> AUTO_INCREMENT = 1;


Which tables did you exactely alter to reset the invoice numbers? Is it "hikashop_order" only?

So first, I would delete all my invoices in the backend and then du the ALTER TABLE, right?

Please Log in or Create an account to join the conversation.

More
14 years 4 months ago #50365 by nicolas
Replied by nicolas on topic Re: Reset invoice numbers
Yes, it's only that hikashop_order table.
That's indeed what you have to do.
The following user(s) said Thank You: klimmbimm

Please Log in or Create an account to join the conversation.

Time to create page: 0.211 seconds
Powered by Kunena Forum