Jump to content

Hook on homepage


Recommended Posts

Hi everyone,

 

I'm very new in prestashop and i'm learning everyday, but I have a big problem and I doní find the solution.

 

I want to hook a new module on my homepage (prestashop v1.5.5.0) and I receive always an error saying that it isn´t possible.!?

 

I don´t know why...

 

Can someone help me?

 

Pedro

Link to comment
Share on other sites

CMS block doesn't support home hook.

 

open /modules/blockcms/blockcms.php file

 

add there this function:

 

public function hookHome()
{
return $this->displayBlockCMS(BlockCMSModel::LEFT_COLUMN);
}

(insert it right before the last closing bracket: } )

 

then try to transplant module.

 

in back office define CMS block attached to the left column - you will see it in home hook then.

  • Like 1
Link to comment
Share on other sites

It worked and appeared on the home page, but on the bottom.

 

Maybe I didn´t explain it in the right way, because I meant Home page and were thinking about the left column on the home page, and what I saw is the what is called Home page is only the main content, isn´t it?

 

As you can see: http:/www.amoravida.pt

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

It worked and appeared on the home page, but on the bottom.

 

you can change position of module under modules > positions. Then search for "displayHome" modules list and just drag'n'drop blockcms module to new position (you have to change displayHome modules list - make sure that you changin it - not something other)

 

 

Maybe I didn´t explain it in the right way, because I meant Home page and were thinking about the left column on the home page, and what I saw is the what is called Home page is only the main content, isn´t it?

 

As you can see: http:/www.amoravida.pt

in this case you have to transplant module to the "displayLeftcolumn" position

  • Like 1
Link to comment
Share on other sites

you can change position of module under modules > positions. Then search for "displayHome" modules list and just drag'n'drop blockcms module to new position (you have to change displayHome modules list - make sure that you changin it - not something other)

 

 

Thank u. I knew this step.

 

 

in this case you have to transplant module to the "displayLeftcolumn" position

When I try this step, it appears, it doesn´t appear on the left side of the home page, but on all the others. Maybe it´s because of the theme that I'm using.

 

By the way, to not open a new topic (I searched all around and dind´t find a solution) when a customer register for the first time, the fiel vat_number doesn´t appear. I made it necessary under Customer>direction. It doesn´t appear with the default theme nor my new theme with prestashop v1.5.6

Link to comment
Share on other sites

×
×
  • Create New...