Please help us to make AbanteCart Ideal Open Source Ecommerce Solution for everyone.

Support AbanteCart eCommerce

Author Topic: hooks  (Read 11849 times)

natdroid

  • Guest
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 eCommerce Core

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

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2050
  • Karma: +320/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: hooks
« Reply #4 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 abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2050
  • Karma: +320/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: hooks
« Reply #5 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 abolabo

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

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2050
  • Karma: +320/-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