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); ?>
|