Jump to content

Fork of blocksearch module


omixam

Recommended Posts

Hello,

I need add to prestashop search module with a dropdown with the categories available for be used as a filter. I know that I can't override php files of the modules...

I copied all file of this module to other folder and rename like this:

 

/modules/blocksearch     changed to          /modules/blocksearchavanced
themes/bootstrap_theme/modules/blocksearch        change to      themes/bootstrap_theme/modules/blocksearchavanced

 

I rename all files names and references inside of the files  to blocksearchavanced, but when I installed the new module is not rendering neither css nor jquery and show like the image attach...

 

I don't have any idea Why is passing that...

I'm trying to debug for find the issue but yet I have can find it...

 

Can any body help me?

post-774053-0-69829200-1399171110_thumb.png

Link to comment
Share on other sites

I only changed all names refer to blocksearch to blocksearchavanced it included: all files names (css,js,tpl,php) in the modules and my theme directory and also the variables that start with blocksearch_ to blocksearchavanced_... But not changed classes and id names...

 

I see that my theme is not loading css of blocksearchavanced in <head></head>..

 

I working in local in develop mode (debug true,force recompilation selected,cache no, all ccc no)...

 

I noted that the files that were override for my theme that work property for the original version of blocksearch not work for blocksearchavanced instead of I adapt for the copied to other folder and renamed for make coincide with their new reference module blocksearchavanced...

Edited by omixam (see edit history)
Link to comment
Share on other sites

Bellow hookHeader function is exactly like show in original blocksearch. I checked the path for css files and are correct...

public function hookHeader($params)
	{
		if (Configuration::get('PS_SEARCH_AJAX'))
			$this->context->controller->addJqueryPlugin('autocomplete');
		$this->context->controller->addCSS(_THEME_CSS_DIR_.'product_list.css');
		$this->context->controller->addCSS(($this->_path).'blocksearchavanced.css', 'all');
		if (Configuration::get('PS_SEARCH_AJAX'))
		{
			Media::addJsDef(array('search_url' => $this->context->link->getPageLink('search', Tools::usingSecureMode())));
			$this->context->controller->addJS(($this->_path).'blocksearchavanced.js');
		}
	}
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...