I would like to create custom order ids with alphanumeric data, e.g. CR4004.
I looked through modules/classes/order.php and I can't seem to find how it's setting the order id.
Any suggestions?
I would like to create custom order ids with alphanumeric data, e.g. CR4004.
I looked through modules/classes/order.php and I can't seem to find how it's setting the order id.
Any suggestions?
I've seen a few requests for this in the past. Sadly there is no option in admin to do what you want. As far as I'm aware, there's no contribution available either. I think you might have to make do with the current approach which is to increment the ID by 1 each time. You can always change the ID to start at a higher number, e.g. 60548. This can be done in admin>tools>store manager.
Mods: Admin Activity Report || PO Box Ban || Empty Cart Manager || Autoresponder+ || Zip Validator || Desktop Data || SRiC
please explain the algorithm that you want to use for order ID's, so we may see if it is possible.
I want the order id's to be something like CR999999. Just need to append "CR" to the order id really.
there are 2 ways of going about this., (that I can think of at the moment).
the easier i think would be to modify the code to display the added cr to the id number every where you want the cr to be displayed.
This way you will not have to mess w/ the database.
The other thing to do is to add a customer_number to the customers table on the database, and to have it be a varchar(64) and have your customer creations script do something like $customer_number = 'cr'. $customers_id; that way you dont have to think of messing w/ the auto incrementing that that the database already does for you.
both methods will will require you to change the loging script to match the customer_number w/ the database instead of the email address.
If you just want to add the CR to the order number there is alot easier way to do this, as I have done it to mine, I will dig out the files needed and come up with a short tutorial![]()
Thanks Paddy, that will help a lot of people.
Mods: Admin Activity Report || PO Box Ban || Empty Cart Manager || Autoresponder+ || Zip Validator || Desktop Data || SRiC
OK Dead simple,
In the developers tool kit (admin>tools>Developers tool kit) do a search in the bottom search field for "Order #" then change the text in the files you wish to whatever you want to see in fromt of the order number.
EG. if you want it to read Order # CRXXXX
Just add 'CR' after the hash symbol
i know this is an older post but hope people are watching it.
is this option gone in 1.3.8?
When i search for order # it can not find anything looks like it is only searching the files and not the database for order number....
Its all there.
Here is a even simpler solution:
Just add CR after the 'Order Number: CR'
on following page and lines.
/admin/includes/languages/english/orders.php
Line #152 : define('EMAIL_TEXT_ORDER_NUMBER', 'Order Number:');
/includes/languages/english/account_history.php
Line #28 : define('TEXT_ORDER_NUMBER', 'Order Number: ');
/includes/languages/english/checkout_process.php
Line #54 : define('EMAIL_TEXT_ORDER_NUMBER', 'Order Number:');
Yippieeee!
Downunder QLD