PrestaShop/PrestaShop — pull request #1383 by PhpMadman (2014-02-10 10:57:14+00:00)
Title: [+] Project : Added option to use Reference Number instead of default Reference

This is for all of us that want to use 000001 instead of SSDQWENRE as order reference.
Taking in the feedback from @LucasC, I added a option to set the reference length, default 6, max 10.

And to make it possible to switch it of, if you only wanted only to test it, the original reference is always created. And if reference number is activated and the order does not have the new reference_num, it will fallback and show the reference instead.

And also, to make it more fallback/retrocomparability, I have choosen NOT to change the reference for payments.

To make it easy to upgrade template/modules to support this, all that is needed, is to change the calls for $order->reference (that does not alter payment reference) to Order::getOrderReference($order->id)