| ||||||||||
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 |
#31
|
|||||||
|
|||||||
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.
__________________
X-Cart 4.4.4 Smart Template CDSEO |
|||||||
#32
|
|||||||||
|
|||||||||
Re: Order ID Random Incrementation...
I would love to have something that work for 4.4.3
__________________
4.4.3 X-Cart Gold Sylvain Brouillette Best Quality Printing http://www.bestqualityprinting.com |
|||||||||
#33
|
|||||||||
|
|||||||||
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); ?>
__________________
4.4.3 X-Cart Gold Sylvain Brouillette Best Quality Printing http://www.bestqualityprinting.com |
|||||||||
#34
|
|||||||||
|
|||||||||
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"), '');
__________________
X-Cart Gold 4.4.3 -------------------------------------- |
|||||||||
#35
|
|||||||
|
|||||||
Re: Order ID Random Incrementation...
Anyone know if this works in 4.5?
Thanks
__________________
Xcart 4.4.4 GOLD No addons. |
|||||||
#36
|
|||||||
|
|||||||
Re: Order ID Random Incrementation...
Quote:
Works perfectly in 4.5.4 as contributed by neaisha in post #34 PHP Code:
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#37
|
|||||||||
|
|||||||||
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.
__________________
Xcart V4.5.5 Gold seaCOAST "Live FREE or DIE!" |
|||||||||
#38
|
|||||||||
|
|||||||||
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.
__________________
Xcart V4.5.5 Gold seaCOAST "Live FREE or DIE!" |
|||||||||
#39
|
|||||||||
|
|||||||||
Re: Order ID Random Incrementation...
I am trying to implement this in 4.6.0.
I noticed there are 2 instances of: Code:
in checkout_init.php, second appears to refer to "invoice page (order confirmation page) for amazon order details widget"... should I change it too?
__________________
Version 4.7.6 X-cart Gold |
|||||||||
#40
|
|||||||||
|
|||||||||
Re: Order ID Random Incrementation...
Works in 4.7.6
__________________
Version 4.7.6 X-cart Gold |
|||||||||
|
|||
X-Cart forums © 2001-2020
|