Page 1 of 1

How to increase order number.

Posted: Mon Apr 02, 2012 9:16 pm
by mallo82
Hi,

Is there a way to increase the order number that appears on the customers order confirmation email.

It has started on 1 but I would like to put a set of other numbers before - "183000"

So the order numbers will increase like this:

1830001, 1830002, 18030003 etc etc....

I'm just trying to make it look like we've had more orders in the past than we actually have.

Thanks!

Re: How to increase order number.

Posted: Tue Apr 03, 2012 3:49 pm
by Avvici
The order_id field in the order table is an Auto Incrementing field that has the INT type set at 11.

If you want your orders to start at a different number then you need to run a SQL query from within PHP MY Admin such as this:

Code: Select all

ALTER TABLE `order` AUTO_INCREMENT = 80000;
Depending upon your version if MYSQL, that will change the auto increment. Warning: that operation could take forever if you have a gazillion orders.....and could affect the flow of things if you have other scripts tied to certain Order_Id's.

Re: How to increase order number.

Posted: Tue Apr 03, 2012 6:47 pm
by mallo82
Thanks very much, that has worked perfectly!!

When I first read your reply I was a bit worried as I am very new to MYSQL/ PHP My Admin however I just found this page explaining how to run a MYSQL query and it was actually very simple

http://community.mybb.com/thread-4720.html

Re: How to increase order number.

Posted: Thu Apr 05, 2012 11:21 am
by bettyjohnson
I just tried the code given above, but it didn't work.
Are there any other codes that I could use?

Re: How to increase order number.

Posted: Thu Apr 05, 2012 1:38 pm
by learner&coder
I am begginer in opencart, i am not getting meaning of "escape" in
. $this->db->escape($data['firstname']) . sentense in customer.php. Please explain it.
Thanx for your replay.

Re: How to increase order number.

Posted: Thu Apr 05, 2012 4:24 pm
by learner&coder
$this->request->get['sort'];

What is use of 'Request->get'

Re: How to increase order number.

Posted: Thu Apr 05, 2012 10:12 pm
by Avvici
That get's the value of a variable passed in the URL.
Example: http://www.yoursite.com/index.php?value=1

Code: Select all

if(isset($this->request->get['value'])){
$value = $this->request->get['value'];
}
$value would be equal to 1.

Re: How to increase order number.

Posted: Fri Apr 06, 2012 3:39 pm
by learner&coder
thanx

now i get 'request->get'

Re: How to increase order number.

Posted: Fri Apr 06, 2012 5:03 pm
by learner&coder
now i want to create my own templates and want to create part for module. how to do it.
i have to add employee section. how many files i add for this and how to show employee section.