Jump to content

blocklayer issue


tinhyeuphonui

Recommended Posts

From the Prestashop documentation:

http://doc.prestashop.com/display/PS15/Managing+Modules+and+Themes#ManagingModulesandThemes-Installingmodules

(Scroll down a little to "Attaching a module to a hook: Transplanting")

 

Two things to know before transplanting a module:

  • Some modules are written to only be attached to a given set of hooks.
  • Some hooks are written to not accept some specific kinds of modules.

 

 

Blocklayered has many hooks defined, but most for processing changes. A few are defined to 'hook' the module on the page:

 

public function hookLeftColumn($params)
{
return $this->generateFiltersBlock($this->getSelectedFilters());
}
 
public function hookRightColumn($params)
{
return $this->hookLeftColumn($params);
}
 
(Maybe hookFooter for categories as well, if I remember well)
 
 

If you want to put it somewhere else, you may have to write your own hook function, with the appropriate contents to make it fit at that position.

 

Some more info on this here:

http://doc.prestashop.com/display/PS15/Creating+a+PrestaShop+module#CreatingaPrestaShopmodule-Implementinghooks

 

It's good to read the user guide and the developer guide first before modifying/creating modules, so you know what needs to be done.

 

Hope this helps,

pascal.

Link to comment
Share on other sites

If it's a 'new hook', that is not available (i.e. defined) in the blocklayered.php module code, you have to write this one yourself...

 

To which "new hook" do you want to add it??

I defined new hook, example displayTestLayered. Important, i used two hook on one page. Thanks you !

Link to comment
Share on other sites

  • 3 weeks later...

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...