Jump to content

How To Replace Default Module To New Custom Hook


Recommended Posts

Hi, does anyone can help me to figure out what I'm doing wrong?
 

I'm tring to modify "Products in the same category". I want to replace it to another hook in my theme.

 

I've copied the module to a new folder (from "productscategory" to "productscategory_mod"  and renamed module's class, files and so on...

 

Also in productscategory_mod.php
I have changed $this->registerHook('productfooter') 

to $this->registerHook('displayFooterProduct2')

 

I've changed name of the function "hookProductFooter($params)" to "hookdisplayFooterProduct2($params)"

 

And

In product.tpl added {hook h='displayFooterProduct2'}

 

But module does not appear...what I forgot?

Original "Products in the same category" uninstalled. In DB _hook all ok....

If I'll write return "Hello,world!"  in "hookdisplayFooterProduct2" function - it display's in theme

post-812520-0-98918600-1451031942_thumb.jpg

post-812520-0-70799800-1451031944_thumb.jpg

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