First if you haven't patched the database apply the following SQL query in the patch/upgrade area of the X-Cart admin:
Code:
ALTER TABLE `xcart_orders` ADD `ip` VARCHAR( 15 ) NOT NULL ;
After the patch is successful...
Next, Edit include/func.php find:
insert:
Code:
db_query("UPDATE $sql_tbl[orders] SET ip='$_SERVER[REMOTE_ADDR]' WHERE orderid = '$orderid'");
Above the first found line of code "return $orderids;".
This should make the mod work on all future versions as well since its not apart of the original insert for orders to avoid future confusion.