Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Hook Not Showing On Frontend And Don't Know Why Rate Topic   - - - - -

 
  • hostandname
  • Senior Member
  • Members
  • Join Date: 05-Jan 06
  • 199 posts

Posted 25 June 2015 - 11:13 AM #1

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:

design/themes/theme/templates/addons/specific_development/hooks/products/view_main_info_before_options.pre.tpl

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

Thanks

Host & Name Ltd - your reliable & trustworthy media provider (www.hostandname.co.uk)
Approved CS-Cart Developers and Official CS-Cart Licensing Supplier
Web Hosting | Cloud Hosting | Dedicated Servers | VPS | Domains | Emails | Design | Development | Marketing | Management


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 20934 posts

Posted 25 June 2015 - 01:28 PM #2

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
GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 

Posted 25 June 2015 - 05:12 PM #3

hi,

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

Best regards, WSA team

 
  • natewallis
  • Senior Member
  • Members
  • Join Date: 11-Jan 13
  • 221 posts

Posted 26 June 2015 - 12:31 AM #4

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..

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 20934 posts

Posted 26 June 2015 - 09:33 AM #5

Please make sure that your addon is installed and has the Active status
GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)