dB query to increase order number?

My old shopping cart had a dB query that you could run to increase the order numbers, which then kind of hides the fact that you're a new kid on the block. Does anyone know of such a query for csCart?



Thanks!

Look for “Initial order ID value” on the Settings/General page.

Set it to any number greater than what's there.

[quote name='tbirnseth' timestamp='1319313311' post='124325']

Look for “Initial order ID value” on the Settings/General page.

Set it to any number greater than what's there.

[/quote]



Oh wow - how easy is that? Thank you! I have been using a cart that was much more difficult to work, I have to get used to an intuitive cart.



Thanks for the heads up!

How to create random order numbers instead of #1, #2 etc?

[quote name='mifzal' timestamp='1319736227' post='124681']

How to create random order numbers instead of #1, #2 etc?

[/quote]



I do not think this would be intuitive to the cart - if I understand what you're wanting correctly. You're wanting one order to say, for instance, #1287 and the next to be, for instance, #1294 and the next #1301?



You might root around and find someone that could write a script that would modify how the orders count up and change that, so that maybe each single order increases the number by 'x'.



Maybe if you list why you're doing this they will know a better way to achieve the results you're looking for. ??

[quote name='mifzal' timestamp='1319736227' post='124681']

How to create random order numbers instead of #1, #2 etc?

[/quote]



Why on earth would you want that?

It doesn't really have to be random numbers. I want to increase the number of digits for the order instead of ORDER # 4 or 5 etc. At least if I can add a date & time stamp… I.E. 201110301530. How do we do that?

[quote name='tbirnseth' timestamp='1319313311' post='124325']

Look for “Initial order ID value” on the Settings/General page.

Set it to any number greater than what's there.

[/quote]

See Tonys OP



this is what he means.



john

What is Tonys OP?

[quote]

Look for “Initial order ID value” on the Settings/General page.

Set it to any number greater than what's there.

[/quote]

How do I add date & time stamp… I.E. 201110301530 as the Order ID?

You would have to modify the function fn_place_order() in core/fn.cart.php. If you can't figure this out then you should probably not be making the change.



Note also that with your scheme, anyone placing the 2nd order within the same minute will fail.

Thanks. In that case, I'll leave it as it is. I don't want to take a risk

[quote name='tbirnseth' timestamp='1320087271' post='125010']

You would have to modify the function fn_place_order() in core/fn.cart.php. If you can't figure this out then you should probably not be making the change.



Note also that with your scheme, anyone placing the 2nd order within the same minute will fail.

[/quote]

I would like to know how it can be done.

Search for the string “INSERT INTO ?:orders” and then add to the data the order_id you want to use. I.e. you might need to do a query to find out the last order_id and then bump it by one.



That is how you can do it, but I strongly suggest that you not.

ok i got the point. And thanks

Anyone know how to do this in version 3? I cant see this option in /settings/general

How to get last order Id in any controller or any function or any tpl file…??