2017-10-31 9 views
0

Read Prestashop hooks docを読むと、ドキュメントまたは検索エンジンでフックを実装する方法の例が見つかりませんactionAjaxDie<ControllerName><Method>Before。私は[Prestashop Project]/controllers/front/CartControllers.phpからクラスCartControllersの方法displayAjaxRefresh()actionAjaxDie<ControllerName><Method>Beforeフックを実装したいactionAjaxDie <ControllerName>の名前の例<Method> Prestashopのフックの前に1.7

は、ここに私の場合です。

私のカスタムモジュールのinstall()の方法で:[Prestashop Project]/modules/mymodule/mymodule.php

私は法または小文字の名前や私が予見されていない別の方法で大文字actionAjaxDie<ControllerName><Method>Beforeを実装する必要があればそれは明らかではない。

$this->registerHook('actionAjaxDieCartControllerDisplayAjaxRefreshBefore')

をまたは

$this->registerHook('actionAjaxDieCartControllerdisplayAjaxRefreshBefore')

または他のパターン?

答えて

0

テストした後、それは方法の最初の文字の大文字と連携して動作します。

$this->registerHook('actionAjaxDieCartControllerDisplayAjaxRefreshBefore')

[Prestashop Project]/modules/mymodule/mymodule.phpで、それはメソッドを呼び出します:

actionAjaxDieCartControllerDisplayAjaxRefreshBefore()

関連する問題