Vignesh R Posted April 26, 2021 Share Posted April 26, 2021 Hi Razoro, I tried adding exceptions to orders and the module itself but still the issue presists. I cannot change the hook to home as it does not bring desirable results as the slider displays below header i want it to overlap the header for aesthetics. You mentioned earlier about the coding method i inserted your code after this line but there was no result. iam attaching revo slider php file below razoro please if u can find some solution. The CSS part i have no idea where to look for that file. Pleease tell me your IP so u can take a look at my site closer. $slider = RevSliderOutput::putSlider($slider_array['id'], '',array(),array(),array(),$current_lang); if(_PS_VERSION_ < 1.7){ RevSliderFront::rev_foot_front();; } $content = ob_get_clean(); if (!empty($slider)) { $outputType = $slider->getParam("output_type", ""); switch ($outputType) { case "compress": $content = str_replace("\n", "", $content); $content = str_replace("\r", "", $content); return($content); break; case "echo": echo $content; //bypass the filters break; default: return($content); break; } } else { return($content); } } Link to comment Share on other sites More sharing options...
razaro Posted April 27, 2021 Share Posted April 27, 2021 Hi Think revolution slider does not work with those restrictions because it uses _call function. With that you can hook module anywhere. By default is displayHome, like I said that sounds like quickest solution. Not sure why it must be on top hook. But if you really need to be at top of page try to edit this code public function __call($function, $args) { $hook = Tools::substr($function, 0, 4); if ($hook == 'hook') { $hook_name = Tools::substr($function, 4); return $this->generateSlider($hook_name); } else { return false; } } You can try to use this suggestion https://build.prestashop.com/howtos/module/Common-mistakes-while-coding-module/#5-do-not-trigger-code-if-it-is-for-a-specific-page So something like, this. Note not tested at all. public function __call($function, $args) { $pages_to_hide = array('address', 'addresses', 'bestsales', 'cart', 'category','contact','order'); // add more if needed if (in_array($this->context->controller->php_self, $pages_to_hide)) { return false; } $hook = Tools::substr($function, 0, 4); if ($hook == 'hook') { $hook_name = Tools::substr($function, 4); return $this->generateSlider($hook_name); } else { return false; } } Good luck Link to comment Share on other sites More sharing options...
Vignesh R Posted April 27, 2021 Author Share Posted April 27, 2021 I literally don't have no words to thank you man because i am that much excited dude. Your idea worked i pasted your suggested code in the spot you mentioned and finally results ✌️. Thanks a lot razaro iam very lucky to have genius like you around me for support. Thanks a lot 1 Link to comment Share on other sites More sharing options...
razaro Posted April 27, 2021 Share Posted April 27, 2021 Glad it work. It is just bit of experience from years in PrestaShop. Good luck with your store. 1 Link to comment Share on other sites More sharing options...
Vignesh R Posted May 2, 2021 Author Share Posted May 2, 2021 Hi Razaro, Hope you are doing great there. Razaro the revolution slider is still putting up a fight in my search results page. Iam using a module called jolisearch which streamlines search results based on mispelling and other wordings to match product. The thing is i added jolisearch into your code for excluding pages correctly even i used jolisearch?s= for more accuracy but still no results the revolution banner is easily bypassing the code i dont know why. I know exceptions won't work properly but i still gave that a try too adding this module as exception top column and search but still no results. I found out by removing the display homehook the slider stops working it needs display home to display on top column. I even tried adding exceptions to display home hook but no success. Link to comment Share on other sites More sharing options...
Vignesh R Posted May 7, 2021 Author Share Posted May 7, 2021 Hi Razaro. Your codings helped me to tackle one the major issues i previously had with order page. Iam sure you can easily crack this one too. Slider is bypassing the code and exceptional rules as well once again in the search results created by joli search. While it works for other pages like category and son on. Please help me out razaro. I literally have no options using home hook does work for the revo slider properly as it has display full width in mobile view which is the main reason. It is also creating margin issues in desktop which complicates things further. If we can somewhat restrict its appearance in search results created be jolisearch it would be great as for other pages it is working well. Link to comment Share on other sites More sharing options...
Vignesh R Posted May 7, 2021 Author Share Posted May 7, 2021 joliSearch results code.txt Link to comment Share on other sites More sharing options...
razaro Posted May 7, 2021 Share Posted May 7, 2021 Hi Try to found out what is controller used on those search pages. It is a module so it might be different then other regular pages. Add first in call function var_dump($this->context->controller->php_self); and see if you get some name that contain joliSearch. Link to comment Share on other sites More sharing options...
Vignesh R Posted May 7, 2021 Author Share Posted May 7, 2021 Hi Razaro, thanks for reply. Razaro i added your code to the call function and this is the result. Take a look a line module- ambjolisearch-jolisearch is visible. Link to comment Share on other sites More sharing options...
razaro Posted May 7, 2021 Share Posted May 7, 2021 OK good but think you should know what is next step Change remove 'jolisearch' and 'jolysearch?s=' from $pages_to_hide array and add 'module-ambjolisearch-jolisearch' save and it should hide banner now from search pages. Also do not forget to delete that var_dump($this->context->controller->php_self); line. Link to comment Share on other sites More sharing options...
Vignesh R Posted May 7, 2021 Author Share Posted May 7, 2021 Razaro you are like a nitrous boost for me😎. Seriously words cannot explain how thankful to you razaro once again. For days i was putting all kinds of words with joli there in your code but none worked and finally you did your magic once again man. Thank you so much razaro. Its because of you i am staying boasted with confidence. 🤗 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