Popular Post Daresh Posted November 9, 2022 Popular Post Share Posted November 9, 2022 (edited) Changes the order reference from a random string to a random number or order ID. This module was used by many shops, but deleted some time ago from this forum by one nasty user. People keep asking me for it, so here it is reuploaded. Still works for Prestashop 1.6, 1.7 and 8.0. gmnumeric_v_1_2_0.zip New version - to make sure the new override is applied, I recommend to reinstall and reconfigure the module. gmnumeric_1_2_1.zip New, override free version for PrestaShop 8.1.0 and above. Please uninstall and remove any previous versions to make sure the override is gone: gmnumeric_2_0_0.zip Another version with a new feature - Order reference may be set to euqal cart ID (may be handy in some cases): gmnumeric_2_1_0.zip Edited July 2 by Daresh (see edit history) 10 5 Link to comment Share on other sites More sharing options...
Roych Posted January 16, 2024 Share Posted January 16, 2024 (edited) Hello, thank you for the module, it works great, but it messes up my Email order confirmation template. it looks kind a messy in sent e-mail. What is the name of the template so I could change it. I looked all available templates but couldn't find this one. Any ideas? Thank you very much R Edited January 16, 2024 by Roych (see edit history) Link to comment Share on other sites More sharing options...
Daresh Posted January 17, 2024 Author Share Posted January 17, 2024 That's not possible, the module has nothing to do with email templates, it must be a coincidence. 1 Link to comment Share on other sites More sharing options...
Roych Posted January 17, 2024 Share Posted January 17, 2024 Ok, I guess you are right. I'll look into it. Thank you R Link to comment Share on other sites More sharing options...
musicmaster Posted February 9, 2024 Share Posted February 9, 2024 I had a problem with this module. It happened after I had moved my shop to another server (both PHP 8.1). On the new server you could pay for an order. But the cart was never converted into an order. Instead the software hang and got a timeout after you paid. On analysis it turned out that the problem was in the function validateOrder() in /classes/module/PaymentModule.php. It turned out that the following code had become an eternal loop: do { $reference = Order::generateReference(); } while (Order::getByReference($reference)->count()); Order::generateReference(); always returned the number of the last order. This was with Thirty Bees 1.4. Link to comment Share on other sites More sharing options...
Daresh Posted February 9, 2024 Author Share Posted February 9, 2024 Check out version 1.2.1, it should have it covered. Link to comment Share on other sites More sharing options...
musicmaster Posted February 9, 2024 Share Posted February 9, 2024 It works. Thanks! Link to comment Share on other sites More sharing options...
koedben Posted April 16, 2024 Share Posted April 16, 2024 Why is the module is not available anymore? Link to comment Share on other sites More sharing options...
Daresh Posted April 16, 2024 Author Share Posted April 16, 2024 It is available, but probably to download files from the forum you need to have some minimum post count. Link to comment Share on other sites More sharing options...
koedben Posted April 16, 2024 Share Posted April 16, 2024 Thanks...I didn't know....so of writing some posts;-) Link to comment Share on other sites More sharing options...
socialbx Posted May 27, 2024 Share Posted May 27, 2024 I just wanted to thank you for the module, I was having same problem as @musicmaster , now fixed with the new version. thank You. Link to comment Share on other sites More sharing options...
emild Posted July 22, 2024 Share Posted July 22, 2024 For 8.1.6 @Daresh your module totallly blocking checkout, not possible to order. Link to comment Share on other sites More sharing options...
Daresh Posted July 23, 2024 Author Share Posted July 23, 2024 Works completely fine on my 8.1.7, must be something specific to your shop. Link to comment Share on other sites More sharing options...
joelhroliveira Posted September 6, 2024 Share Posted September 6, 2024 Hello @Daresh, its possible to make it start in a specific order number ? Thanks Link to comment Share on other sites More sharing options...
Daresh Posted September 6, 2024 Author Share Posted September 6, 2024 The simplest solution is to set the AUTO_INCREMENT value in the database for the ps_orders table to one that you like, and then set the module to make the order reference the same as order ID. 1 Link to comment Share on other sites More sharing options...
hadi1404 Posted September 8, 2024 Share Posted September 8, 2024 Hi , Is it possible to determine the number of random numbers in this module? Thank you Link to comment Share on other sites More sharing options...
Daresh Posted September 9, 2024 Author Share Posted September 9, 2024 Hi, yes, it is 1000000000. Link to comment Share on other sites More sharing options...
hadi1404 Posted September 10, 2024 Share Posted September 10, 2024 My mean is instead of 10 characters, we can use a smaller number. For example, 5 characters Link to comment Share on other sites More sharing options...
abdulionw Posted September 11, 2024 Share Posted September 11, 2024 Great module but it will better if order dates comes before order ID as reference id. Link to comment Share on other sites More sharing options...
lipo999 Posted November 6, 2024 Share Posted November 6, 2024 On 9/9/2024 at 8:19 AM, Daresh said: Hi, yes, it is 1000000000. Hello Daresh, thank you for your module. Is there any update? I would by happy if there will be function like (y) for current year in prefix field...etc. thank you Link to comment Share on other sites More sharing options...
Daresh Posted November 14, 2024 Author Share Posted November 14, 2024 In this module I stick to the safe number of characters for order reference, which is 9. So adding dates and other long prefixes may not leave anough room for the reference to be unique. Link to comment Share on other sites More sharing options...
Bill Dalton Posted January 9 Share Posted January 9 Thank you, works great PS 8.2 1 Link to comment Share on other sites More sharing options...
ATROX CUSTOMS Posted March 13 Share Posted March 13 (edited) Thanks for the module friend! Now instead of weird random letters I can start with # 2001 2002 2003 etc thanks! Edited March 13 by ATROX CUSTOMS (see edit history) 1 Link to comment Share on other sites More sharing options...
Tomi14 Posted April 9 Share Posted April 9 Thanks! It works perfect! Maybe could you add two variables, to use it in prefix: %y for a year, and %m for a month Link to comment Share on other sites More sharing options...
bloggus Posted May 1 Share Posted May 1 Thanks. I guess it is not multistore compatible? Link to comment Share on other sites More sharing options...
Daresh Posted May 2 Author Share Posted May 2 It simply generates an unique order reference. Even for multistore order ID's can't duplicate, because it's one database table. The multistore feature does not apply to this module. Link to comment Share on other sites More sharing options...
bloggus Posted May 2 Share Posted May 2 Great. Thank you! Tested and modified to my liking. So simple, but so great! (have also Tidy - which is great module) 1 Link to comment Share on other sites More sharing options...
0kph Posted June 23 Share Posted June 23 I looked into the module code and noticed some inconsistency... I don't know if this has any impact on the operation of the module, but I don't think there should be _RANDOM twice, but _ZEROS. public function install() { if (Shop::isFeatureActive()) { Shop::setContext(Shop::CONTEXT_ALL); } return parent::install() && Configuration::updateValue('GMNUMERIC_RANDOM', true) && Configuration::updateValue('GMNUMERIC_RANDOM', true) && <<<<----------- Configuration::updateValue('GMNUMERIC_PREFIX', ''); } public function uninstall() { Configuration::deleteByName('GMNUMERIC_RANDOM'); Configuration::deleteByName('GMNUMERIC_ZEROS'); <<<<----------- Configuration::deleteByName('GMNUMERIC_PREFIX'); return parent::uninstall(); } Link to comment Share on other sites More sharing options...
Daresh Posted June 23 Author Share Posted June 23 Nice find, indeed it should not impact the way module works at all, but it will be a good practice to fix it Link to comment Share on other sites More sharing options...
Daresh Posted June 23 Author Share Posted June 23 I just uploaded a new, override free version to the first post. It works on PrestaShop 8.1.0 and above. Link to comment Share on other sites More sharing options...
simon1981 Posted September 3 Share Posted September 3 Is it working with PS9? Link to comment Share on other sites More sharing options...
Daresh Posted September 3 Author Share Posted September 3 Yes it is. Link to comment Share on other sites More sharing options...
simon1981 Posted September 3 Share Posted September 3 3 minutes ago, Daresh said: Yes it is. GOOD ARE YOU TALKING ABOUT 2_1_0 VERSION? Link to comment Share on other sites More sharing options...
Daresh Posted September 3 Author Share Posted September 3 Yes, you should use 2.1.0 Link to comment Share on other sites More sharing options...
simon1981 Posted September 3 Share Posted September 3 29 minutes ago, Daresh said: Yes, you should use 2.1.0 Thank You. Good job. It is working Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now