Premitium Posted August 15, 2016 Share Posted August 15, 2016 Hi, I just enabled the compare module on localhost and I am getting an exception: Warning: Parameter period in function cleanCompareProducts() is deprecated in /Users/simeonparvanov/Documents/wineo/controllers/front/CompareController.php on line 77in /Users/simeonparvanov/Documents/wineo/classes/Tools.php on line 2698 I have tried changing the tools.php code to the latest version, but with no success. Any thoughts how can I fix this issue? Also, I don't understand how a parameter can be deprecated??? Thank you! Link to comment Share on other sites More sharing options...
rocky Posted August 16, 2016 Share Posted August 16, 2016 It seems PrestaShop decided to remove the option to define a period for cleaning up comparisons and decided to limit it to cleaning up one week of comparisons. PrestaShop often deprecates classes, functions and parameters between major versions of PrestaShop whenever it removes or changes a feature. You'll need to find wherever cleanCompareProducts is called and remove the parameter so it is just cleanCompareProducts(); Link to comment Share on other sites More sharing options...
Premitium Posted August 19, 2016 Author Share Posted August 19, 2016 It seems PrestaShop decided to remove the option to define a period for cleaning up comparisons and decided to limit it to cleaning up one week of comparisons. PrestaShop often deprecates classes, functions and parameters between major versions of PrestaShop whenever it removes or changes a feature. You'll need to find wherever cleanCompareProducts is called and remove the parameter so it is just cleanCompareProducts(); Thank you for your answer! I did remove the parameter but with no success. I still get the error. Link to comment Share on other sites More sharing options...
rocky Posted August 20, 2016 Share Posted August 20, 2016 Oh, interesting. I found a line in PrestaShop's core that still includes the parameter! Must be a bug. It's line 77 of controllers/front/CompareController.php: CompareProduct::cleanCompareProducts('week'); This should be: CompareProduct::cleanCompareProducts(); Hopefully, this will fix the error message. 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