Community Forums

How to change order_id for Invoice number

General support for technical problems with OpenCart v1.x

Re: How to change order_id for Invoice number

Postby yiyinlah » Wed Sep 29, 2010 6:02 am

dramony wrote: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.


Hi!

THank you, but it doesn't exist.

I tried & this is what it prompt me,
"#1146 - Table 'username_opcart.order' doesn't exist"

I don't know what to do anymore.
What had happened? Do it really not exist?
Please 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 » Wed Sep 29, 2010 6:05 am

Hi!

Thank you all!

I solved it!

I had forgotten about those prefixes.
I had changed & successfully made it worked! :)

Thank you so 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 JasonC » Tue Nov 16, 2010 8:24 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


What is the correct syntax to add the prefix?
thanks
JasonC
 
Posts: 8
Joined: Mon Nov 15, 2010 5:49 pm

Re: How to change order_id for Invoice number error #1046 -

Postby Blackbet » Mon Dec 06, 2010 2:27 am

Hi,

Sorry to bother. But the SQL script is not working for me. I'm receiving this message: "#1046 - No database selected"
I need to change order id to 10113.

OpenCart V1.4.9.1

Any help will be greatly appreciated.

Thanks :rtfm:
Blackbet
 
Posts: 12
Joined: Mon Dec 06, 2010 2:18 am

Re: How to change order_id for Invoice number

Postby cerami2 » Sat Jul 30, 2011 1:16 pm

I use one pay pal for a few websites i would like the order number to show what website the order came from
were do you change this in opencart i want to put a prefix for the order number

(prepend a prefix if needed (i.e. `xxx_order`) were do i fine this or were do i put it in at the website
Regards
cerami2
cerami2
 
Posts: 9
Joined: Wed Jun 15, 2011 4:48 pm

Re: How to change order_id for Invoice number

Postby Joxe » Wed Aug 24, 2011 8:17 pm

HI,
Is this working for 1.5.x?

Thanks.
v. 1.4.9.6 & v. 1.5.1.1
Joxe
 
Posts: 202
Joined: Tue Apr 27, 2010 10:12 pm

Re: How to change order_id for Invoice number

Postby iamskyemedia » Fri Dec 23, 2011 5:28 pm

The command works for order id only. How do you get it to work for the invoice number? I'd like the order id and invoice # to match. I'm working with a numbering system only, not alphas. Please help. Thanks!

JasonC 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


What is the correct syntax to add the prefix?
thanks
iamskyemedia
 
Posts: 15
Joined: Thu Sep 29, 2011 4:10 pm

Re: How to change order_id for Invoice number

Postby HorseMagic » Tue Feb 07, 2012 6:49 am

tried the sql thingy that everyone was talking about but it didn't work for me either


You do this at your own risk!

It worked for me but hey I don't know what I am doing, I have no technical skills whatsever but I do try to remember exact what I am doing so i can go back to original way if required.

So if there is problems down the track don't complain to me I have no knowledge of problems......

that should read... No problems yet

I will post back here if I find any.

Logged into cpanel,
I went to phpmyadmin,
tried the sql thingy that everyone was talking about but it didn't work for me either,
so went to oc_database,
scrolled down to orders,
clicked on that file,
went to last order
edit
changed the order number
and clicked on Go,
I have put through a couple of orders with no problems
Note: It would only accept changing the number, could not add letters before the number.

Like I said at the beginning, I know NOT what I am doing so its at your own risk and if anyone knows why I can't do it let me know, I am happy to learn :)
Anita
User avatar
HorseMagic
 
Posts: 33
Joined: Sat Jan 21, 2012 5:55 am
Location: Australia

Re: How to change order_id for Invoice number

Postby storm-cloud » Thu Feb 23, 2012 5:43 am

iamskyemedia wrote:The command works for order id only. How do you get it to work for the invoice number? I'd like the order id and invoice # to match. I'm working with a numbering system only, not alphas. Please help. Thanks!]


Did you end up finding out an answer to this? If not, would anyone know how?

We have a previous eCommerce solution and when we do the live switch I would like the order numbers to seamlessly continue. Yes, it would be great if order numbers and invoice numbers matched.

Also, by using executing the SQL command, this didn't make each order go by up by 10,000 did it?
storm-cloud
 
Posts: 156
Joined: Wed Feb 22, 2012 12:07 am

Re: How to change order_id for Invoice number

Postby NikkiC » Tue Feb 28, 2012 12:48 am

This worked perfect for me too! Hope it doesn't mess anything up :choke:
But it seems to be working!

HorseMagic wrote:tried the sql thingy that everyone was talking about but it didn't work for me either


You do this at your own risk!

It worked for me but hey I don't know what I am doing, I have no technical skills whatsever but I do try to remember exact what I am doing so i can go back to original way if required.

So if there is problems down the track don't complain to me I have no knowledge of problems......

that should read... No problems yet

I will post back here if I find any.

Logged into cpanel,
I went to phpmyadmin,
tried the sql thingy that everyone was talking about but it didn't work for me either,
so went to oc_database,
scrolled down to orders,
clicked on that file,
went to last order
edit
changed the order number
and clicked on Go,
I have put through a couple of orders with no problems
Note: It would only accept changing the number, could not add letters before the number.

Like I said at the beginning, I know NOT what I am doing so its at your own risk and if anyone knows why I can't do it let me know, I am happy to learn :)
NikkiC
 
Posts: 10
Joined: Thu Feb 16, 2012 9:44 pm

Re: How to change order_id for Invoice number

Postby aresn » Tue Feb 28, 2012 3:56 am

if you know what you are doing , then you can use some combination of this script http://www.tonymarston.net/php-mysql/encryption.html and your own to create a unique order id to present to user. check http://stackoverflow.com/questions/5387 ... l-order-id

hope this helped
User avatar
aresn
 
Posts: 7
Joined: Thu Jan 12, 2012 4:54 pm

Re: How to change order_id for Invoice number

Postby H2O » Wed Mar 14, 2012 9:36 pm

dramony wrote: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.


It appears this changed for the newer version of Opencart, the correct code that worked for me on version 1.5.2.1 is:

Code: Select all
ALTER TABLE `oc_order`  AUTO_INCREMENT =10000
A good site for e-commerce advice.
H2O
 
Posts: 26
Joined: Tue Feb 28, 2012 11:36 pm

Re: How to change order_id for Invoice number

Postby NikkiC » Wed Mar 14, 2012 9:41 pm

Perfect! Thanks for letting us know the update :-)
NikkiC
 
Posts: 10
Joined: Thu Feb 16, 2012 9:44 pm

Previous

Return to General Support

Who is online

Users browsing this forum: butte, mikispace and 69 guests

Hosted by Arvixe Web Hosting