Martin89 Posted January 31, 2012 Share Posted January 31, 2012 I would like to make a change in the script of prestashop. I would like a random Order ID consisting of six digits. How can i fix this? Have somsone a good idea?!! Link to comment Share on other sites More sharing options...
petrovv Posted January 31, 2012 Share Posted January 31, 2012 I think it is not possible because the database used auto increment, that means it automatically adds up. it is possible to start with a high number sql: ALTER TABLE `ps_orders` AUTO_INCREMENT = 1000 Link to comment Share on other sites More sharing options...
petrovv Posted January 31, 2012 Share Posted January 31, 2012 Perhaps this module (free) http://prestashop-module.de/de/features-backend/80-noumerique-bestellungs-und-kundennummer-manager.html Link to comment Share on other sites More sharing options...
richardwalker Posted January 31, 2012 Share Posted January 31, 2012 you can try to generate a random number as "order number" to show to customer, leave the current order id alone not changed. But you will need to change all places that is visible to customer. maybe it is not a best solution, but it is possible. Link to comment Share on other sites More sharing options...
petrovv Posted January 31, 2012 Share Posted January 31, 2012 that's not really recommended. how do you do with the links from email to order history? and what is the benefit of a random number? Link to comment Share on other sites More sharing options...
Martin89 Posted January 31, 2012 Author Share Posted January 31, 2012 No, i really need a random ID consisting of six digits. I need this because there are different people who have access into the Back Office. I dont think it is hard to change. I need to know where in the current script the Order ID + 1 would be add into the database by making a new order... Link to comment Share on other sites More sharing options...
bustin Posted February 7, 2012 Share Posted February 7, 2012 Perhaps this module (free) http://prestashop-mo...er-manager.html this works great, thanks for the info! Link to comment Share on other sites More sharing options...
pablowski Posted April 2, 2012 Share Posted April 2, 2012 No, i really need a random ID consisting of six digits. I need this because there are different people who have access into the Back Office. I dont think it is hard to change. I need to know where in the current script the Order ID + 1 would be add into the database by making a new order... There is a module which can do that: http://addons.prestashop.com/en/administration-tools/4788-Random-Order-Id.html Link to comment Share on other sites More sharing options...
jesusruiz Posted October 18, 2013 Share Posted October 18, 2013 (edited) Good module. Edited October 18, 2013 by jesusruiz (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted October 18, 2013 Share Posted October 18, 2013 hello you can do it easily in order class, in this function public static function generateReference() { return strtoupper(Tools::passwdGen(9, 'NO_NUMERIC')); } 1 Link to comment Share on other sites More sharing options...
Recommended Posts