Hey guys,
Should be a quick one for you.
In the interest of keeping our order numbers with UC similar in format to our old system, I am reconfiguring how order numbers are configured. This is what I changed in uc_order.module:
<?php
$order->order_id = db_next_id('{uc_orders}_order_id');
?>is now
<?php
$order->order_id = time()."-".rand(100,999);
?>This creates an order number similar to this: 1188941520-578
To accommodate the change I also converted the MEDIUMINT values in the db to Varchar. So, I think that already rules itself out as the issue.
What's happening is when I create a new order (either as admin or a customer) the Order# shows up as everything up until the dash. I've tested to make sure the code isn't funky, and it's not (it's an incredibly small change anyway). So my guess is there is something sanitizing this data before it gets inserted, possibly removing anything beyond a certain length, or looking for non-numeric chars and truncating it.
If you could point me in a better direction than my searching the code is sending me in, I'd be much obliged. Thanks!
Erik







Joined: 08/14/2007