| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Order ID Random Incrementation... | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Order ID Random Incrementation...
Here's a good solution which a few people may be interested in. If you don't like the way X-Cart increments your order ID's by 1, eg. If you want customers to think your shop is processing more orders than just a couple since their last order...Here is a solution I threw together just now...it increments the next order ID to be randomly between 8 and 30 orders higher than current order ID, simply change the '8' and the '30' to change the random range in increment.php...:
Create a new file called 'increment.php' in /yourxcartdirhere/include/ containing: Code:
In /yourxcartdirhere/cart.php at line 803 find this: Code:
replace it with this: Code:
NOTE: This has been tested on 4.0.19 ONLY, not sure if it's the same for other versions, can't see why not. |
|||||||
|
#2
|
|||||||
|
|||||||
Re: Order ID Random Incrementation...
Thanks for this nice mod, which also works great in version 4.0.12 !
In my cart.php I found the code that must be replaced at line 709 and it had one extra line, which I didn't replace with the new code. Code:
Thanks again!
__________________
X-Cart 4.0.12 Heavy modified with paid, free and forum mods. PHP 5.2.5 | MYSQL 5.0.51a |
|||||||
#3
|
|||||||
|
|||||||
Re: Order ID Random Incrementation...
In 4.1.x, you need to change:
Code:
To: Code:
Just tested and works like a charm! Many large scale sellers (like Amazon) have completely random order numbers. A lot of backend order management apps. collect web order #'s and also have order id's. Thus, random customer side order numbers don't really affect any legal or business issue. It does certainly make it easier that the orders are at least greater in number though... in XC's backend. - Mike
__________________
4.1.9 |
|||||||
#4
|
|||||||||
|
|||||||||
Re: Order ID Random Incrementation...
works awesome in 4.1.x
just what I was looking for
__________________
rjroffroad.com x-cart 4.1.3 +ez checkout +remember anonymous carts |
|||||||||
#5
|
|||||||
|
|||||||
Re: Order ID Random Incrementation...
I've had my mod return two orders in 1 number increments (eg. 272, 273), not sure what could have caused it to not perform its operation correctly? It has worked normally since, just thought i would mention it, just one of those things i guess.
|
|||||||
#6
|
|||||||
|
|||||||
Re: Order ID Random Incrementation...
I noticed that in situations where the payment was pending or failed. The fixed order uses a subsequent number. But, in unique orders the numbers grow as you set them.
- Mike
__________________
4.1.9 |
|||||||
#7
|
|||||||
|
|||||||
Re: Order ID Random Incrementation...
works great thanks!
__________________
Version 4.1.8 |
|||||||
#8
|
|||||||
|
|||||||
Re: Order ID Random Incrementation...
This mod works great for me in 4.1.3
I had to do a test order to move the counter up one increment, then it started the randomizing on subsequent orders (I guess it had to teach the database where it was...) Very useful mod.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#9
|
|||||||
|
|||||||
Re: Order ID Random Incrementation...
Just what I was looking for! It works great!
Thanks, David
__________________
EXRN, Inc xcart v4.1 [Linux] |
|||||||
#10
|
|||||||||
|
|||||||||
Re: Order ID Random Incrementation...
I read every post in this thread and was wondering how and where to just increase the order ID from my currently xx to xxxx ?
I really don't have the need for autoincrementing between orders, just a simple way of increasing my current number to something higher. The reason for this is that I need a seperate range of order ID's as I'm currently sharing a payment gateway and we need to split our orders into seperate ranges to be able to differentiate between our shops Also I've just tested the script above and I have used the variables 8000 and 8010 but for some reason the change didn't show up on the next order but the second. The second order was incrementet to 8027 ??? Thanks in advance!
__________________
Powered by X-Cart Gold: 4.4.4/4.4.5 |
|||||||||
|
|||
X-Cart forums © 2001-2020
|