View Single Post
  #33  
Old 05-18-2011, 09:01 PM
  Sylvain's Avatar 
Sylvain Sylvain is offline
 

Newbie
  
Join Date: Jul 2010
Posts: 9
 

Default 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
Reply With Quote