Post by yiyinlah » Wed Sep 29, 2010 2:02 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.
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
Active Member

Posts

Joined
Thu Sep 23, 2010 1:19 pm
Location - Singapore

Post by yiyinlah » Wed Sep 29, 2010 2:05 pm

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
Active Member

Posts

Joined
Thu Sep 23, 2010 1:19 pm
Location - Singapore

Post by JasonC » Wed Nov 17, 2010 4:24 am

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

Newbie

Posts

Joined
Tue Nov 16, 2010 1:49 am

Post by Blackbet » Mon Dec 06, 2010 10: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:

Newbie

Posts

Joined
Mon Dec 06, 2010 10:18 am

Post by cerami2 » Sat Jul 30, 2011 9: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

Newbie

Posts

Joined
Thu Jun 16, 2011 12:48 am

Post by Joxe » Thu Aug 25, 2011 4:17 am

HI,
Is this working for 1.5.x?

Thanks.

v. 1.4.9.6 & v. 2.0.2.0


Active Member

Posts

Joined
Wed Apr 28, 2010 6:12 am

Post by iamskyemedia » Sat Dec 24, 2011 1:28 am

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

Newbie

Posts

Joined
Fri Sep 30, 2011 12:10 am

Post by HorseMagic » Tue Feb 07, 2012 2:49 pm

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
New member

Posts

Joined
Sat Jan 21, 2012 1:55 pm
Location - Australia

Post by storm-cloud » Thu Feb 23, 2012 1:43 pm

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?

Active Member

Posts

Joined
Wed Feb 22, 2012 8:07 am

Post by NikkiC » Tue Feb 28, 2012 8: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 :)

Newbie

Posts

Joined
Fri Feb 17, 2012 5:44 am

Post by aresn » Tue Feb 28, 2012 11: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
Newbie

Posts

Joined
Fri Jan 13, 2012 12:54 am

Post by H2O » Thu Mar 15, 2012 5:36 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.
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
New member

Posts

Joined
Wed Feb 29, 2012 7:36 am

Post by NikkiC » Thu Mar 15, 2012 5:41 am

Perfect! Thanks for letting us know the update :-)

Newbie

Posts

Joined
Fri Feb 17, 2012 5:44 am

Post by Counting Pounds » Mon Dec 02, 2013 9:53 am

I've run the myPHP command and that works well for numeric orderID's.

I'm not sure what /how to get Alpha-numeric's for an order ID, not just integers. For example, if I wanted OC-1000 and counting.

I'm planning to copy the order ID into the invoice field (don't need these to be different, but want/need to have some static letters in the invoice#. I need the entire set of characters including the two letters to be in the data stored so we can print etc / simply adding these non-varying letters as prefixes to document template info is no use as there are too many places to edit this.


Posts

Joined
Wed Nov 06, 2013 7:55 am

Post by i2Paq » Mon Dec 02, 2013 9:27 pm

Counting Pounds wrote:I've run the myPHP command and that works well for numeric orderID's.

I'm not sure what /how to get Alpha-numeric's for an order ID, not just integers. For example, if I wanted OC-1000 and counting.

I'm planning to copy the order ID into the invoice field (don't need these to be different, but want/need to have some static letters in the invoice#. I need the entire set of characters including the two letters to be in the data stored so we can print etc / simply adding these non-varying letters as prefixes to document template info is no use as there are too many places to edit this.
In most country's the Invoice numbers must be (by Law) subsequent, using the order numbers this will not happen.

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by Counting Pounds » Tue Dec 03, 2013 6:21 pm

After struggling thru and getting to it to work i established the following.

1. Order ID can only ever be a number (ie its set to data type integer).

2. If you want letters, then use invoice numbers - I suspect that invoice numbers also have to be intergers (numbers) but you can put letters / symbols before as a prefix - go to system/settings/store to do this.

3. I wanted to simplify stuff, so found an extension that automatically copies the order ID# to the invoice ID#. I now get to track using letters & auto-incremented numbers starting at whatever number I want. The invoice # appears on e.mailied docs without admin intervention.

3. Order ID can start at any number you like using the PHPmyadmin Command below (copied from above contributor). You open PHPmyadmin, go to the SQL tab, paste it in and hit go.

ALTER TABLE `oc_order` AUTO_INCREMENT =10000

Note that the OC_ bit of "oc_order" needs to be changed to reflect the table prefix your hosting company is setup to use. ie the bit of the name that comes before the underscore in the tables that you can see so oc_order becomes mine_order if all the tables in your system were mine_ something


Posts

Joined
Wed Nov 06, 2013 7:55 am

Post by actlas » Tue Aug 05, 2014 2:58 pm

Problem solved:

Code: Select all

MySQL empty result set (0 rows). (query took 0.0946 sec)
ALTER TABLE `jos_mijoshop_order` AUTO_INCREMENT = 7892

Newbie

Posts

Joined
Mon Nov 25, 2013 6:10 pm

Post by fred1234 » Wed Jun 03, 2015 12:24 pm

I am at phpMyadmin > SQL and entered the below:

Code: Select all
ALTER TABLE `order` AUTO_INCREMENT =10000

But it says #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Code: Select all ALTER TABLE `order` AUTO_INCREMENT =10000' at line 1

May I know what is my next step?

Newbie

Posts

Joined
Wed Jun 03, 2015 12:22 pm

Post by bhy » Wed Apr 27, 2016 2:31 am

Is this supposed to work in 2.0?

The SQL command was successful but the order numbers don't seem to be changed.

EDIT: it does work, I'm just stupid and didn't realize I need to create a new order to see the effect.

bhy
New member

Posts

Joined
Fri Jul 17, 2015 7:28 pm

Post by goddy » Fri May 13, 2016 2:07 pm

Thank u! :)

Newbie

Posts

Joined
Fri May 13, 2016 9:46 am
Who is online

Users browsing this forum: No registered users and 92 guests