Hook Not Showing On Frontend And Don't Know Why

Hi Everyone,

Hoping someone can help me with something as blocking me and no idea why its not playing ball, im upgrading a addon from previous version to the latest but its not showing on the hook.

I added into default_template.tpl

{hook name="products:view_main_info_before_options"}{/hook}

I already checked this does exist in fn.catalog.php in functions so a standard hook

Which is wrapped in the hook:

{hook name="products:view_main_info"}

The PRE tpl is:


But does not seem to be display, anyone know what i might be doing wrong?


May be some 3rd party module uses the products:view_main_info hook and overrides the whole template? And do not forget to clear cache after the new hook is added


please try the following trick. find this code in design/themes/THEME/templates/blocks/product_templates/default.tpl:

{hook name="products:view_main_info"}

and replace with:

{"before hook"|fn_print_r}
{hook name="products:view_main_info"}
{"after hook"|fn_print_r}
then clean up the template cache and reload the page. If both texts (before hook & after hook) are visible, something is wrong about your module or hook name. If 2nd text is not visible, hook view_main_info overwrites the default content. If so, please search for templates design/themes/THEME/templates/addons/ANY_MODULE/hooks/products/view_main_info.override.tpl

[font=Helvetica Neue, Arial, Verdana, sans-serif]Best regards, [/font]WSA team

Thanks for the tip, I am seeing both lots of text.

I have had inconsistent behaviour with hooks being shown. Also check the permissions and ownership of your template file. I am working as root on my virtual machine and need to set ownership for it to be shown.

Even with permissions it is not working. I have noticed sometimes too that if it is a block you are editing and you are not seeing updates. If you change the wrapper on the block, it will refresh.

I still have no consistent method though…

Please make sure that your addon is installed and has the Active status