Hi all,
have someone idea how to replace this strange long random number reference of order by order_id in e-mails, invoices etc..?
thank you, Jiri

Sorry for wasting this forum with my brainstorm, but maybe someone come upon a solution..
If you have a look here you will see how I make the reference values unique instead of just random. You could use this as a basis for what you want to do by putting your own logic in the function getNewReference() and you will not have to change code anywhere else in OpenCart.
Code: Select all
http://forum.opencart.com/index.php/topic,875.0.html
Thank You Bruce.
I solve it partially by modification of reference string creation, converting unique value to decadic and use 8 left chars. I guess that it is enough for order reference, because i have not heavy traffic in my shop and possibility that two orders got the same reference is very low.
I solve it partially by modification of reference string creation, converting unique value to decadic and use 8 left chars. I guess that it is enough for order reference, because i have not heavy traffic in my shop and possibility that two orders got the same reference is very low.
Code: Select all
$random = hexdec(uniqid ());
$reference = substr((sprintf("%013d",$random)),5,8);
Who is online
Users browsing this forum: No registered users and 2 guests