NemoPS Posted June 30, 2015 Share Posted June 30, 2015 Hey there! Since many people asked for it, I just made a quick video on how to take back order ids and use them instead of the new references we have since 1.5Here it is: http://nemops.com/prestashop-replace-order-references-with-ids/#.VZJg9_nzrmhHope you find it useful!Fabio 3 Link to comment Share on other sites More sharing options...
djpat99 Posted June 30, 2015 Share Posted June 30, 2015 Thank you Nemo this is something I want to implement - When you say "make sure you use an override instead" does that mean that the method you show won't work after an update? I'm no developer so I'm learning as I go with Prestashop. What different steps should I take? Sorry to ask for more when you have given us something for free already. Link to comment Share on other sites More sharing options...
NemoPS Posted July 1, 2015 Author Share Posted July 1, 2015 Correct Just follow what the text below says, then remember to clear the class_index.php file you find inside cache/ Link to comment Share on other sites More sharing options...
pause4paws Posted October 21, 2016 Share Posted October 21, 2016 Hello, Nemo, Thank you for this terrific tip. Screenshot shows the difference! I appreciate your creating the tutorials and have been watching them over and over. A few months ago, I had my host delete my site entirely so I could redesign it. (I jumped ship from Mag... which was recommended last November.) I'd rather be a year behind schedule and have a site I love! 1 Link to comment Share on other sites More sharing options...
pause4paws Posted October 21, 2016 Share Posted October 21, 2016 Thank you for the like, Razaro! I appreciate it. Link to comment Share on other sites More sharing options...
pause4paws Posted December 9, 2016 Share Posted December 9, 2016 (edited) PrestaShop 1.6.1.8 I had this working perfectly when site was in maintenance mode. My site is now live and the random letter reference numbers are back again. The setting in admin for "disable all overrides" is no. I suspect a lot of files were replaced by templatemonster when they were adjusting the template for me. Is there anywhere else, besides debug mode, to prevent overrides from being over-ridden? Edited December 9, 2016 by pause4paws (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted December 9, 2016 Author Share Posted December 9, 2016 PrestaShop 1.6.1.8 I had this working perfectly when site was in maintenance mode. My site is now live and the random letter reference numbers are back again. The setting in admin for "disable all overrides" is no. I suspect a lot of files were replaced by templatemonster when they were adjusting the template for me. Is there anywhere else, besides debug mode, to prevent overrides from being over-ridden? That's the only place, are you sure the override is still in the folder? Clear the class index as well, just in case Link to comment Share on other sites More sharing options...
pause4paws Posted December 9, 2016 Share Posted December 9, 2016 (edited) Hi, Nemo, It's still in the folder. This is the only code in Order.php (when I first edited it there was a lot more code in it. I don't know what TM did). Class Order extends OrderCore { public static function generateReference() { return strtoupper(Tools::passwdGen(9, 'NO_NUMERIC')); } public static function generateReference() { $last_id = Db::getInstance()->getValue(' SELECT MAX(id_order) FROM '._DB_PREFIX_.'orders'); return str_pad((int)$last_id + 1, 9, '000002177', STR_PAD_LEFT); } } end of the code. It is not using the numbering I created beginning with 2177. It started with 000000007. I don't know what you mean about "clear the class index", so i searched and found this but it only says what I said in my question except to delete the file. https://www.prestashop.com/forums/topic/498718-1614-if-clear-cache-class-indexphp-file-re-genetare-without-inforation-about-override-classes/ So how do I clear the class index, please? Edited December 9, 2016 by pause4paws (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted December 10, 2016 Author Share Posted December 10, 2016 If you want it to start with that and increase, then I guess it's better to sum it to the product id, instead of using strpadI just meant deleting the file anyway Link to comment Share on other sites More sharing options...
pause4paws Posted December 10, 2016 Share Posted December 10, 2016 Delete the class file? Yes, I want to start with that number because I've been in business a lot longer than having only seven orders. I wiped out my site and redesigned it. It's not very impressive to a customer to see that they have the seventh order! Link to comment Share on other sites More sharing options...
NemoPS Posted December 12, 2016 Author Share Posted December 12, 2016 deleting class_index.php so it regenerates. 1 Link to comment Share on other sites More sharing options...
pause4paws Posted December 12, 2016 Share Posted December 12, 2016 deleting class_index.php so it regenerates. I deleted it from the cache folder via Filezilla. Thank you. 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