Re: Order ID Random Incrementation...
SeaCoast, I had a problem as well looking for the code in cart.php. I ended up following post #11 from carpeperdiem. It may not jump in increments, but you can at least start with a 3, 4 or 5 digit order number.
|
Re: Order ID Random Incrementation...
I would love to have something that work for 4.4.3
|
Re: Order ID Random Incrementation...
I got to work with 4.4.3 In 4.4.x the code that handles the "order_message" mode processing is located in the "<xcart_dir>/include/checkout_init.php".
On line 511 change: $location[] = array(func_get_langvar_by_name('lbl_order_processe d'), ''); for: include $xcart_dir."/include/increment.php"; $location[] = array(func_get_langvar_by_name("lbl_order_processe d"), ''); And Create a new file called 'increment.php' in /yourxcartdirhere/include/ containing: <?php # # This randomly increments the orderid each time an order is made... # Simply call it once an order has been made; include $xcart_dir."/include/increment.php"; # Uses this idea - db_query("ALTER TABLE xcart_orders AUTO_INCREMENT = xxxxxx"); # $advanceBy = rand(8, 30); $NewNumber = $orderids + $advanceBy; $FD_InsertQuery = "ALTER TABLE xcart_orders AUTO_INCREMENT = $NewNumber"; db_query($FD_InsertQuery); ?> |
Re: Order ID Random Incrementation...
Quote:
$location[] = include $xcart_dir . '/include/increment.php'; array(func_get_langvar_by_name('lbl_order_processe d'), ''); ^works instead of... include $xcart_dir."/include/increment.php"; $location[] = array(func_get_langvar_by_name("lbl_order_processe d"), ''); |
Re: Order ID Random Incrementation...
Anyone know if this works in 4.5?
Thanks |
Re: Order ID Random Incrementation...
Quote:
Works perfectly in 4.5.4 as contributed by neaisha in post #34 PHP Code:
|
Re: Order ID Random Incrementation...
Tried this in v4.5.5 and it's not working. No errors, but it's still not working. I cleared the cache and tried 6 test orders. No change. :(
|
Re: Order ID Random Incrementation...
If anyone is interested...
The above code DOES work! Apparently, I needed to complete an order for it to start taking effect. Just thought I'd give an update. ;) |
Re: Order ID Random Incrementation...
I am trying to implement this in 4.6.0.
I noticed there are 2 instances of: Code:
$location[] = array(func_get_langvar_by_name('lbl_order_processed'), ''); in checkout_init.php, second appears to refer to "invoice page (order confirmation page) for amazon order details widget"... should I change it too? |
Re: Order ID Random Incrementation...
Works in 4.7.6 :-)
|
All times are GMT -8. The time now is 05:41 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.