Custom Addons Not Displaying In Storefront

Hi everyone. I am a newbie in CS-Cart but I have read the documentation and also manage to re-created the example addons. Now I am trying to create a new addon from scratch. I managed to show my addon in admin panel and now displaying as a table but I want it to be a custom block for my storefront.

Heres the list that I manage to do so far

app
my_addons
├── controllers

│└── common

│ └── index.post.php

├── addon.xml

├── func.php

├── init.php

└── schemas

└── block_manager

└── blocks.post.php


design/themes/my_template/templates/addons

my_addons

└── hooks

└── index

└── index.post.tpl


When I try to do print_r something in my controllers its showing in the homepage. As of now im just trying to pass a static data just to test if i am passing at the right view using Tygh::$app['view']->assign('my_variables', $my_variables); but it seems not working. I also tried using displaying in blocks-> index -> index.post.tpl but still now showing any data. Can anyone help me what i am doing wrong here?

Thanks in advance!

I do not see index:index hook on the clean installation.

For example, try to use index:content

design/themes/my_template/templates/addons/my_addons/hooks/index/content.post.tpl

As alternative, you can use static blocks. Just create new template here

design/themes/my_template/templates/addons/my_addons/blocks/static_templates/my_block.tpl

Them clear cache. New block will be available in the list of blocks with templates

http://prntscr.com/mhwfs8

I do not see index:index hook on the clean installation.

For example, try to use index:content

design/themes/my_template/templates/addons/my_addons/hooks/index/content.post.tpl

As alternative, you can use static blocks. Just create new template here

design/themes/my_template/templates/addons/my_addons/blocks/static_templates/my_block.tpl

Them clear cache. New block will be available in the list of blocks with templates

http://prntscr.com/mhwfs8

Great! Thanks for this just by changing the "index.post.tpl" into "content.post.tpl" its now working. Can I know how you know what hooks to use? Is there a documentation for this?

Please take a look

https://helpdesk.cs-cart.com/api

Not sure if they update it regularly

I ran into this kind of trouble sometime ago, all i did was to clear cache after days of thinking something major went wrong.. hope it helps