Post by Havlock » Wed May 18, 2011 10:17 am

traceofwind wrote:MySql can not auto increment more than 1. There are other databases that allow 'sequences', but in this case MySql can not provide you with a simple solution.

If you are really, really conscientious... each week go and create x orders with your own account (use cash on delivery, so you don't pay with credit card) and then cancel them. That will bump up your order ID -without any code changes! ;)

That is basically exactly what we are having to do now. Each time an order is placed we then go an create a few dummy orders so that the order number will be increased. This is just in case the same customer comes back to place another order before someone else does, we do not want the customer to get a sequential order number that is +1 from his last order, ever.

So, as I am understanding, I guess OC is using an auto-incremented field in the database instead of generating the number with the code. That understanding does help to identify why this might be a pain to get the order number to increment.

Kind of a real drag as I am sure other shops that do not do a lot of business with a variety of customers, but deal with few customers notice the same thing (such as the original poster here).
Last edited by Havlock on Wed May 18, 2011 10:20 am, edited 2 times in total.

New member

Posts

Joined
Sun Oct 24, 2010 8:39 am

Post by traceofwind » Wed May 18, 2011 10:18 am

fabioDexus wrote:i don't know if mysql can be set to change the auto increment to anything but one but if does the documentation should cover it
No, it can't.

New member

Posts

Joined
Fri Jul 02, 2010 6:37 am

Post by traceofwind » Wed May 18, 2011 10:27 am

Havlock wrote:So, as I am understanding, I guess OC is using an auto-incremented field in the database instead of generating the number with the code.
Yes.
Havlock wrote:Kind of a real drag as I am sure other shops that do not do a lot of business, but deal with few customers notice the same thing (such as the original poster here).
If it is a drag then ask someone to create a CRON Job for you that will run once a week, automatically adding xx records to your [order] table thus increasing the order_ID.
Havlock wrote:I am sure other shops that do not do a lot of business, but deal with few customers notice the same thing (such as the original poster here).
Actually I completely understand your point of view, but to be honest what other shops can do pails in comparison to what they can't do that OpenCart does. It would be great if the Order ID could be (1) sequenced and (2) prefixed but both of those points need to be made as a feature request, not as a user request.

New member

Posts

Joined
Fri Jul 02, 2010 6:37 am

Post by Havlock » Wed May 18, 2011 10:32 am

traceofwind wrote:
EDIT: I am sure a MySql/CRON expert could make you an automated script to do that for you... which would be: add xx blank records to [order] table and then delete them (or not, whatever). Manual or automated, either way you are still pumping out genuine order codes without masks and prefixes without algorithms and code implementations. And when sales volume increases, you can stop propping up the order_ID.
Thanks, we are on the same wavelength and I was just thinking the same thing of sorts. Now that I know what's actually happening, approaching a solution will be easier to address. I did not realize that MySql was doing the incrementation, I assumed that was in the code somewhere.

I am sure other small companies must run into this same issue so I will look around some more. For a small company with few customers that shop often this would become a potential issue. You never want to let your customer think that they are the only one buying from your shop and that is exactly what this issue potentially does.

Chances are we might have to approach it differently than a weekly cron job as we would need to have the task performed after each order is actually processed. A set schedule for a cron job would still leave giant holes in the system for the problem to occur should the same customer come back again before the cron is run.

Thanks again for the tip traceofwind and the information as to how it is working.

Otherwise, OpenCart is still in my view one of the greatest pieces of software ever developed and super major kudos to the developers!
Joey

New member

Posts

Joined
Sun Oct 24, 2010 8:39 am

Post by Havlock » Wed May 18, 2011 10:38 am

traceofwind wrote:Actually I completely understand your point of view, but to be honest what other shops can do pails in comparison to what they can't do that OpenCart does. It would be great if the Order ID could be (1) sequenced and (2) prefixed but both of those points need to be made as a feature request, not as a user request.
I completely agree, OC is hands down the greatest shop software we have found or experienced, and we really have looked around a LOT.

We will certainly keep it in mind to suggest it as a feature request for the future, it would be a great feature I think for startup shops or shops with low numbers of customers but potentially lots of orders.

Thanks again
Joey

New member

Posts

Joined
Sun Oct 24, 2010 8:39 am

Post by Qphoria » Wed May 18, 2011 11:32 am

Havlock wrote:Qphoria,

I dont think you are understanding our need, but I could be wrong.

If a customer of mine places an order today that is order number 101 and then comes back and places another order in 5 days and gets order number 102 (because there have been no other orders), then it may look to my customer that I am not doing a lot of business, which might be true, but I do not want my customer to know that.
Of course I understand. But that is my point. You seem to think the customers gives a rats ass about your business and order count. They don't. Even still, in a normal business flow without worrying about order id's, it is normal for people to get to the confirmation page and change their mind, or continue shopping, or have an typo in their credit card, or any other number of causes to reload that page, causing "temp" order ids to generate. So it is highly unlikely you will even see sequential order ids. mysql doesn't support autoincrementing by customizable steps. But as I said you could add some junk at the front or end

QBX25-15250155525-6
F3G32-15262213552-1
JXY88-15272562644-4
Real Order Id
Random crap

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Havlock » Thu May 19, 2011 4:00 am

Qphoria wrote:Of course I understand. But that is my point. You seem to think the customers gives a rats ass about your business and order count. They don't. Even still, in a normal business flow without worrying about order id's, it is normal for people to get to the confirmation page and change their mind, or continue shopping, or have an typo in their credit card, or any other number of causes to reload that page, causing "temp" order ids to generate. So it is highly unlikely you will even see sequential order ids. mysql doesn't support autoincrementing by customizable steps. But as I said you could add some junk at the front or end
Thanks for the tip again Qphoria. The whole reason this was brought up to begin with was because we had a customer actually bring it to our attention that they had ordered 3 different times over 2 weeks and had received the sequential order numbers and started asking if anyone else was shopping our shop. We have not experienced much of the scenarios you describe such as hitting the confirm page and then not checking out, but in our testing we have seen the order numbers jump as you describe.

At this time we are operating about a dozen shops using OC for various artists, which again tends to seek out repeat customers as opposed to large mailing lists of them. The customers tend to come back to the shops regularly and at this stage of the game we are continuing to just process a few dummy orders after each real order so that the order number is jumped. This unto itself is not a huge ordeal to add as part of our processing, but I was just hoping there was an easy solution. It's not necessarily that we are trying to hide anything, it's just one of those things we would rather not have any attention paid to it. With the possibility of sequential order id numbers, it leaves a possible question mark.

I am not sure off hand how I would approach the filler characters you are speaking of as again I think it would still be something noticeable if even in the middle of it there was a consecutive number from order to order. Plus, I want to make sure whatever we do is easy to move or copy to any new upgrades to the software itself.

Since this order number is sent immediately to the customer in the order confirmation, I assume it would be something in the code that generates the email sent to the buyer.

Probably the direction we will look at the most is setting up something that will automatically create a few dummy orders after each real order is placed. Kind of like a cron job, but scheduled/setup to happen after each real order as opposed to a set daily or weekly schedule.

It may not seem like a big deal to most, but in our scenarios and shops it is definitely something that customers have noticed and as well we have noticed and is one of those things that we would just rather not have to even think about in our big picture.

Thanks
Joey

New member

Posts

Joined
Sun Oct 24, 2010 8:39 am

Post by Qphoria » Thu May 19, 2011 4:19 am

well dont let one over-observant customer ruin your life. Tell him to go get spend his time observing a life ;)

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Havlock » Thu May 19, 2011 4:55 am

Qphoria wrote:well dont let one over-observant customer ruin your life. Tell him to go get spend his time observing a life ;)
:) I will pass on the message. In the meantime, I think we will still try to figure out a solution to eliminate the possibility of it becoming more. Definitely not life ruining, but certainly something that is now noticed and desired to not be.
Thanks
Joey

New member

Posts

Joined
Sun Oct 24, 2010 8:39 am

Post by forvirrad » Sat May 21, 2011 3:51 am

I want to change the orderid as follows-
today it is 2011-05-20 and i want order ids to be
20110520001
20110520002
20110520003....
and tomorrow
20110521001
20110521002
20110521003
and so on,

is this possible?

Newbie

Posts

Joined
Tue Apr 27, 2010 5:16 pm

Post by traceofwind » Sat May 21, 2011 5:05 am

forvirrad wrote:I want to change the orderid as follows-
today it is 2011-05-20 and i want order ids to be
20110520001
20110520002
20110520003....
and tomorrow
20110521001
20110521002
20110521003
and so on,

is this possible?
You could code the date as YYYYMMDD in front of the customer's order ID, giving the illusion of the above; to do so you would have to alter the customer email receipt and order history / invoices pages. The Order ID would still be stored and incremented from 000x, and so on. As has been mentioned above, changing the Order ID schema and sequencing is a very big undertaking -and one that (so far) no one has wanted to undertake.

New member

Posts

Joined
Fri Jul 02, 2010 6:37 am

Post by DannyMacD » Tue Oct 23, 2012 3:21 am

Qphoria wrote:
But as I said you could add some junk at the front or end

QBX25-15250155525-6
F3G32-15262213552-1
JXY88-15272562644-4
Real Order Id
Random crap

Hi Q,

just to ask, is it simple to make something like this? would you be able to point me in the right direction?

thank you.

Active Member

Posts

Joined
Fri Jun 26, 2009 6:39 am
Who is online

Users browsing this forum: No registered users and 65 guests