Jump to content

facebook module works just in home page


Recommended Posts

just checked, i havent any exception for both.

this is the rows in php script, i guess here is the problem

public function hookLeftColumn($params)
{
	return $this->hookDisplayHome($params);
}
public function hookFooter($params)
	{
		return $this->display(__FILE__, 'blockfacebook-footer.tpl', $this->getCacheId());
	}
Link to comment
Share on other sites

hello

hookHeader has got code to include facebook libraries only on homepage, remove this if condition if ($this->page_name == 'index')

	public function hookHeader()
	{
		$this->page_name = Dispatcher::getInstance()->getController();
		if ($this->page_name == 'index')
		{
			$this->context->controller->addCss(($this->_path).'css/blockfacebook.css');
			$this->context->controller->addJS(($this->_path).'blockfacebook.js');
		}
	}
Link to comment
Share on other sites

 

hello

hookHeader has got code to include facebook libraries only on homepage, remove this if condition if ($this->page_name == 'index')

	public function hookHeader()
	{
		$this->page_name = Dispatcher::getInstance()->getController();
		if ($this->page_name == 'index')
		{
			$this->context->controller->addCss(($this->_path).'css/blockfacebook.css');
			$this->context->controller->addJS(($this->_path).'blockfacebook.js');
		}
	}

 

i didnt even check that hook, it should be the first think i would check.

i'm sorry for bothered you for that dumb issue.

thanks :)

just 2 more little thing:

-there is a css solution for make the footer looks like the attachment?

 

- now i'm modding the PS/modules/blockfacebook php script

i tried to copy this script (just the php file) in mytemplate/modules/blockfacebook but PS doesnt load the overrided script, it still use the original php script in PS/modules/blockfacebook.

how can i override that file?

post-748713-0-89392100-1403283291_thumb.gif

post-748713-0-02751600-1403283298_thumb.gif

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

in prestashop theme directory you can override .php files,

you can only override .tpl files there

 

in fact, in prestashop you cant override module .php file.

there is no way to achieve it at the moment.

 

so i have to replace the hack each facebook module update, right?

 

what about that css issue? any tip?

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

yeah, you have to, there is no way to override module's php files at the moment. As for css, look at the path they have in the respective module's folder, it should be modulename/css/

Thus, inside the theme's folder, /css/modules/modulename/css create a file named cssfilename.css (with the name of the original one)

Link to comment
Share on other sites

yeah, you have to, there is no way to override module's php files at the moment. As for css, look at the path they have in the respective module's folder, it should be modulename/css/

Thus, inside the theme's folder, /css/modules/modulename/css create a file named cssfilename.css (with the name of the original one)

 

about override the php file, i think it's a good choice, override the main script of a module makes no sense.

But you should find a way to allows the users to use multiple tpl files in a "update safe" way, don't you agree?

 

i know where the css file is, i'm asking for a solution for show the facebook module (in footeer) and the social module in a row, i can't find it.. :)

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

×
×
  • Create New...