How do you modify gallery carts order id number?

battledingo
battledingo's picture

Joined: 2006-08-25
Posts: 39
Posted: Fri, 2007-05-18 03:48

Gallery version: 1.5
Apache version: 1.3.36 (Unix)
PHP Version 4.4.2
Graphics Toolkit: not sure
Operating system:Linux Kernel version 2.6.18.1-grsec-r1 Machine Type i686
Web browser/version (if applicable): netscape 8.1.2

Hi

I had to reinstall gallery & gallery cart and now have duplicate orders. This wasn't a problem until duplicate orders were detected by paypal & won't accept payment from the order.

I would like to change the order id to another number. This number would be higher than the current order numbers to avoid duplication.

" Order Number : {$_REQUEST['id']}\n"

I can't find which file the id is being grabbed from.

Thanks for your time in looking at this.

kind regards

:)peter

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Fri, 2007-05-18 05:46

Gallery Cart ?!?

Jens
--
Last Gallery v1 Developer and v1 translation manager.

 
battledingo
battledingo's picture

Joined: 2006-08-25
Posts: 39
Posted: Fri, 2007-05-18 06:10

Hi Jens

Sorry, yes this is a gallery cart problem.

gallery cart V 0.43

Any ideas would be much appreciated.

cheers

peter

 
battledingo
battledingo's picture

Joined: 2006-08-25
Posts: 39
Posted: Mon, 2007-05-21 01:44

Problem solved by the wonderful NotGodess. Big thanks for all her help.

Greetings,

The order id is taken from the 'id' field of the orders table in the
database. I'm guessing you didn't reimport your old data?
All you should need to do is change the autoincrement value on that table.

Short version:
Use PHPMyAdmin, select the GC db, orders table and perform this sql
(change 224 to the number you want the next order id to be):
ALTER TABLE `orders` AUTO_INCREMENT =224

Long version:
Here are some step-by-step instructions. If you are familiar with
doing stuff like this you can skip ahead. These are given assuming you
have the 'normal' control panel.

go into your control panel and click on the 'mysql databases' icon/button.
At the bottom you'll see a link for 'phpmyadmin' click on that and it
usually opens in a new window.
On the left side, select the galleryCart database.
The tables list should appear on the right.
On the top right are tabs, click the on marked 'SQL'
In the text box type this:
ALTER TABLE `orders` AUTO_INCREMENT =224

impt: change 224 to the number you want for your next order id

click on the 'go' button.

That should fix the issue for future orders.

NotGoddess