| Author |
Topic  |
quadrant
Ecommerce Template Expert
706 Posts |
Posted - 08/22/2012 : 13:34
|
Hi,
I have noticed today that when a customer creates an account it has started duplicating ordClientID from previous orders.
The highest id I have on this site is 7441 and when a customer creates an account it's giving them an id that's against manual orders. Today it has gone back to client ID 1088.
The problem being is that when they log into their account they are seeing orders for other people and they are all manually entered ones.
Out of the orders I have received today 3 have created an account and it's happened to all three.
Any ideas how I can resolve this?
Can I just change the ordClientID to the manual orders as a temp. fix and if so to what?
Regards,
David |
|
Sinbad
Administrator
USA
53962 Posts |
Posted - 08/22/2012 : 15:01
|
Hi David have you edited the database recently or moved/exported/imported the database recently?
Winners never quit, quitters never win User Manual for Ecommerce Templates
|
 |
|
quadrant
Ecommerce Template Expert
706 Posts |
Posted - 08/22/2012 : 15:23
|
Hi Sinbad,
I normally export it once in a while. I should do it more often than I do for backup purposes.
I have never imported into this db.
It's still the same db, on the same server from the original install.
Looking in phpMyAdmin it looks like it has been doing it randomly since 2010 which was not long after this install.
The only reason I noticed is because I had a customer ask me to add an order to an account they created after the order was placed. I checked to see if was added and they had an old order in the system which I clicked on and it's for a totally different customer. The more I look the more I am seeing.
|
 |
|
quadrant
Ecommerce Template Expert
706 Posts |
Posted - 08/22/2012 : 15:24
|
I haven't edited it either - missed that part of your question.
Regards,
David |
 |
|
Sinbad
Administrator
USA
53962 Posts |
Posted - 08/22/2012 : 15:35
|
Hi I'm going to escalate this to the developer to follow up with you. Please subscribe to this post if you have not done so already.
Winners never quit, quitters never win User Manual for Ecommerce Templates
|
 |
|
quadrant
Ecommerce Template Expert
706 Posts |
Posted - 08/22/2012 : 15:37
|
Thanks Sinbad, Already done.
|
 |
|
Phil
ECT Moderator
United Kingdom
4796 Posts |
Posted - 08/23/2012 : 04:33
|
Hi David, If you create an order manually and it's for a customer that already exists (has an account), for example by entering the email address and using the autocomplete feature their existing client ID will be used.
If the manual order is for a new customer without an account the client ID field value should be zero.
Can you login to phpmyadmin, click on the customerlogin table in the left column, then click on operations, and let us know what the value is in the auto increment field? It should be higher than 7441 if that's the highest value you have in the clientid field for that table.
If for example your new client ID's are at 1088 today I would expect to see that value +1 in the auto increment field

* Moving Servers? * Database Imports/Exports * Database Conversions * Access to MySql * ASP to PHP Rate Our Services/View Our Feedback |
Edited by - Phil on 08/23/2012 04:34 |
 |
|
quadrant
Ecommerce Template Expert
706 Posts |
Posted - 08/23/2012 : 05:09
|
Hi Phil,
Thanks for that info, you were spot on. It was 1091 so I have changed it to 7500.
Am I alright going into the duplicates an changing the id's to something in between 7441 and 7500?
The only thing I can think of that may of caused this is our hosts server went down at the weekend. Could that have caused this?
Regards,
David |
 |
|
Phil
ECT Moderator
United Kingdom
4796 Posts |
Posted - 08/23/2012 : 05:16
|
Hi David,
You['ll have to be careful here changing the duplicates but they will have to be changed. Do any of the duplicate client ID orders have an existing account? If they don't have an account set them to zero. If they do have an account set them to the ID that is assigned to the email address in their account. The client ID will have to be changed in the orders table and the cart table. There's no quick way of doing this really.
Take a full backup before you start so you can roll back if needs be.
I'm not really sure how that's come about so I'd keep an eye on it.

* Moving Servers? * Database Imports/Exports * Database Conversions * Access to MySql * ASP to PHP Rate Our Services/View Our Feedback |
Edited by - Phil on 08/23/2012 05:18 |
 |
|
quadrant
Ecommerce Template Expert
706 Posts |
Posted - 08/23/2012 : 05:50
|
Hi Phil,
I have had a look at the tables and in customerlogin under the clID column the numbers are auto-incrementing fine. They start at 1 and go upto 1090.
Looking in ordClientID under orders I can see that people without an account have already been assigned these numbers when they put an order through. So it looks like the clID has now caught up with orders put though when the site was new. Most checkout without creating an account.
Also when I manually add an order some have 0 and some are the previous order id, so if I put an order through for a customer, without an account and just using the auto-complete in admin and that order has an id of 6631 then that will be their ordClientID on the next one I put through for them. Example the next order I manually enter has an order id of 7458 they are then given an ordClientID of 6631 (their previous order id).
So we have customers that we manually enter orders for. We just use the auto-complete and do not have login accounts setup. So should they always have a ordClientID of 0?
That seems to be the majority of them.
Regartds,
David |
 |
|
Phil
ECT Moderator
United Kingdom
4796 Posts |
Posted - 08/23/2012 : 06:05
|
The ordclientID is related to the clID in the customer login table, so anybody logged in who makes an order, that order in the ordclientID field will be asigned the clID from the customer table clID field FROM THEIR ACCOUNT. If they're not logged in the ordclientID will be zero because they don't have a clID.
The ordclientID value will also be in the cart table in the cartClientID field per product added.
So really when you mentions the value of 7441 you were referring to the order ID's and not the client ID's. So your client ID auto increment value of 1088 was correct in the first instance.
So are you saying that the order ID's are duplicating? You've confused me a little here.

* Moving Servers? * Database Imports/Exports * Database Conversions * Access to MySql * ASP to PHP Rate Our Services/View Our Feedback |
Edited by - Phil on 08/23/2012 06:08 |
 |
|
quadrant
Ecommerce Template Expert
706 Posts |
Posted - 08/23/2012 : 06:05
|
Hi Phil,
I have found an example which may help.
This is a customer who does not have an account. He has ordered three times from us.
Order ID 3366 ordered online by customer ordClientID 0 Order ID 3445 we entered this using auto-complete ordClientID 3366 (previous order ID. Order ID 6524 ordered online by customer ordClientID 0
Does this shed any light on what might be happening?
Regards,
David |
 |
|
Phil
ECT Moderator
United Kingdom
4796 Posts |
Posted - 08/23/2012 : 06:13
|
Order ID 3366 ordered online by customer ordClientID 0 - no account yes?
Order ID 3445 we entered this using auto-complete ordClientID 3366 (previous order ID. - Does this customer have an account? If he does his clID in the customer login table should be 3366
Order ID 6524 ordered online by customer ordClientID 0 - no account yes?
Also Order ID 3445 in the cart table should have the value 3366 in the cartclientID field

* Moving Servers? * Database Imports/Exports * Database Conversions * Access to MySql * ASP to PHP Rate Our Services/View Our Feedback |
Edited by - Phil on 08/23/2012 06:16 |
 |
|
Phil
ECT Moderator
United Kingdom
4796 Posts |
Posted - 08/23/2012 : 06:27
|
quote: I have noticed today that when a customer creates an account it has started duplicating ordClientID from previous orders.
The highest id I have on this site is 7441 and when a customer creates an account it's giving them an id that's against manual orders. Today it has gone back to client ID 1088.
Just to explain:-
When a customer creates an account their data is in the customerlogin table and they're assigned a value in the clID field. That value will be assigned to the cartClientID in the cart table and the OrdclientID in the orders table. Any previous orders made from that client (if any) will be recognised by the system through their email address and this will give you the option to add their previous orders to their account.
I think the value 7441 you're referring to is your Order ID - this has no relationship to the cartClientID, clID or OrdclientID
So I'm not too sure how clients can see other peoples orders without looking at an example really, but I would put that auto increment value back to one above the highest clID you have

* Moving Servers? * Database Imports/Exports * Database Conversions * Access to MySql * ASP to PHP Rate Our Services/View Our Feedback |
Edited by - Phil on 08/23/2012 06:31 |
 |
|
Phil
ECT Moderator
United Kingdom
4796 Posts |
Posted - 08/23/2012 : 06:33
|
quote: So we have customers that we manually enter orders for. We just use the auto-complete and do not have login accounts setup. So should they always have a ordClientID of 0?
That's correct

* Moving Servers? * Database Imports/Exports * Database Conversions * Access to MySql * ASP to PHP Rate Our Services/View Our Feedback |
 |
|
quadrant
Ecommerce Template Expert
706 Posts |
Posted - 08/23/2012 : 06:35
|
Hi Phil,
quote: Order ID 3366 ordered online by customer ordClientID 0 - no account yes?
Correct no account - if I search on their email address in admin/client login there are no results
quote: Order ID 3445 we entered this using auto-complete ordClientID 3366 (previous order ID. - Does this customer have an account? If he does his clID in the customer login table should be 3366
Correct no account
quote: Order ID 6524 ordered online by customer ordClientID 0 - no account yes?
Correct no account. All 3 orders using same email and address details etc, but no account when I search in admin.
It looks like the issue may lie with the way auto-complete adds the order. If they do not have an account assocaiated with the email address entered then it should be entering a 0. Am I correct?
I have also looked at another customer who has never placed an order online. We have entered all 81 orders manually and we have not set up an account as we just use the auto-complete in admin. What it is doing is giving them an ordClientID which is the ordID of their prevoius order we entered.
So it looks like these will always clash at some point.
Regards,
David
|
 |
|
Topic  |
|