Banners Addon Tpl Hooks

Does anyone have successfully used the TPL hooks from banners addons ?

I am trying to use the banners:general_content hook that exists inside (design/backend/templates/addons/banners/views/banners/update.tpl) but without any luck.

I have tried to place the hook inside

design/backend/templates/my_changes/hooks/banners/general_content.tpl but it returns a blank page … - No errors in logs

I have successfully created a PHP hook for get_banner_data function but template hooks refuses to work .

Any idea ?

Hello

1 . Have you created your own addon or are you using my_changes ?

2. Are you sure you've put the files in addon that you want to handle hooka tpl? Check the path.

3. Clear cache

4. Remove from the server directly catalog /var/cache

Best regards

Robert

The correct path and file name should be

design/backend/templates/addons/my_changes/hooks/banners/general_content.post.tpl

Hello Again,

Thank you for your responses Ecomlabs , Soft Solid ,

The path was correct just forgot to write down the addon directory.

The general_content.post.tpl and general_content.pre.tpl Hooks not work for some reason ! Just return a blank template.

The solution was to use the general_content.override.tpl and Refresh the Banner Addon from Manage-addons section.

Without refreshing the addon – Clearing the cache from admin panel or deleting the /var/cache folder doesn’t have any result.

Thank you !

It means that some 3rd party addon overrides this hook earlier. Try to temporary disable 3rd party addon and check the result

I had a similar issue with a `scripts.post.tpl` template hook in my own addon, for the addons management section of the backend. I will try the last solution from eComLabs because it sounds to me that that's the problem.

It means that some 3rd party addon overrides this hook earlier. Try to temporary disable 3rd party addon and check the result

If that's the case, how can you deal with another addon competting for the same hook than my addon?

Hello

In you addon.xml set 4294967295

You will be sure that your addon will be loaded last

Best regards

Robert

If that's the case, how can you deal with another addon competting for the same hook than my addon?

Yes, you can add solution from post #8. But do not forget to add template from that addon to your template. E.g.

{if $addons.my_changes.status == 'A'}
    {include file="addons/my_changes/hooks/pages/detailed_description.override.tpl"}
{/if}