Daresh 297 Report post Posted December 29, 2015 (edited) Many shop owners don't like the default random string order reference, but changing it to order ID reveals the number of orders to customers. This module changes the order reference tu numeric and let's you choose between a random number and order ID, you can also add custom prefix and choose to have leading zeros. Module works for Prestashop 1.5, 1.6, 1.7 I am sharing this module for free on my most common improvements subscription list on http://greenmousestudio.com/ or below. gmnumeric.zip Update 16.08.2016 gmnumeric_v_1_2_0.zip A few notes in case this module does not work for you and you need to uninstall it: - this module overrides generateReference() function from the Order class, sometimes (I don't know why) Prestashop leaves the overriden files after uninstall, so check the "overrides/classes/Order.php" and remove the generateReference() function or delete the whole file if there is nothing else in it. Edited February 3, 2017 by Daresh 11 1 arroyman, Travandi, alex.glebov and 9 others reacted to this Share this post Link to post Share on other sites
Anton_bcn 15 Report post Posted January 11, 2016 Thank you! Its very useful when some one call and pronunciation the numbers not those weird characters =) 1 Daresh reacted to this Share this post Link to post Share on other sites
leludo54 7 Report post Posted January 21, 2016 Bonjour Merci pour ce module qui fonctionne très bien 1 Daresh reacted to this Share this post Link to post Share on other sites
2BC 3 Report post Posted February 26, 2016 Daresh - maybe you can help me. After instalation we can choose random number or ID of the order...But nothing happens... As you can see on the attached screenshot: 1671 - order without your module 1672 - order without your module 1673 - order with your module. Random number 1673 - order with your module. ID of the order... Presta 1.6.1.4. Share this post Link to post Share on other sites
Daresh 297 Report post Posted February 26, 2016 Maybe you have overrides turned off in your shop? (Advanced -> Performance) 2 alex.glebov and 2BC reacted to this Share this post Link to post Share on other sites
2BC 3 Report post Posted February 26, 2016 Yea. That's it. Thank you very much. Everything works great. Share this post Link to post Share on other sites
nvpl 1 Report post Posted February 27, 2016 (edited) thank you very much. it would be great if you could add some possibilities like in another module (with that some people have problems) in the other module you can set ... http://www.bilder-upload.eu/show.php?file=052209-1456595961.jpg for example that allow to change from 000000008 -> 8 or 0008 or you can make ory8 Edited February 27, 2016 by nvpl Share this post Link to post Share on other sites
Daresh 297 Report post Posted February 27, 2016 Thanks for your suggestion, which of these settings would be most important for you? Share this post Link to post Share on other sites
nvpl 1 Report post Posted February 27, 2016 for me it would be enough to erase the zeros and can add a word or something before the order number Share this post Link to post Share on other sites
Daresh 297 Report post Posted February 28, 2016 Thank you for your suggestions, as I really want to keep my modules clean and simple. I have updated the module with the prefix and trailing zeros options. Please test and let me know if that's what you wanted. Share this post Link to post Share on other sites
nvpl 1 Report post Posted February 28, 2016 (edited) brilliant, thank you very much, that works great and no problems with the mails to admin like in the other module. Vekia, add that to the free modules if Daresh allow :-) dzięki it works at 1.6.1.2 at 1.6.1.4 it makes changes but there are only changes in "losowe numery" or "order ID" I choosed order ID and without zeros and add a prefix but it show 000000412 at the other webshop with 1.6.1.2 everything is working fine OK, I've reinstalled that module Now at both shops everything is great :-) thanks once again Edited February 28, 2016 by nvpl 1 Daresh reacted to this Share this post Link to post Share on other sites
Travandi 2 Report post Posted March 2, 2016 Thank you alot for this, it was so annoying to have customers spell that random letters. 1 Daresh reacted to this Share this post Link to post Share on other sites
MarioCM 14 Report post Posted March 2, 2016 Works fine on 1.6.0.9 Thanks!!! 1 Daresh reacted to this Share this post Link to post Share on other sites
sebik_1978 0 Report post Posted March 19, 2016 Thanks, works great! Very useful module Share this post Link to post Share on other sites
Daresh 297 Report post Posted April 17, 2016 A small update - there was a spelling error, the module adds "leading" not "trailing" zeros. No changes in functionality. Share this post Link to post Share on other sites
MacRoy 182 Report post Posted April 17, 2016 Hi Daresh! Thanks a lot very useful. Regards MacRoy Share this post Link to post Share on other sites
MacRoy 182 Report post Posted April 17, 2016 Hi Daresh! I got this error after installation of you`re module on Prestashop 1.6.1.5 /* * module: gmnumeric * date: 2016-04-17 22:29:28 * version: 1.1.0 */ public static function generateReference() { $isRandom = Configuration::get('GMNUMERIC_RANDOM'); $prefix = Configuration::get('GMNUMERIC_PREFIX'); if ($isRandom) { $reference = Tools::passwdGen(9, 'NUMERIC'); } else { $query = 'SELECT `AUTO_INCREMENT` FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = \''._DB_NAME_.'\' AND TABLE_NAME = \''._DB_PREFIX_.'orders\''; $nextOrderId = (int) Db::getInstance()->getValue($query); $zeros = Configuration::get('GMNUMERIC_ZEROS'); if ($zeros == 'on') { $reference = sprintf('%09d', $nextOrderId); } else { $reference = $nextOrderId; } } return $prefix.$reference; } And it`s impossible to add a product to the cart. Do you have a fix for that? Regards MacRoy Share this post Link to post Share on other sites
Daresh 297 Report post Posted April 18, 2016 Let me check it on 1.6.1.5... Share this post Link to post Share on other sites
Daresh 297 Report post Posted April 18, 2016 Just tested on 1.6.1.5 and everything worked fine. I also see that in 1.6.1.5 there was no change in the original function from the Order class, that this module overrides. Maybe you already have some overrides for the Order class? Share this post Link to post Share on other sites
MacRoy 182 Report post Posted April 18, 2016 (edited) Hi Daesh! One important thing that I have not wrote in my previous post was that, after I changed to custom ID instead of random numbers. Then came this error up.Do you hav any tip for this? I use One Page Checkout PrestaShop v2.1.6 but it is impossible to place a order now after that change! I have even tried to disabled module and even uninstalled it, but the error message still visible all the time and as I said I can not place an order. I have naturally emptied the cache and forced compilation without results! Here is the error message from the cart: Impossible to add the product to the cart. textStatus: 'parsererror' errorThrown: 'SyntaxError: JSON Parse error: Unrecognized token '/'' responseText: /* * module: gmnumeric * date: 2016-04-17 22:29:28 * version: 1.1.0 */ public static function generateReference() { $isRandom = Configuration::get('GMNUMERIC_RANDOM'); $prefix = Configuration::get('GMNUMERIC_PREFIX'); if ($isRandom) { $reference = Tools::passwdGen(9, 'NUMERIC'); } else { $query = 'SELECT `AUTO_INCREMENT` FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = \''._DB_NAME_.'\' AND TABLE_NAME = \''._DB_PREFIX_.'orders\''; $nextOrderId = (int) Db::getInstance()->getValue($query); $zeros = Configuration::get('GMNUMERIC_ZEROS'); if ($zeros == 'on') { $reference = sprintf('%09d', $nextOrderId); } else { $reference = $nextOrderId; } } return $prefix.$reference; } {"products":[{"id":3,"link":"http:\/\/www.test.se\/casual-dresses\/3-moenstrad-kjol-7300000365455.html#\/storlek-s\/farg-orange","quantity":1,"image":"https:\/\/www.test.se\/8-home_default\/moenstrad-kjol.jpg","image_cart":"https:\/\/www.test.se\/8-cart_default\/moenstrad-kjol.jpg","priceByLine":"249 Kronor","name":"M\u00f6nstrad kjol","price":"249 Kronor","price_float":199,"idCombination":13,"idAddressDelivery":0,"is_gift":false,"hasAttributes":true,"attributes":"S, Orange","hasCustomizedDatas":false,"customizedDatas":[]}],"discounts":[],"shippingCost":"29 Kronor","shippingCostFloat":29,"taxCost":"56 Kronor","wrappingCost":"0 Kronor","nbTotalProducts":1,"total":"278 Kronor","productTotal":"249 Kronor","freeShipping":"251 Kronor","freeShippingFloat":251,"free_ship":false,"isVirtualCart":0,"hasError":false,"crossSelling":false} What should I do to fix this? Regards MacRoy Edited April 18, 2016 by MacRoy Share this post Link to post Share on other sites
Daresh 297 Report post Posted April 18, 2016 Maybe that override was not removed properly when you deleted the module. Check in override/classes/order/Order.php for generateReference() function. 1 MacRoy reacted to this Share this post Link to post Share on other sites
MacRoy 182 Report post Posted April 18, 2016 Hi Daesh! You are quite right, it was still there. Now I removed it and now it works again. Thanks for the tip! Best regards MacRoy Share this post Link to post Share on other sites
Daresh 297 Report post Posted April 18, 2016 This may be something related to the database, I am getting the autoincrement value for the order table, this query may not work on every server, but the weird thing is that your shop didn't remove the override when you uninstalled the module. Share this post Link to post Share on other sites
jrmarins 0 Report post Posted May 12, 2016 Hi. With this module I could change the order ID? I have two stores and both wear a slip module of the same bank, the problem is that when it coincides two applications with the same number using slip, error. The search docket ID and I need to put a prefix numerido this ID to not match. Today looks like this: in 1410 the two stores. I need you to stay in one of the shops like this: 90001410 Share this post Link to post Share on other sites
Daresh 297 Report post Posted May 12, 2016 No, this module does not change order ID, it changes order reference, order ID is a integer number, so it would be much better to operate on order reference with your bank slips, rather than order IDs. Share this post Link to post Share on other sites
jrmarins 0 Report post Posted May 12, 2016 Ok, thanks for the reply. I would like to develop a module to enter this prefix in order ID? What would be the value to it? You can send n'e-mail: junior@kitsunestudio.com.br Thank you. Share this post Link to post Share on other sites
Daresh 297 Report post Posted May 12, 2016 The solution to your problem would not be a module, but a change in the orders table structure, so that autoincrement value is 90000000. Share this post Link to post Share on other sites
jrmarins 0 Report post Posted May 12, 2016 The solution to your problem would not be a module, but a change in the orders table structure, so that autoincrement value is 90000000. Thanks for the answer. But I think if I change the auto_increment ps_orders the table to 9000000 will not have future problems? Today my last ID is 1414 to 9000000 can change? ALTER TABLE 'ps_orders' AUTO_INCREMENT = 9000000; Share this post Link to post Share on other sites
Daresh 297 Report post Posted May 12, 2016 Of course it will cause problems, but only after 999999 orders, so you can add one more zero to make it nearly 10 million orders, if think this is quite a large number Share this post Link to post Share on other sites
jrmarins 0 Report post Posted May 13, 2016 Thanks a lot for the help. Share this post Link to post Share on other sites
jpugliese 0 Report post Posted June 30, 2016 Hi Dev. Thanks for share this awesome module with us. I noticed that at the install process of module, the size of field "reference" in the table "orders" is changed to 32 characters. Notwithstanding, a change to the field "reference" in the table "payment_order" is needed to reflect the same size. Can you adjust this in the next versions? Share this post Link to post Share on other sites
Daresh 297 Report post Posted June 30, 2016 Thank you for your notice, I will adjust. Share this post Link to post Share on other sites
Sasni 1 Report post Posted July 8, 2016 Hi, module works fine, but when i use DotPay (official Polish payment module) it shows me Order ID like in the photo: eg. #2 And random number is in parentheses. Do you now how to hide ID in this place? Share this post Link to post Share on other sites
Daresh 297 Report post Posted July 8, 2016 You would need to find a code in the DotPay module that passes this data to DotPay. It looks like it passes order Id and reference, we want it only to by the reference. Share this post Link to post Share on other sites
Ellendereth 0 Report post Posted July 12, 2016 Hello there, a while ago I installed your module and it works perfectly for PS1.6.1.5. But I have this little issue, is it possible to change the number of leading zeros?We are using MoneyS3 and it has order ID restricted to 10 characters. Your module adds 8 zeros. The format of my order ID must be XXXXX0001 - XXXXX9999. I dont want to mess with your code but can you tell me where it can be changed? Thank you very much Jan Vykoupil Share this post Link to post Share on other sites
Daresh 297 Report post Posted July 12, 2016 In your shop's override/classes/Order/Order.php in function generateReference() there is sprintf('%09d', $nextOrderId); it makes the order reference 9 characters long, so you can mess with it, you have preview in the module. 1 Ellendereth reacted to this Share this post Link to post Share on other sites
TTY35 1 Report post Posted August 10, 2016 Hi Daresh, Thank you very much for great module ! I installed it and it seems to work. New order doesn't have random numer like LLIRFVSPN, but has number 8. I would like to start this autoincrement order number not from 0 or low value as it is now, but from for example 123. Could you please write is it possible and what and where I should change ? Thank you in advance! Share this post Link to post Share on other sites
Daresh 297 Report post Posted August 10, 2016 Thanks! You should check in your database, in the ps_orders table properties, for the current auto increment value, and make it a larger number. Share this post Link to post Share on other sites
TTY35 1 Report post Posted August 15, 2016 (edited) Dzięki za info. Szukałem i niestety we właściwościach tabeli ps_orders nie znalazłem wartości, która jest używana jako aktualna dla numeru zamówienia. Próbowałem dla wiersza id_order wyłączyć zaznaczenie przy opcji Auto_Increment oraz zmienić wartość w polu Default z None na "As defined" z wpisanym numerem, ale nie działa, a nawet nie chce się zapisać Czy mógłbyś zrobić jakiegoś screena i zaznaczyć gdzie dokładnie mam zmienić? Z góry dziękuję Edited August 15, 2016 by TTY35 Share this post Link to post Share on other sites
Daresh 297 Report post Posted August 15, 2016 English forum ;-) Share this post Link to post Share on other sites
TTY35 1 Report post Posted August 18, 2016 Sorry, I missed info that this thread is part of English forum It works as should, thank you very much. 1 Daresh reacted to this Share this post Link to post Share on other sites
chulien 1 Report post Posted August 25, 2016 This works very good! I just install it as usual and its already ready to go! very easy to install and works pretty fine! 1 Daresh reacted to this Share this post Link to post Share on other sites
arroyman 0 Report post Posted September 22, 2016 Could be very interesting if you can add the reference nbr option also. For use is very important that nbr. But work marvelous. Thanks a lot Share this post Link to post Share on other sites
Daresh 297 Report post Posted September 22, 2016 Could be very interesting if you can add the reference nbr option also. For use is very important that nbr. But work marvelous. Thanks a lot I'm happy that it works for you, but not sure what do you mean by "reference nbr"... Some example? Share this post Link to post Share on other sites
grz3chu 0 Report post Posted October 1, 2016 (edited) Hi, How do I install it? I couldn't find any manual in a zip file. Thanks Ps: Ok, I just installed it like any other module and it works fine!!! Edited October 1, 2016 by grz3chu Share this post Link to post Share on other sites
SEID 0 Report post Posted October 10, 2016 Hello, I tried your module on Prestashop version 1.6.1.7 I chose reference format: Order ID And each order is 15 ... Without prefix 0000015 With prefix OR0000015 without leading zero 15 I tried about 20 orders with different combinations, but it is still only reference 15 Please help me Share this post Link to post Share on other sites
Daresh 297 Report post Posted October 10, 2016 You mean the preview panel in the module? 1 SEID reacted to this Share this post Link to post Share on other sites
SEID 0 Report post Posted October 10, 2016 (edited) yes in preview panel in the mode but also in order mail and in orders (admin interface) //edit Now that I have turned on your module I can not complete the order. When your module is deactivated, the order will take place as well. HTTP ERROR 500: http://asfksdnfjskdnf.sk/index.php?fc=module&module=bankwire&controller=validation Edited October 10, 2016 by SEID Share this post Link to post Share on other sites
Daresh 297 Report post Posted October 10, 2016 Maybe you have something else installed there that is causing some conflict. 1 SEID reacted to this Share this post Link to post Share on other sites
SEID 0 Report post Posted October 10, 2016 about payments I do not installed any module. anyway thanks Share this post Link to post Share on other sites
Daresh 297 Report post Posted November 5, 2016 Please use english on english forum, for polish go here: https://www.prestashop.com/forums/topic/509738-darmowy-modu%C5%82-numeryczny-indeks-zam%C3%B3wienia/ Share this post Link to post Share on other sites
leludo54 7 Report post Posted January 3, 2017 (edited) Bonjour Google translate - Prestashop 1.6.1.10 ***************************** I removed version 1.0.0 and installed version 1.2.0.2 of the module and it no longer works what should I do ? thank you **************************** J'ai supprimé la version 1.0.0 et j'ai installé la version 1.2.0.2 du module et cela ne fonctionne plus que dois-je faire ? merci I removed version 1.0.0 and installed version 1.2.0.2 of the module and it no longer works what should I do ? thank you Edited January 3, 2017 by leludo54 Share this post Link to post Share on other sites
Daresh 297 Report post Posted January 3, 2017 Maybe the uninstall was not completely successfull, it sometimes happens, the module is uninstalled but override files are still there, try to uninstall the module once again and also delete Order.php from your overrides/classes folder, and then reinstall the module. Share this post Link to post Share on other sites
leludo54 7 Report post Posted January 4, 2017 Hello I uninstalled the module and I deleted the file order.php I made a new installation of the module but I still have text and not numbers! Would you have a solution? Merci Share this post Link to post Share on other sites
Daresh 297 Report post Posted January 4, 2017 Hard to tell, it works fine on my 1.6.1.10 version. You have disable all overrides set to NO? Share this post Link to post Share on other sites
leludo54 7 Report post Posted January 4, 2017 Good evening By setting "no" on override, it works. Thank you Good evening By setting "over" on override, it works. Thank you Share this post Link to post Share on other sites
Daresh 297 Report post Posted February 3, 2017 Just checked and this module works fine for Prestashop 1.7. Share this post Link to post Share on other sites
polosat 75 Report post Posted March 7, 2017 Very good module, many thanks! Share this post Link to post Share on other sites
Chlolie 1 Report post Posted March 30, 2017 thank you ! Share this post Link to post Share on other sites
DRMasterChief 7 Report post Posted August 8, 2017 Dear Daresh, i am testing the Module, which seems to be very perfect for me Maybe you can give me an short idea, if i can change the order number to 5 or 6 digits only (e.g. 12345) ? The thing is, that we will use "JTL Wawi" to overtake the orders and we have to go on with the order numbers from our present shop. thank you Share this post Link to post Share on other sites
Daresh 297 Report post Posted August 8, 2017 Set the order reference to order ID, and the autoincrement value for the order ID in the database orders table to 10000, and you should have 5 digits for some time... Share this post Link to post Share on other sites
DRMasterChief 7 Report post Posted August 8, 2017 (edited) Hello, thank you for fast reply. I have the table _orders id_order int(11) UNSIGNED Nein auto_increment but where to set the autoincrement? If i set standard for this, the shop only shows "order number" 3 (as it is the 3rd order in the new shop, this is shown correct). Also ID is 3. But i did not get the 15xxx as order number. Edited August 8, 2017 by DRMasterChief Share this post Link to post Share on other sites
Daresh 297 Report post Posted August 8, 2017 In the table Operations tab (if you're using phpmyadmin) Share this post Link to post Share on other sites
DRMasterChief 7 Report post Posted August 8, 2017 (edited) Sorry, i think it was defined wrong by me. We will use the "random numbers", but not a number below 15000 (but i think this is not possible easily??) AND this random number should only have 5 or 6 digits. >> so we have to limit the order number to 5 or 6 digits, but how? then we can use the random function from your module. thank you Edited August 8, 2017 by DRMasterChief Share this post Link to post Share on other sites
Daresh 297 Report post Posted August 8, 2017 In the override/classes/Order.php of your shop change the "9" to the length you want the reference to be: $restLength = 9 - $prefixLength; 1 DRMasterChief reacted to this Share this post Link to post Share on other sites
DRMasterChief 7 Report post Posted August 8, 2017 Yee-haw ! This works, great and thanks a lot. (have not done anything with overrides yet) 1 Daresh reacted to this Share this post Link to post Share on other sites
veltors 3 Report post Posted August 9, 2017 It works great 1.6.16 thank you soo much. It is more easy to notice for customers an us. Share this post Link to post Share on other sites
dpdp 4 Report post Posted August 17, 2017 I'm sorry, but this module don't working on my 1.7.2.1 Prestashop Modul installed, settings is working but in preview generated non numeric order number, but order reference. What I did wrong? Share this post Link to post Share on other sites
Daresh 297 Report post Posted August 18, 2017 Maybe you have overrides turned off? Share this post Link to post Share on other sites
dpdp 4 Report post Posted August 18, 2017 Yes, it Working! Thank You! 1 Daresh reacted to this Share this post Link to post Share on other sites
Ferenc 0 Report post Posted October 23, 2017 Thanks for the great module, working fine in Prestashop 1.6.1.17. One remark only: the config.xml still contains version info 1.1.0, I have changed my copy to 1.2.0 to show the correct info in the modules section of my shop Share this post Link to post Share on other sites
janiversen 1 Report post Posted November 8, 2017 It works with 1.7.2.4 But how do I change the starting/next number? Now it starts with 000001 but is it possible to change something so it will start with no. 21400? Share this post Link to post Share on other sites
sunnydesigner 6 Report post Posted December 24, 2017 Hi, @Daresh, thanks for your great work, is the module compatible with Prestashop 1.7 properly ? Best regards. Share this post Link to post Share on other sites
Daresh 297 Report post Posted December 26, 2017 Yes, it should work. Share this post Link to post Share on other sites
Euronymous 0 Report post Posted February 5, 2018 Hello Daresh, module installed, but when did testinf order on my site (shipping method Geis, payment method COD) -> then i get ERROR 500. See the files below, thank you for your answer. Thats module is great and i would like to use it. Petr. Share this post Link to post Share on other sites
Daresh 297 Report post Posted February 5, 2018 It seems to be unrelated, cause looking at the reference number, the module's override is not active, reference is still a random character string. Share this post Link to post Share on other sites
Euronymous 0 Report post Posted February 5, 2018 When i swicht off your module, then everything works fine. Share this post Link to post Share on other sites
Daresh 297 Report post Posted February 5, 2018 Hard to tell without analysing it totally, maybe some conflict with other overrides. In this situation I would try to add the override manually in the Order class. Share this post Link to post Share on other sites
Euronymous 0 Report post Posted February 5, 2018 Thank you. But i dont know where and how do override. Thank for your help. I try another way how to change ID of orders. Share this post Link to post Share on other sites
dpdp 4 Report post Posted March 12, 2018 Thank you, Daresh, for this module! You'll be update module for PS 1.7.3? Share this post Link to post Share on other sites
DRMasterChief 7 Report post Posted March 12, 2018 (edited) Hello, it´s me again I am wondering if i can realize the following count up with this module in combination with the Prestashop possibilities: We need order numbers like this (just an example): 13460x 13461x 13462x plus one attached check-digit at the end (this means the x). So finally it should looks like this e.g.: 134602 134618 134624 the check-digit has not to be any mathematical plausibility, it can be any number in random arrangement. Or: it can also be to count up the second last digit with this module in random and add one increasing digit at the last? Is this possible in any way ?? thank you, Edited March 12, 2018 by DRMasterChief Share this post Link to post Share on other sites
Daresh 297 Report post Posted March 12, 2018 Sure is, just modify the return in the override: return $prefix.$reference.rand(0,9); Share this post Link to post Share on other sites
DRMasterChief 7 Report post Posted March 12, 2018 (edited) Great to hear that this should be possible and thank you for this fast reply. But.... uhh i am not that expert and did not know what to do with your code I can´t find this code in your module. Edited March 12, 2018 by DRMasterChief Share this post Link to post Share on other sites
Daresh 297 Report post Posted March 13, 2018 Send me a message and I will guide you. 1 DRMasterChief reacted to this Share this post Link to post Share on other sites
DRMasterChief 7 Report post Posted March 21, 2018 solved - a big thank you for your help ! ! Share this post Link to post Share on other sites
Artur 0 Report post Posted March 30, 2018 I uploaded the .zip, but the module does not show up. Which word should i use in der search bar? im a Presatshop 1.6.1.17 user Share this post Link to post Share on other sites
sunnydesigner 6 Report post Posted April 1, 2018 On 2015/12/29 at 5:46 PM, Daresh said: Many shop owners don't like the default random string order reference, but changing it to order ID reveals the number of orders to customers. This module changes the order reference tu numeric and let's you choose between a random number and order ID, you can also add custom prefix and choose to have leading zeros. Module works for Prestashop 1.5, 1.6, 1.7 I am sharing this module for free on my most common improvements subscription list on http://greenmousestudio.com/ or below. gmnumeric.zip Update 16.08.2016 gmnumeric_v_1_2_0.zip A few notes in case this module does not work for you and you need to uninstall it: - this module overrides generateReference() function from the Order class, sometimes (I don't know why) Prestashop leaves the overriden files after uninstall, so check the "overrides/classes/Order.php" and remove the generateReference() function or delete the whole file if there is nothing else in it. Thanks for your great module. 1 Daresh reacted to this Share this post Link to post Share on other sites
ajensen27 42 Report post Posted July 5, 2018 Hi Daresh, I'm using your original module from 2015 on my PS 1.6.2 store. It works great but I decided I want to randomize my order ID. Below is my order.php override. What do I need to add to randomize the numbers? Thanks! <?php class Order extends OrderCore { /* * module: orderreferencenumeric * date: 2015-10-18 22:46:38 * version: 1.0.1 */ public static function generateReference() { return Tools::passwdGen(9, 'NUMERIC'); } } Share this post Link to post Share on other sites
TUFFNET 0 Report post Posted October 22, 2018 Hi, Can you add finnish bank reference number check-digit at the end . I can transfer module to finnish, if you want? Im Not founding any ready modul. You can look calculation method here. https://wiki.xmldation.com/support/fk/finnish_reference_number Share this post Link to post Share on other sites