Jump to content

[SOLVED]how to custom blockuserinfo


Recommended Posts

Hi ,

i am trying the custom hook , i follow these steps , my objective is i am trying to display PART OF "top"
hook. I do not want the DEFAULT currencies , the language , the search ... and most important i want to try the "custom hook"

so I ...

1. add a record in database table ps_hook , ('userInfo' , 'kalmen user information block' , description =' ' , position= 0 )

2. i added 'HOOK_USERBLOCK'=> Module::hookExec('userInfo') to my smarty array in index.php

3. i added OR !$this->registerHook('userInfo') to module ,in blockuserinfo.php

and the function function hookUserInfo($params)

4. and then i goto my index.tpl and added {$HOOK_USERBLOCK}

expecting the whole blockuserinfo.tpl will display into the index.tpl BUT NO LUCK !

I have tried to take special care on the code convention , such as case sensitive , but i am NOT very sure
whether i have done it correctly.

Can anyone share with me what am i missing ?

By the way do i required to add another records to ps_hook_module ?

best regards,

Share this post

Link to post
Share on other sites

Hi all ,

I have tested and finally got this to work, the missing step was to go to

Backoffice and use the transplant module and set the relationship of hook and module.

Hope that will help someone.


Share this post

Link to post
Share on other sites

  • 1 month later...

hey guys,

help required with the positioning topic....
struggling to figure this out...
if anyone can point me in the right direction

See attached picture...

looking to move that info from the RED block to the yellow Block.....


Share this post

Link to post
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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More