Author Topic: hooks  (Read 11333 times)

Offline natdroid

  • Full Member
  • ***
  • Posts: 113
  • Karma: +36/-3
    • View Profile
hooks
« 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

Offline eCommerce Core

  • Administrator
  • Hero Member
  • *****
  • Posts: 1602
  • Karma: +93/-1
    • View Profile
Re: hooks
« Reply #1 on: August 05, 2015, 08:00:38 AM »
Please provide more detailed suggestion and we will add hooks or give you an alternative suggestion
“If you’re in the luckiest one per cent of humanity, you owe it to the rest of humanity to think about the other 99 per cent.”
― Warren Buffett

Offline natdroid

  • Full Member
  • ***
  • Posts: 113
  • Karma: +36/-3
    • View Profile
Re: hooks
« Reply #2 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

« Last Edit: September 10, 2015, 07:17:08 AM by natdroid »

Offline natdroid

  • Full Member
  • ***
  • Posts: 113
  • Karma: +36/-3
    • View Profile
Re: hooks
« Reply #3 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  :-\

Offline eCommerce Core

  • Administrator
  • Hero Member
  • *****
  • Posts: 1602
  • Karma: +93/-1
    • View Profile
Re: hooks
« Reply #4 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  ?


“If you’re in the luckiest one per cent of humanity, you owe it to the rest of humanity to think about the other 99 per cent.”
― Warren Buffett

Offline eCommerce Core

  • Administrator
  • Hero Member
  • *****
  • Posts: 1602
  • Karma: +93/-1
    • View Profile
Re: hooks
« Reply #5 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.
“If you’re in the luckiest one per cent of humanity, you owe it to the rest of humanity to think about the other 99 per cent.”
― Warren Buffett

Offline natdroid

  • Full Member
  • ***
  • Posts: 113
  • Karma: +36/-3
    • View Profile
Re: hooks
« Reply #6 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
« Last Edit: September 14, 2015, 08:08:40 AM by natdroid »

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2046
  • Karma: +318/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: hooks
« Reply #7 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 :)
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline natdroid

  • Full Member
  • ***
  • Posts: 113
  • Karma: +36/-3
    • View Profile
Re: hooks
« Reply #8 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?


Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2046
  • Karma: +318/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: hooks
« Reply #9 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
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline natdroid

  • Full Member
  • ***
  • Posts: 113
  • Karma: +36/-3
    • View Profile
Re: hooks
« Reply #10 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
line 45, line 120, line 25

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2046
  • Karma: +318/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: hooks
« Reply #11 on: November 12, 2015, 11:48:08 AM »
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline natdroid

  • Full Member
  • ***
  • Posts: 113
  • Karma: +36/-3
    • View Profile
Re: hooks
« Reply #12 on: November 12, 2015, 11:55:09 AM »
of course  :)

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2046
  • Karma: +318/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

 

Powered by SMFPacks Social Login Mod