Page 1 of 2

How to change order_id for Invoice number

Posted: Thu Oct 08, 2009 12:11 pm
by cadsifu
Dear All,

Hope you guys can provide solution for this.
I need to change the Invoice No#.
Instead of 0 or single character, I would like to have more, e.g: 00950886 or INV 0900764, etc...
I was made understood the variable is order_id, however I couldn't find where to change it.

Hope to receive response as soon as possible.

cadsifu@inbox.com

How to change order_id for Invoice numberzxxx

Posted: Thu Oct 08, 2009 12:16 pm
by cadsifu
Hi All,

In the beginning, the order_id started from 0.
However this doesn't look good since it only displays single numeric character.
Is there any possibility to change to mixed-character e.g: INV 0094065 or maybe numerics only 0094065

Looking forward for some guide from all experts here.

Re: how to change initial order_id

Posted: Thu Oct 08, 2009 9:26 pm
by Qphoria
cadsifu wrote: However this doesn't look good since it only displays single numeric character..
Are the other Alphanumerics laughing at him because he's only a number? Is there a fashion show that he wants to win? What does a good looking order number do for you? Perhaps if we converted it to Roman numerals?

Re: how to change initial order_id

Posted: Fri Oct 09, 2009 6:12 am
by sgfx
cadsifu wrote:Hi All,
In the beginning, the order_id started from 0.
However this doesn't look good since it only displays single numeric character
I understand and agree. It is the same issue as using the temporary check books given by banks.

A customer could have less confidants in a online store when they receive there invoice as No.3
instead of No. 21003.

Small issue that clears it self up after a 1000 sales or so. ;)

However having a option to format the invoice number (the presented number not the real db number) to match a company's own invoice would be nice. perhaps even an option to add a base number so that it can line up with orders from a previous shopping cart.

Re: How to change order_id for Invoice number

Posted: Sat Oct 10, 2009 2:16 am
by Qphoria
Execute this simple sql in your phpmyadmin

Code: Select all

ALTER TABLE `order`  AUTO_INCREMENT =10000
(prepend a prefix if needed (i.e. `xxx_order`)


Now it will start at 10000

Re: How to change order_id for Invoice number

Posted: Tue Oct 13, 2009 12:32 am
by cadsifu
thanks for your nice comments

maybe it's too late for me to reply, however I've managed to change it.
the only i can't do is to add alphabet character infront of the numbers.. e.g: INV0020456
as well as change the number so that it looks like this >>> 0020456 instead of 20456

thanks for your kind support and assistance...
Qphoria wrote:Execute this simple sql in your phpmyadmin

Code: Select all

ALTER TABLE `order`  AUTO_INCREMENT =10000
(prepend a prefix if needed (i.e. `xxx_order`)


Now it will start at 10000

Re: How to change order_id for Invoice number

Posted: Mon Dec 07, 2009 12:43 am
by DannyMacD
i would like to know how to do this..

i need:

DIS000001

then increase per order

DIS000001
DIS000002
etc

many thanks

Re: How to change order_id for Invoice number

Posted: Sun Dec 27, 2009 1:21 am
by DannyMacD
anyone? :)

Re: How to change order_id for Invoice number

Posted: Sun Dec 27, 2009 6:33 am
by loadaverage
we will have to see how the new invoicing system
will look like in opencart.

in most of the eu countries the current invoice implementation
is not usable. Daniel said he is working on a new one,
and as there is no "one good type" of invoice number formatting,
hopefully it will be customisable to a degree. otherwise
it won't be very useful for a lot of people once again.

Re: How to change order_id for Invoice number

Posted: Sun Dec 27, 2009 1:11 pm
by allenshea
I want to make the Order ID as OC09FR1227A,
refer to
OC: OpenCart
09: 2 digital for the year that the order has been placed
FR: ISO Code of France, can get the Country Code when clients Register.
1227: is the date that the order has been placed
A: is a series No for order which placed in same day, ex. Dec. 27, from A to Z

If it can make it would be great, it will be more easy for us to make statistics.

Allen

Re: How to change order_id for Invoice number

Posted: Sun Dec 27, 2009 1:30 pm
by loadaverage
OC09FR1227A
wow, that seems a bit overengineered.

-why separate the year from the other parts of the date?
-also, what will you do if you get more than 26 orders a day?

mixing numbers and letters this way will make working
with this invoice "number" rather difficult.

how about:

OC-FR-2009122701

now the invoice has a constant prefix 'OC-FR' and a simple number
that has everything you wanted. this would be quite easy
to implement.

Re: How to change order_id for Invoice number

Posted: Mon Dec 28, 2009 6:25 am
by cmebd
Is it possible to relate order numbers to clients ie [clientname][ordernum].

OR

Cocatenation of date to order number in numerics? ie [ordernum]-[numericdate] or vice-versa?

Just a thought.

Disclaimer: Not a programmer so wouldn't have a clue how it is done or whether it is possible with the structure of OC.

cheers

Re: How to change order_id for Invoice number

Posted: Sun Mar 14, 2010 1:15 am
by sizzlingscience
Qphoria wrote:Execute this simple sql in your phpmyadmin

Code: Select all

ALTER TABLE `order`  AUTO_INCREMENT =10000
(prepend a prefix if needed (i.e. `xxx_order`)


Now it will start at 10000
Where do I find this to change it?

Thank you, Melanie

Re: How to change order_id for Invoice number

Posted: Sun Mar 14, 2010 1:52 am
by i2Paq
sizzlingscience wrote:
Qphoria wrote:Execute this simple sql in your phpmyadmin

Code: Select all

ALTER TABLE `order`  AUTO_INCREMENT =10000
(prepend a prefix if needed (i.e. `xxx_order`)


Now it will start at 10000
Where do I find this to change it?

Thank you, Melanie
Via your phpMyAdmin.

Re: How to change order_id for Invoice number

Posted: Mon Mar 15, 2010 3:10 am
by sizzlingscience
Thank you - got it to work! :)

Re: How to change order_id for Invoice number

Posted: Fri Apr 30, 2010 10:45 pm
by justme54s
Thanks! Been looking for that.

Re: How to change order_id for Invoice number

Posted: Sun Jul 11, 2010 9:47 am
by tommyla
do this command work if i have a order id 38 with invoice 1

Code: Select all

ALTER TABLE `order`  AUTO_INCREMENT =1002
and manual set the order 38 to 1001 in phpMyAdmin afterwards? :)
i just need a confirmation of someone with mysql experience before i do it ;)

OpenCart 1.4.8b

Re: How to change order_id for Invoice number

Posted: Mon Sep 27, 2010 6:05 am
by yiyinlah
i2Paq wrote:
sizzlingscience wrote:
Qphoria wrote:Execute this simple sql in your phpmyadmin

Code: Select all

ALTER TABLE `order`  AUTO_INCREMENT =10000
(prepend a prefix if needed (i.e. `xxx_order`)


Now it will start at 10000
Where do I find this to change it?

Thank you, Melanie
Via your phpMyAdmin.

Hi!

I went into my phpMyAdmin,
clicked on "structure" for the "order" table.
clicked on "change" for the "order_id" field.

Now I don't know what to do anymore.
This is so complicated.

Can you please kindly help me?

Thank you very much!

Re: How to change order_id for Invoice number

Posted: Tue Sep 28, 2010 6:59 am
by yiyinlah
Hello!

ANyone?? :(

Re: How to change order_id for Invoice number

Posted: Tue Sep 28, 2010 10:56 am
by dramony
go to you phpmyadmin, click SQL (located on the top) then paste this on the text area:

Code: Select all

ALTER TABLE `order`  AUTO_INCREMENT =10000
Click the Go button on the right side.