ptityop Posted December 19, 2022 Share Posted December 19, 2022 Hello, We have made some changes to the order.php class , but when I put it in the override folder it has no effect ... I did add a classes/order folder there but it is not being taken into account ... what am I doing wrong ? Thank you in advance Link to comment Share on other sites More sharing options...
Shabab Posted December 19, 2022 Share Posted December 19, 2022 hi, After putting class in override folder , clear cache and then check it , It will work. Thanks Link to comment Share on other sites More sharing options...
ptityop Posted December 19, 2022 Author Share Posted December 19, 2022 (edited) Hello, thanks for the reply, I did that already, but no luck, do I need to delete something in the var/cache folder ? I do not see any class folder or order.php there, but you are telling me that the override folder is still in action ? Edited December 19, 2022 by ptityop (see edit history) Link to comment Share on other sites More sharing options...
Mediacom87 Posted December 19, 2022 Share Posted December 19, 2022 Hi, You talk about an outdated feature, but without ever specifying the PrestaShop version used, which would greatly help to understand in what context you have this impression. When you modify, add, or delete a class in the overrides and nothing happens, either your code is badly done or it is not taken into account. In any case, to eliminate the second case, it is preferable to delete the file class_index.php on your installation, I imagine, in your words, that you use a version 1.7, this file is then in the cache directory /prod or dev depending on your use case. https://www.mediacom87.fr/en/faq-how-to-clear-the-cache-manually-on-prestashop-17/ 1 Link to comment Share on other sites More sharing options...
ptityop Posted December 19, 2022 Author Share Posted December 19, 2022 Hey, sorry, I am using latest 1.8.8 version. I do not think it has to do with the code as the only line that is changed there was to replace NO_NUMERIC to NUMERIC and it works fine if changed in the original file. But once place in overrides it has no effect .... public static function generateReference() { return strtoupper(Tools::passwdGen(9, 'NO_NUMERIC')); } I did not delete anything in the var folder as this file is not present there but I will give it a go and post the result ! Thanks for your contribution ! Link to comment Share on other sites More sharing options...
ps8modules Posted December 20, 2022 Share Posted December 20, 2022 Hi. Why don't you put the whole Order.php script that you put in the override folder here. You may have an error in the class. E.g. sample: https://www.wikicoode.com/prestashop/change-order-reference-number-reference 1 Link to comment Share on other sites More sharing options...
Shabab Posted December 20, 2022 Share Posted December 20, 2022 9 hours ago, ptityop said: Hey, sorry, I am using latest 1.8.8 version. I do not think it has to do with the code as the only line that is changed there was to replace NO_NUMERIC to NUMERIC and it works fine if changed in the original file. But once place in overrides it has no effect .... public static function generateReference() { return strtoupper(Tools::passwdGen(9, 'NO_NUMERIC')); } I did not delete anything in the var folder as this file is not present there but I will give it a go and post the result ! Thanks for your contribution ! For changing order reference use this module : https://addons.prestashop.com/en/checkout-modules/87084-change-customize-order-reference.html Link to comment Share on other sites More sharing options...
ps8modules Posted December 20, 2022 Share Posted December 20, 2022 This forum apart from the JOB section is about helping Prestashop users for free. You keep offering overpriced and pointless modules. There are many examples of how to override Order.php and how to change the creation of the reference. The offer of paid modules should only be a last resort if there is no free alternative. 1 Link to comment Share on other sites More sharing options...
Mediacom87 Posted December 20, 2022 Share Posted December 20, 2022 Il y a 4 heures, 4you.software a dit : if there is no free alternative And there are many free alternatives in this case. https://www.prestatoolbox.com/free-prestashop-modules/450-order-reference-by-numbers.html 3 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