Community Forums

How to change order_id for Invoice number

General support for technical problems with OpenCart v1.x

How to change order_id for Invoice number

Postby cadsifu » Thu Oct 08, 2009 4:11 am

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
cadsifu
 
Posts: 8
Joined: Thu Oct 08, 2009 4:00 am

How to change order_id for Invoice numberzxxx

Postby cadsifu » Thu Oct 08, 2009 4:16 am

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.
cadsifu
 
Posts: 8
Joined: Thu Oct 08, 2009 4:00 am

Re: how to change initial order_id

Postby Qphoria » Thu Oct 08, 2009 1:26 pm

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?
Image Image
Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
User avatar
Qphoria
Administrator
 
Posts: 18234
Joined: Mon Jul 21, 2008 7:02 pm
Donate to Qphoria

Re: how to change initial order_id

Postby sgfx » Thu Oct 08, 2009 10:12 pm

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.
User avatar
sgfx
 
Posts: 18
Joined: Thu Oct 08, 2009 1:56 am

Re: How to change order_id for Invoice number

Postby Qphoria » Fri Oct 09, 2009 6:16 pm

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
Image Image
Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
User avatar
Qphoria
Administrator
 
Posts: 18234
Joined: Mon Jul 21, 2008 7:02 pm
Donate to Qphoria

Re: How to change order_id for Invoice number

Postby cadsifu » Mon Oct 12, 2009 4:32 pm

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
cadsifu
 
Posts: 8
Joined: Thu Oct 08, 2009 4:00 am

Re: How to change order_id for Invoice number

Postby DannyMacD » Sun Dec 06, 2009 4:43 pm

i would like to know how to do this..

i need:

DIS000001

then increase per order

DIS000001
DIS000002
etc

many thanks
DannyMacD
 
Posts: 471
Joined: Thu Jun 25, 2009 10:39 pm

Re: How to change order_id for Invoice number

Postby DannyMacD » Sat Dec 26, 2009 5:21 pm

anyone? :)
DannyMacD
 
Posts: 471
Joined: Thu Jun 25, 2009 10:39 pm

Re: How to change order_id for Invoice number

Postby loadaverage » Sat Dec 26, 2009 10:33 pm

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.
we is experts(tm)
loadaverage
 
Posts: 64
Joined: Thu Nov 19, 2009 6:10 pm

Re: How to change order_id for Invoice number

Postby allenshea » Sun Dec 27, 2009 5:11 am

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
I know nothing about PHP and SQL, but I still try my best to understand it.
User avatar
allenshea
 
Posts: 223
Joined: Mon Dec 14, 2009 2:01 pm

Re: How to change order_id for Invoice number

Postby loadaverage » Sun Dec 27, 2009 5:30 am

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.
we is experts(tm)
loadaverage
 
Posts: 64
Joined: Thu Nov 19, 2009 6:10 pm

Re: How to change order_id for Invoice number

Postby cmebd » Sun Dec 27, 2009 10:25 pm

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
User avatar
cmebd
 
Posts: 405
Joined: Fri Nov 13, 2009 3:17 am
Location: Tasmania, Australia

Re: How to change order_id for Invoice number

Postby sizzlingscience » Sat Mar 13, 2010 5:15 pm

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
sizzlingscience
 
Posts: 60
Joined: Mon Jan 11, 2010 10:03 pm

Re: How to change order_id for Invoice number

Postby i2Paq » Sat Mar 13, 2010 5:52 pm

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.
Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
FREE manuals: ShowMe Guides OpenCart.

Opencart Check List.
Documentation: Our Documentation section.
BUGs?: Known BUGS for All OC Versions.

Alles over BTW: [How to] BTW + Verzend & betaalmethodes.
User avatar
i2Paq
Global Moderator
 
Posts: 9835
Joined: Mon Nov 09, 2009 11:00 am
Location: Winkel - The Netherlands

Re: How to change order_id for Invoice number

Postby sizzlingscience » Sun Mar 14, 2010 7:10 pm

Thank you - got it to work! :)
sizzlingscience
 
Posts: 60
Joined: Mon Jan 11, 2010 10:03 pm

Re: How to change order_id for Invoice number

Postby justme54s » Fri Apr 30, 2010 2:45 pm

Thanks! Been looking for that.
justme54s
 
Posts: 7
Joined: Fri Apr 30, 2010 1:35 pm

Re: How to change order_id for Invoice number

Postby tommyla » Sun Jul 11, 2010 1:47 am

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
tommyla
 
Posts: 144
Joined: Wed Jul 22, 2009 1:49 pm
Location: Norway

Re: How to change order_id for Invoice number

Postby yiyinlah » Sun Sep 26, 2010 10:05 pm

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!
I'm using Opencart 1.5.4.1 & vQmod 2.3.2.
User avatar
yiyinlah
 
Posts: 169
Joined: Thu Sep 23, 2010 5:19 am
Location: Singapore

Re: How to change order_id for Invoice number

Postby yiyinlah » Mon Sep 27, 2010 10:59 pm

Hello!

ANyone?? :(
I'm using Opencart 1.5.4.1 & vQmod 2.3.2.
User avatar
yiyinlah
 
Posts: 169
Joined: Thu Sep 23, 2010 5:19 am
Location: Singapore

Re: How to change order_id for Invoice number

Postby dramony » Tue Sep 28, 2010 2:56 am

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.
User avatar
dramony
 
Posts: 258
Joined: Sat Oct 24, 2009 4:34 am

Next

Return to General Support

Who is online

Users browsing this forum: cabachona, diysignsnewzealand, Exabot [Bot], lisagriff, settysantu, xxmioxx and 81 guests

Hosted by Arvixe Web Hosting