How to add new (own) hook in TPL


I need to add new hook in some tpl (/customers/views/orders/details.tpl) for examples in section Shipments:

{hook name=“orders:my_shipments”}

… old code


Is it a good solution? If I create file my_shipments.pre.tpl in my addon /skins/customers/addons/some_my_addons/hooks/orders/ directory it will be working? If no, how can I add my new hook in some tpl.

(sorry for my english…)


Yes, you are correct. Using 'pre' will 'prepend' you code. If you want to replace the old code, use 'override'.

Always best to add a comment that you added the hook since it makes it easier to resolve future conflicts. I.e.

{* Hook horders:my_shipments added on 1/27/13 by Frank Tank *}

The path to your file must match an actual addon that is installed and active. I.e.


'some_my_addons' must be an installed and active addon. Suggest you just use 'my_changes' till you become more familiar.