slavhor Posted September 3, 2017 Share Posted September 3, 2017 (edited) Hi! PS 1.7.2. In the module, I use hook "actionProductSearchAfter": public function hookactionProductSearchAfter($params){ //changing $params array; } In the WordPress I used: return $params; and there it works well. But how to return the new value of $params to the PrestaShop core? Edited September 3, 2017 by slavhor (see edit history) Link to comment Share on other sites More sharing options...
_tech Posted September 4, 2017 Share Posted September 4, 2017 Hi, Prestashop Core ProductListingFrontController : Hook::exec('filterProductSearch', array('searchVariables' => &$searchVariables)); Hook::exec('actionProductSearchAfter', $searchVariables); to change data, it looks like you have to use "filterProductSearch". searchVariables parameter is passed by reference but not with actionProductSearchAfter. 1 Link to comment Share on other sites More sharing options...
slavhor Posted September 4, 2017 Author Share Posted September 4, 2017 Big thanks! This really works. 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