Just wanted to raise an issue in case no one is aware – or perhaps I'm doing something wrong since I'm very new to the platform.
I wanted to create a custom add-on that hooked into the "body" hook, before the hook. So in my add-on directory I created the file:
/var/themes_repository/responsive/templates/addons/my_addon/hooks/index/body.pre.tpl
I'm using the symlink method with the SDK, so I ran
vendor/bin/cscart-sdk addon:symlink my_addon ~/projects/projectname/addons/my_addon public/
vendor/bin/cscart-sdk addon:symlink my_addon ~/projects/projectname/addons/my_addon public/ --templates-to-design
This appeared to symlink everything in the proper place, including my addon.xml file. The add-on shows up for installation, but the template hook never works. I lost hours to this, until I realized that if I manually created the add-on directory in the design/themes/ it *did* work. I tried turning off disabling symlinks in nginx to see if that's the issue but it didn't help.
Strangely, I think this is a deeper issue than just symlinks (maybe?) because if I disable the hook cache in smarty_plugins/block.hook.php by commenting this line out:
// Registry::registerCache($hook_name, ['addons'], Registry::cacheLevel(['static', 'storefront']));