The orderNumbers are increasing (+1) with every added order. When the New Year comes, nothing changes and the new order has the number (e.g.) 366. If you want keep some regularity in your cart, just allow the system to give the orderNumbers with 'encoded' year (e.g.: 20110365). The first order in year 2012 will get the number: 20120001. The next orders will be increased (+1 = 20120002,... and so on). The solution: /core/orders.php function addOrder under the line: $aForm['iOrder']=$oFF->throwLastId(DB_ORDERS,'iOrder')+1; add: $iNewYear=date('Y'); $iOldYear=substr($aForm['iOrder'],0,4); if($iNewYear!=$iOldYear) $aForm['iOrder']=(int)$iNewYear.'0001';
So, at every first order in new year, the first 4 digits will adjust to the year and the four last digits will start with: 0001.
Some handwork you will need. The easiest way: open four files from /db/ orders.php, orders_comments.php, orders_products.php & orders_status.php Except orders_products.php all other files have the order ID in the first column (the first value in every line). In orders_products it is the second line. Now change the values as you wish. But be carefull - in orders_status & order_products the order ID can be multiple. You have to change them all. After you're ready, the next order will come with the ID = 20120023 + 1