prestashop_newuser Posted February 28, 2014 Share Posted February 28, 2014 Hi, In prestashop we have already searchbox at the top of the page(in header section). Now I want to know can we override the serach feature from our module? I mean to say lets say I have a module and I want to add some extra feature in prestashop default search box. So can someone kindly tell me how to override the default search box from a module? Any help and suggestions will be really appreciable. Thanks Link to comment Share on other sites More sharing options...
NemoPS Posted February 28, 2014 Share Posted February 28, 2014 THe best way would be to clone and extend it. You can only override the template file by using the same module. So, you can change the tpl (what it displays) in the theme folder /modules/ and then create a new Search.php class override, and edit the Search::find() method accordingly, OR, you can clone it, rename, do the changes you want, and create an automatic override as specified in the docs (doc.prestashop.com) so that everything is in one place Link to comment Share on other sites More sharing options...
prestashop_newuser Posted February 28, 2014 Author Share Posted February 28, 2014 THe best way would be to clone and extend it. You can only override the template file by using the same module. So, you can change the tpl (what it displays) in the theme folder /modules/ and then create a new Search.php class override, and edit the Search::find() method accordingly, OR, you can clone it, rename, do the changes you want, and create an automatic override as specified in the docs (doc.prestashop.com) so that everything is in one place I am not getting your answer properly..You have told to clone it and extends it. Can you tell me how to clone it in my module? Link to comment Share on other sites More sharing options...
Recommended Posts