mysho Posted January 5, 2017 Share Posted January 5, 2017 (edited) Hi everyone, I would like to ask which way is the easiest for changing the order reference from random letters to the order ID. Will this http://nemops.com/prestashop-replace-order-references-with-ids/#.WG49KPnhCUk work for PS 1.7 (1.7.0.3 exactly)? THX! Edited January 5, 2017 by mysho (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted January 10, 2017 Share Posted January 10, 2017 It might work, I haven't tested it, you can try anyway, it's not destructive Link to comment Share on other sites More sharing options...
mysho Posted January 12, 2017 Author Share Posted January 12, 2017 I haven't tried it. I've decided for a smaller change - random reference code, but numeric (instead of alphabetical). Still better random numbers than random letters If anybody wants to apply the same modification: In this file: \classes\order\Order.php - generateReference() change this return in the function generateReference(): return strtoupper(Tools::passwdGen(7, 'NON_NUMERIC')) I think there was (9,'NON_NUMERIC'), but I am not sure. This number describes the length of a generated string. to return strtoupper(Tools::passwdGen(7, 'NUMERIC')) Link to comment Share on other sites More sharing options...
danieldmw Posted May 26, 2017 Share Posted May 26, 2017 Hi everyone, I would like to ask which way is the easiest for changing the order reference from random letters to the order ID. Will this http://nemops.com/prestashop-replace-order-references-with-ids/#.WG49KPnhCUk work for PS 1.7 (1.7.0.3 exactly)? THX! Hello, I tried it, but override didn't work for me on PS 1.7.1. "Use Overrides" from BO is enable and I delete /app/cache/prod/class_index.php but nothing happen. Any idea? Thanks Link to comment Share on other sites More sharing options...
NemoPS Posted May 27, 2017 Share Posted May 27, 2017 Does the front office die if you kill the override you added? What if you hardcode the change into the core class? Link to comment Share on other sites More sharing options...
obewanz Posted November 17, 2018 Share Posted November 17, 2018 You can find the answer here ... Link to comment Share on other sites More sharing options...
muynck Posted April 9, 2020 Share Posted April 9, 2020 (edited) HI @obewanz, this is an old topic, I don't know if you still need something for this, but I created a module for this and published it yesterday: https://github.com/blauwfruit/orderreference/releases/tag/1.1.2 Give me your opinion! Edited June 2, 2020 by muynck Link didn't work. (see edit history) Link to comment Share on other sites More sharing options...
vskand Posted August 9, 2022 Share Posted August 9, 2022 @muynck your module doubles the total spent of the customers. If you go to customers and select a customer, in the details page, the total of all the orders (and the total per order) is doubled. Not sure why. Link to comment Share on other sites More sharing options...
muynck Posted August 10, 2022 Share Posted August 10, 2022 On 8/9/2022 at 10:35 AM, vskand said: @muynck your module doubles the total spent of the customers. If you go to customers and select a customer, in the details page, the total of all the orders (and the total per order) is doubled. Not sure why. The module may have created a duplicate order references. If that happens (due to malformed order reference configuration) the amounts paid can be doubled, or any multiplication. Make sure you have an order reference configured that will create a unique order reference. Do this be using the order id or cart id. And make sure it is not cutoff at the end because it is too long. Let me know if this helps. Link to comment Share on other sites More sharing options...
vskand Posted August 10, 2022 Share Posted August 10, 2022 58 minutes ago, muynck said: Make sure you have an order reference configured that will create a unique order reference. Do this be using the order id or cart id. And make sure it is not cutoff at the end because it is too long. Hi, thanks for the reply. The module is setup with the following: {order->id:%05d} All the references are unique. This happens in 2 different sites/installations. You don't have this issue? Thanks Link to comment Share on other sites More sharing options...
muynck Posted August 10, 2022 Share Posted August 10, 2022 2 minutes ago, vskand said: Hi, thanks for the reply. The module is setup with the following: {order->id:%05d} All the references are unique. This happens in 2 different sites/installations. You don't have this issue? Thanks Can you share a printscreen of the order page? Link to comment Share on other sites More sharing options...
vskand Posted August 10, 2022 Share Posted August 10, 2022 18 minutes ago, muynck said: Can you share a printscreen of the order page? The order (list) page: The customer page: See that the Total spent is doubled the order total Link to comment Share on other sites More sharing options...
vskand Posted August 10, 2022 Share Posted August 10, 2022 To see the change you have to disable the module, add an order and then check. It should be correct. If you enable the module and then add an order, you'll see it's doubled Link to comment Share on other sites More sharing options...
muynck Posted August 10, 2022 Share Posted August 10, 2022 What do you see under order 111 in the Documents' tab? Link to comment Share on other sites More sharing options...
vskand Posted August 10, 2022 Share Posted August 10, 2022 12 minutes ago, muynck said: What do you see under order 111 in the Documents' tab? Link to comment Share on other sites More sharing options...
muynck Posted August 11, 2022 Share Posted August 11, 2022 23 hours ago, vskand said: I'm really clueless at this point. If you find a way to reproduce it, please report an issue on the GitHub page: https://github.com/blauwfruit/PrestaShop-Order-Reference/issues Link to comment Share on other sites More sharing options...
vskand Posted August 11, 2022 Share Posted August 11, 2022 Does it work correctly on your sites? I could not pinpoint the issue nor did I find a hook or something that might affect this. Link to comment Share on other sites More sharing options...
muynck Posted August 12, 2022 Share Posted August 12, 2022 (edited) 18 hours ago, vskand said: Does it work correctly on your sites? I could not pinpoint the issue nor did I find a hook or something that might affect this. Yes, I see this in one other project too! I can not find it for now, and I don't have enough time to investigate this now! I have a few questions What is your PrestaShop version? What is your module version? I created an issue: https://github.com/blauwfruit/PrestaShop-Order-Reference/issues/10 Edited August 12, 2022 by muynck (see edit history) Link to comment Share on other sites More sharing options...
vskand Posted August 13, 2022 Share Posted August 13, 2022 On 8/12/2022 at 11:22 AM, muynck said: What is your PrestaShop version? What is your module version? I created an issue: https://github.com/blauwfruit/PrestaShop-Order-Reference/issues/10 Both in 1.7.6.8 and 1.7.7.3 The module version is 1.1.3 Link to comment Share on other sites More sharing options...
Nickz Posted August 20, 2022 Share Posted August 20, 2022 Those custom changes have no benefit in raising sales. People should concentrate on selling more instead of fiddling around om their shops. 1 Link to comment Share on other sites More sharing options...
muynck Posted August 22, 2022 Share Posted August 22, 2022 (edited) On 8/20/2022 at 2:24 PM, Nickz said: Those custom changes have no benefit in raising sales. People should concentrate on selling more instead of fiddling around om their shops. Unless you have so many orders, that you need to automise and organise your orders to reduce labour cost. And, @vskand found a serious bug, that needs solving. Edited August 22, 2022 by muynck (see edit history) 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