electriz 129 Posted August 11, 2016 Posted August 11, 2016 (edited) Custom Order Reference by PrestaCraft Current module version: 1.2.1 PrestaShop compatible: 1.6, 1.7 http://prestacraft.com/custom-order-reference/ You can choose one of the following order reference generation format: Default PrestaShop - If You want to restore to default Number-Day-Month-Year [incrementing number within a day] - Useful if You want to count the number of orders within a day and include it in the reference Number-Month-Year [incrementing number within a month] - Useful if You want to count the number of orders within a month and include it in the reference Number-Year [incrementing number within a year] - Useful if You want to count the number of orders within a year and include it in the reference Random number - If You want numbers instead letters Incrementing number - If You want incrementing numbers instead letters Remember that new choice won't affect existing orders. It will take effect right after save for all new orders. Screenshots Changelog: v1.2.1 - Removed PHP notice in BackOffice configuration page, thanks to @Davide from PS forums v1.2.0 Core changes: - Removed override of PaymentModule.php and all logic now is located in hook actionValidateOrder Bug fixes: - Separator is now only "-" (for compatibility reasons) - Code matches PSR-2 and PrestaShop standards - Checked compatibility with 1.7 v1.1 New features: - New generation method: Number-Day-Month-Year Bug fixes: - Fixed error occuring when reference was too long (by increasing this field length to 26) - Removed required * symbol from separator (as it's not required, just recommended) - Removed error modal in module configuration page Download - version 1.2.1 - Newest and strongly recommended (see changelog) IF YOU LIKE THIS MODULE, PLEASE DONATE AND SHARE ❤️ customorderreference_1.2.1.zip Edited October 23, 2019 by electriz (see edit history) 4 1 Share this post Link to post Share on other sites
fatheeym 9 Posted August 14, 2016 Posted August 14, 2016 (edited) thank you nice module and professional but i think it would be much better if we could remove this "-". i've tried to remove it it works fine but please notice that if you turned the debug mode this error message appear http://prnt.sc/c5hw7m === do you plan in the future add number day month year ex 114816 1 = number 14 day 8 month 16 year 2016 Edited August 14, 2016 by fatheeym (see edit history) Share this post Link to post Share on other sites
electriz 129 Posted August 16, 2016 Posted August 16, 2016 (edited) Thanks for using my module and feedback but i think it would be much better if we could remove this "-". i've tried to remove it it works fine but please notice that if you turned the debug mode this error message appear http://prnt.sc/c5hw7m Well, it depends. If you don't like, you disabled it and it's fine for you About this error - it's nothing big. I'm going to fix it with next update. do you plan in the future add number day month year Currently I'm not planning this. However if there would be more request, I'll add it. Updated in 1.1 Edited August 16, 2016 by electriz (see edit history) 1 Share this post Link to post Share on other sites
electriz 129 Posted August 16, 2016 Posted August 16, 2016 New version released! (1.1) New features: - New generation method: Number-Day-Month-Year Bug fixes: - Fixed error occuring when reference was too long (by increasing this field length to 26) - Removed required * symbol from separator (as it's not required, just recommended) - Removed error modal in module configuration page 1 Share this post Link to post Share on other sites
fatheeym 9 Posted August 31, 2016 Posted August 31, 2016 iam sorry for late but i was in trobles and now i'm just get start any way i test your module in localhost it works very well but on my site i get this error when i choose any method with date ( day year month i mean just randon and increasment number working very good i know it's not related with your module the problen in my site but i wish if you help me http://prnt.sc/ccc2z3 Share this post Link to post Share on other sites
electriz 129 Posted August 31, 2016 Posted August 31, 2016 (edited) iam sorry for late but i was in trobles and now i'm just get start any way i test your module in localhost it works very well but on my site i get this error when i choose any method with date ( day year month i mean just randon and increasment number working very good i know it's not related with your module the problen in my site but i wish if you help me http://prnt.sc/ccc2z3 Thanks for this info. Indeed it works on localhost. As I read it's something with regex characters escaping. It may come because of separator removal. As temporary fix I suggest you trying to remove all pluses (+) from queries (because you are not using separators). And then let me know if it's fine. But you know, this module is not intended to remove separators. They are used to fetch parts of order reference, so it know which value it should increment, and which not. While not using separator its just one big number. Edited August 31, 2016 by electriz (see edit history) 1 Share this post Link to post Share on other sites
fatheeym 9 Posted August 31, 2016 Posted August 31, 2016 its working when i add a seperator i have no idea why :/ it works very well on my localhost and on my test server too but on my real site it's not working without seperator :/ i don't know how to remove + from queries Share this post Link to post Share on other sites
fatheeym 9 Posted August 31, 2016 Posted August 31, 2016 i've removed this line AND reference REGEXP "^[0-9]*'.$separator.'+[0-9]*'.$separator.'+[0-9]*'.$separator.'+'.$year.'" and it works very well now 1 Share this post Link to post Share on other sites
CinefakeShop 0 Posted November 25, 2016 Posted November 25, 2016 HI, thanks for this Modul is it possible to Implement the EAN Number? Greetings MIke Share this post Link to post Share on other sites
m3442a 0 Posted December 27, 2016 Posted December 27, 2016 (edited) Great module, have only two problems: 1. If i generate a new order sometimes the module generate the same Reference ID as before, really weird. 2. i use the year Logical like : AB0001-2016. How can i change the incrementing for the next number? I wish that the next number after 0001 is 0055 (example) and not 0002. than 0056, 0057.... thank you Akos Edited December 27, 2016 by m3442a (see edit history) Share this post Link to post Share on other sites
electriz 129 Posted October 31, 2017 Posted October 31, 2017 1.2.0 version of this module is now realased! See changelog for more infos. You can use it with PrestaShop 1.6 and 1.7 versions. Share this post Link to post Share on other sites
eridamega 7 Posted April 23, 2018 Posted April 23, 2018 When I install everything right, but when I'm going to configure it shows me this Notice on line 716 en archivo /public_html/vendor/prestashop/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code[8] Undefined index: id Why ? PS 1.7.3.1 Share this post Link to post Share on other sites
Einstec 1 Posted June 1, 2018 Posted June 1, 2018 Good morning, install the module in prestashop 1.7.2 and it works fine, but I have a problem with notifications. In my admin panel the order appears with a random number, this is perfect. But in the email sent as notification to the admin, the order ID still appears in the original Prestashop letter format. Is there any way to change this ID in Alert emails? Thank you very much in advance! Best regards. 1 Share this post Link to post Share on other sites
Guillaume 1 Posted June 6, 2018 Posted June 6, 2018 Exception return by module custom_order_reference for enable. Error when activating custom_order_reference. Class OrderPaymentOverrideOriginal_remove5b17c843c9615 does not exist. I got this when I try to activate the module ! Share this post Link to post Share on other sites
Reho 0 Posted June 13, 2018 Posted June 13, 2018 Hi, We used this module for a few months ago with the Number-Year configuration but now we get two orders with the same order reference. The two orders are saved within one second (2018-06-12 18:43:42 and 2018-06-12 18:43:43). I think the module should utilize some database table with locking mechanism during reference creation. Are there anybody to plan to solve this issue? Share this post Link to post Share on other sites
YAMER1 0 Posted July 27, 2018 Posted July 27, 2018 The order code has hung on the digit 10, can someone help? With each new order the code remains on the number 10, does not change. Share this post Link to post Share on other sites
wkor86 1 Posted August 14, 2018 Posted August 14, 2018 Very usefull and easy in use module! Thanks you for making it Share this post Link to post Share on other sites
Davide 2 Posted November 21, 2018 Posted November 21, 2018 Hi, If you add `id` attribute for each radio you prevent notice error on php 7.2 'values'=> array( array( 'id' => "PC_ORDER_REF_0", .... array( 'id' => "PC_ORDER_REF_1", .... Share this post Link to post Share on other sites
Lele` 0 Posted December 9, 2018 Posted December 9, 2018 (edited) Hello, thanks for this free module. how i can start for example with incremental number 7000? And not with 1. and how to delete the "-"? thanks. Edited December 9, 2018 by Lele` (see edit history) Share this post Link to post Share on other sites
Pablus 21 Posted January 9, 2019 Posted January 9, 2019 Hello, the module is working great, but its giving me error on my log: PHP Notice: A non well formed numeric value encountered in /modules/customorderreference/customorderreference.php on line 288 Share this post Link to post Share on other sites
Alexey Tseluiko 0 Posted February 11, 2019 Posted February 11, 2019 hi. after upgrade from 1.7.4.4 to 1.7.5.5 module couse 500 error on call hook "actionValidateOrder" can't figure out why. Share this post Link to post Share on other sites
tdsoft 90 Posted February 11, 2019 Posted February 11, 2019 Thanks. Share this post Link to post Share on other sites
pixmax 0 Posted February 25, 2019 Posted February 25, 2019 Hi, many thanks for this module. It works fine. Exept when I create an order in the backend. Than I have the PrestaShop Order ID like this "OKTZJNXLV". Is there a way to extend the module to such self-entered orders? Best regards Michael Share this post Link to post Share on other sites
pixmax 0 Posted February 25, 2019 Posted February 25, 2019 Am 9.12.2018 um 9:23 PM schrieb Lele`: how i can start for example with incremental number 7000? And not with 1. When you change the last order reference number in the database to 7000, the next order will counted with 7001. Share this post Link to post Share on other sites
Cr Rad 2 Posted March 7, 2019 Posted March 7, 2019 hello. after I installed the module in 1.7.5.1 and I selected last option the prestashop front office becamed blocked. Do you have any solution to restore? And do you know why blocked? Thank you. Share this post Link to post Share on other sites
peprojects 0 Posted March 12, 2019 Posted March 12, 2019 The module only works for the banktransfer on my site and not for Ideal (dutch) or Paypal. How is that possible? Share this post Link to post Share on other sites
Cr Rad 2 Posted March 12, 2019 Posted March 12, 2019 I refer to the module that set number instead letters on orders in prestashop. Maybe I was mistake at the name of module. Share this post Link to post Share on other sites
electriz 129 Posted March 12, 2019 Posted March 12, 2019 27 minutes ago, Cr Rad said: I refer to the module that set number instead letters on orders in prestashop. Maybe I was mistake at the name of module. Yes, generally it sets numeric references, because letters are prestashop's default (which you can still restore in settings). I haven't test this for 1.7.5.1 yet, when I could do that I will provide more informations or update (if I can reproduce this weird situation) 33 minutes ago, peprojects said: The module only works for the banktransfer on my site and not for Ideal (dutch) or Paypal. How is that possible? Maybe those modules are not setting order references in actionValidateOrder hook. I would advise to go to Modules > Positions, look for "actionValidateOrder" and place my module at the end of the list - than trying to place an order with Ideal or Paypal. Share this post Link to post Share on other sites
peprojects 0 Posted March 12, 2019 Posted March 12, 2019 3 hours ago, electriz said: Yes, generally it sets numeric references, because letters are prestashop's default (which you can still restore in settings). I haven't test this for 1.7.5.1 yet, when I could do that I will provide more informations or update (if I can reproduce this weird situation) Maybe those modules are not setting order references in actionValidateOrder hook. I would advise to go to Modules > Positions, look for "actionValidateOrder" and place my module at the end of the list - than trying to place an order with Ideal or Paypal. The postion is already at the end of the list (see image) Share this post Link to post Share on other sites
joaocarloszen 1 Posted October 8, 2019 Posted October 8, 2019 (edited) On 7/27/2018 at 11:07 AM, YAMER1 said: The order code has hung on the digit 10, can someone help? With each new order the code remains on the number 10, does not change. managed to solve? The reference is locked at number 10 and does not leave this number. Any help please. Edited October 8, 2019 by joaocarloszen (see edit history) Share this post Link to post Share on other sites
electriz 129 Posted October 23, 2019 Posted October 23, 2019 (edited) On 10/8/2019 at 4:10 PM, joaocarloszen said: managed to solve? The reference is locked at number 10 and does not leave this number. Any help please. Sorry for late response but 1. Are you using this module in 1.2.1 version? 2. I suppose you have selected "Incrementing number" in the module configuration. I've tested with 1.2.1 module version and "incrementing number" on PS 1.7.6 - and I've managed to get "11" reference after "10", so I can't reproduce this issue. Edited October 23, 2019 by electriz (see edit history) Share this post Link to post Share on other sites
mikkelzyber 0 Posted March 31, 2020 Posted March 31, 2020 Hi, I have installed the module at 1.7.6 and seems like its working, but i have a problem with email "new_order", which is sent for admin to notify about new order in shop. This email still shows up the old reference number and not the one generated by your module, any idea why this happens? Best regards, Share this post Link to post Share on other sites
hbee 0 Posted April 6, 2020 Posted April 6, 2020 HI! I just installed this module. I am using prestashop 1.6.1 and it is working (prestashop default changed to Random number) However, the mail the vendor receives with a notification of the sale shows the Prestashop default letters, not the numbers. Is this normal? Share this post Link to post Share on other sites
hbee 0 Posted April 6, 2020 Posted April 6, 2020 On 6/1/2018 at 3:39 AM, Einstec said: Good morning, install the module in prestashop 1.7.2 and it works fine, but I have a problem with notifications. In my admin panel the order appears with a random number, this is perfect. But in the email sent as notification to the admin, the order ID still appears in the original Prestashop letter format. Is there any way to change this ID in Alert emails? Thank you very much in advance! Best regards. I am having the same issue. Share this post Link to post Share on other sites
BSVovchuk 0 Posted August 23, 2020 Posted August 23, 2020 Hi, I have an issue with online payments. If I install this module it doubles the payment: first with standard reference second with my custom reference When I uninstall this module everything works fine. Can anyone help me to fix this issue? Share this post Link to post Share on other sites
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