Jordi Blanch Posted August 26, 2021 Share Posted August 26, 2021 Hello everybody, I need to remove some ordering methods from Faceted Search module. I know how to do that editing the /modules/ps_facetedsearch/src/Product/SearchProvider.php file, but everytime I update PS to a new version, this file is overriden by the new version, so my changes disappear and I have to edit the file again. I've been trying to place my edited version of the file in /my_theme/modules/ps_facetedsearch/src/Product/SearchProvider.php or in /override/modules/ps_facetedsearch/src/Product/SearchProvider.php, but none of these locations are working to override the default file. Does anybody know how to override this file so that new PS updates do not delete my changes? Thank you! Link to comment Share on other sites More sharing options...
endriu107 Posted August 26, 2021 Share Posted August 26, 2021 You can override module main controller in override/modules folder. Link to comment Share on other sites More sharing options...
Jordi Blanch Posted August 26, 2021 Author Share Posted August 26, 2021 Hello @endriu107 and thank you for your answer, but at least in my case this is not working. I place a copy of the file at /modules/ps_facetedsearch/src/Product/SearchProvider.php in /override/modules/ps_facetedsearch/src/Product/SearchProvider.php, I apply my changes to the latter (/override/modules/ps_facetedsearch/src/Product/SearchProvider.php), clear PS cache, reload my webpage (Shift + F5 in Chrome) and my changes are not being applied. I'm using latest PS v1.7.7.7 Any other ideas? Link to comment Share on other sites More sharing options...
endriu107 Posted August 26, 2021 Share Posted August 26, 2021 Like I said you can override main controller of the module not front controller, so in your case you can override only /modules/ps_facetedsearch.php file. You need to also use class name with extra Oveeride on the end. On forum is fix for prestashop 1.6 you can check is this work on 1.7 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