Reset invoice numbers

  • Posts: 12
  • Thank you received: 1
12 years 6 months ago #48716

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.

  • Posts: 12
  • Thank you received: 1
12 years 6 months ago #48724

Nobody knows ??

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

  • Posts: 127
  • Thank you received: 12
12 years 6 months ago #48744

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.

  • Posts: 12953
  • Thank you received: 1778
12 years 6 months ago #48751

Hello,

This email address is being protected from spambots. You need JavaScript enabled to view it. 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.

  • Posts: 127
  • Thank you received: 12
12 years 6 months ago #48759

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.

  • Posts: 12
  • Thank you received: 1
12 years 6 months ago #48827

Merci, ça marche

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

  • Posts: 45
  • Thank you received: 2
12 years 6 months ago #50259

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.

  • Posts: 82822
  • Thank you received: 13369
  • MODERATOR
12 years 6 months ago #50365

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.092 seconds
Powered by Kunena Forum