AbanteCart Community

AbanteCart Development => New Features Discussion => Topic started by: natdroid on July 29, 2015, 05:59:20 AM

Title: hooks
Post by: natdroid on July 29, 2015, 05:59:20 AM
CorDevelopers, please consider adding more hooks to the default template. We need hooks in product_listing, <head> and other pages
It would be a great addition
Title: Re: hooks
Post by: eCommerce Core on August 05, 2015, 08:00:38 AM
Please provide more detailed suggestion and we will add hooks or give you an alternative suggestion
Title: Re: hooks
Post by: natdroid on September 01, 2015, 01:52:26 AM
/storefront/view/default/template/common/page.tpl  hook inside <head> tag

/storefront/view/default/template/pages/product/product_listing.tpl   

/storefront/view/default/template/common/footer.tpl

Title: Re: hooks
Post by: natdroid on September 10, 2015, 07:16:20 AM
admin/view/default/template/pages/sale/order_history.tpl
 hk_order_comment_pre  hook must get triggered somewhere after the foreach loop  :-\
Title: Re: hooks
Post by: eCommerce Core on September 11, 2015, 11:58:00 AM
/storefront/view/default/template/common/page.tpl  hook inside <head> tag

/storefront/view/default/template/pages/product/product_listing.tpl   

/storefront/view/default/template/common/footer.tpl

You do not need hook for the head. You can append to head.tpl template with _post.tpl or simply applied with woking to head.php controller.

Where do you suggest hooks in /storefront/view/default/template/pages/product/product_listing.tpl  or /storefront/view/default/template/common/footer.tpl  ?


Title: Re: hooks
Post by: eCommerce Core on September 11, 2015, 12:03:18 PM
admin/view/default/template/pages/sale/order_history.tpl
 hk_order_comment_pre  hook must get triggered somewhere after the foreach loop  :-\
You are right about this. Updated for 1.2.4

https://github.com/abantecart/abantecart-src/commit/fd05b0f419c2ecebc573795350ef860fcf4ee2b8

Thank you for pointing this out.
Title: Re: hooks
Post by: natdroid on September 13, 2015, 09:08:38 AM
You do not need hook for the head. You can append to head.tpl template with _post.tpl

example Please!



Where do you suggest hooks in /storefront/view/default/template/pages/product/product_listing.tpl  or /storefront/view/default/template/common/footer.tpl  ?

line 48 https://github.com/abantecart/abantecart-src/blob/master/public_html/storefront/view/default/template/pages/product/product_listing.tpl#L48
line 45, line 120, line 25
Title: Re: hooks
Post by: abolabo on September 16, 2015, 04:00:04 PM
You do not need hook for the head. You can append to head.tpl template with _post.tpl

example Please!

1. open main.php file of your extension (see folder extensions/your_ext_txt_id ) and add 'common/head.post.tpl' into array $templates = array('storefront' => ()...
2. create file extensions/your_ext_txt_id/storefront/view/your_ext_txt_id/template/common/head.post.tpl and place some html-code into it.
3. enjoy :)
Title: Re: hooks
Post by: natdroid on November 12, 2015, 01:57:28 AM
thanks. head.post.tpl method work but got a huge problem. We have 3 extensions where head.post.tpl but work only one of them. How to resolve?

Title: Re: hooks
Post by: abolabo on November 12, 2015, 11:00:49 AM
quick solution here https://github.com/abantecart/abantecart-src/commit/0ffc3cfd1d1e64f2cbda2a76b0ecf340ec3adcf4
Fix goes to v.1.2.5 that will be released soon.
Thank you
Title: Re: hooks
Post by: natdroid on November 12, 2015, 11:23:00 AM
amazing speed  ;D thank you.

Could you
plz
add few hooks in 1.2.5 [/size][/color]
to the
https://github.com/abantecart/abantecart-src/blob/master/public_html/storefront/view/default/template/pages/product/product_listing.tpl#L48 (https://github.com/abantecart/abantecart-src/blob/master/public_html/storefront/view/default/template/pages/product/product_listing.tpl#L48)
line 45, line 120, line 25
Title: Re: hooks
Post by: abolabo on November 12, 2015, 11:48:08 AM


Could you
plz
add few hooks in 1.2.5 [/size][/color]
to the
https://github.com/abantecart/abantecart-src/blob/master/public_html/storefront/view/default/template/pages/product/product_listing.tpl#L48 (https://github.com/abantecart/abantecart-src/blob/master/public_html/storefront/view/default/template/pages/product/product_listing.tpl#L48)
line 45, line 120, line 25

are you talking about hookvars, right?
Title: Re: hooks
Post by: natdroid on November 12, 2015, 11:55:09 AM
of course  :)
Title: Re: hooks
Post by: abolabo on November 12, 2015, 12:08:13 PM
of course  :)

https://github.com/abantecart/abantecart-src/commit/40e3aa73416abae88b8d81a93c994a2ff059044a