a17000 Posted March 23, 2021 Share Posted March 23, 2021 (edited) Hi all, I search a hook/override for change all front pages content at the fly. For example, I want for example replace all words 'potatoes' by 'tomatoes' at the fly. I can make it by javascript in header (via hookdisplayheader) but I prefer get the page content and make a PHP preg_replace before the page is displayed. Have you an idea for this ? Thanks, Edited March 25, 2021 by a17000 precisions (see edit history) Link to comment Share on other sites More sharing options...
a17000 Posted March 24, 2021 Author Share Posted March 24, 2021 I have found maybe a solution, override frontcontroller and public function initContent() But, now, I search how to get the content and change it... Link to comment Share on other sites More sharing options...
a17000 Posted March 25, 2021 Author Share Posted March 25, 2021 I find another way ... public function hookActionOutputHTMLBefore(array $params) { $params['html']=$params['html'].'PLEASE complete Prestashop Documentation '; } 1 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