Post by mallo82 » Mon Apr 02, 2012 9:16 pm

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!

Newbie

Posts

Joined
Thu Mar 29, 2012 11:30 pm

Post by Avvici » Tue Apr 03, 2012 3:49 pm

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.

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by mallo82 » Tue Apr 03, 2012 6:47 pm

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

Newbie

Posts

Joined
Thu Mar 29, 2012 11:30 pm

Post by bettyjohnson » Thu Apr 05, 2012 11:21 am

I just tried the code given above, but it didn't work.
Are there any other codes that I could use?

Newbie

Posts

Joined
Tue Apr 03, 2012 10:05 pm

Post by learner&coder » Thu Apr 05, 2012 1:38 pm

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.

Newbie

Posts

Joined
Mon Apr 02, 2012 2:20 pm

Post by learner&coder » Thu Apr 05, 2012 4:24 pm

$this->request->get['sort'];

What is use of 'Request->get'

Newbie

Posts

Joined
Mon Apr 02, 2012 2:20 pm

Post by Avvici » Thu Apr 05, 2012 10:12 pm

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.

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by learner&coder » Fri Apr 06, 2012 3:39 pm

thanx

now i get 'request->get'

Newbie

Posts

Joined
Mon Apr 02, 2012 2:20 pm

Post by learner&coder » Fri Apr 06, 2012 5:03 pm

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.

Newbie

Posts

Joined
Mon Apr 02, 2012 2:20 pm
Who is online

Users browsing this forum: Google [Bot] and 220 guests