diff --git a/admin-dev/ajax.php b/admin-dev/ajax.php index 389855fdd..abc02b7dc 100644 --- a/admin-dev/ajax.php +++ b/admin-dev/ajax.php @@ -240,7 +240,7 @@ if (Tools::isSubmit('ajaxCategoriesPositions')) { if (isset($position) && $category->updatePosition($way, $position)) { - Hook::exec('categoryUpdate'); + Hook::exec('actionCategoryUpdate'); die(true); } else diff --git a/admin-dev/footer.inc.php b/admin-dev/footer.inc.php index cbc320b52..462644c73 100644 --- a/admin-dev/footer.inc.php +++ b/admin-dev/footer.inc.php @@ -27,7 +27,7 @@ echo ' - '.Hook::exec('backOfficeFooter').' + '.Hook::exec('displayBackOfficeFooter').'
'.Tools::displayError('No payment method is available').'
'; return $return; @@ -470,13 +470,13 @@ class OrderOpcControllerCore extends ParentOrderController else { $result = array( - 'HOOK_BEFORECARRIER' => Hook::exec('beforeCarrier', array( + 'HOOK_BEFORECARRIER' => Hook::exec('displayBeforeCarrier', array( 'carriers' => $carriers, 'delivery_option_list' => $this->context->cart->getDeliveryOptionList(), 'delivery_option' => $this->context->cart->getDeliveryOption() )), 'carrier_block' => $this->context->smarty->fetch(_PS_THEME_DIR_.'order-carrier.tpl'), - 'HOOK_EXTRACARRIER' => Hook::exec('extraCarrier', array('address' => $address_delivery)) + 'HOOK_EXTRACARRIER' => Hook::exec('displayCarrierList', array('address' => $address_delivery)) ); return $result; } diff --git a/controllers/front/ParentOrderController.php b/controllers/front/ParentOrderController.php index d49977b73..4b73911a3 100644 --- a/controllers/front/ParentOrderController.php +++ b/controllers/front/ParentOrderController.php @@ -236,7 +236,7 @@ class ParentOrderControllerCore extends FrontController } } - Hook::exec('processCarrier', array('cart' => $this->context->cart)); + Hook::exec('actionCarrierProcess', array('cart' => $this->context->cart)); if (!$this->context->cart->update()) return false; @@ -309,10 +309,12 @@ class ParentOrderControllerCore extends FrontController 'currencySign' => $this->context->currency->sign, 'currencyRate' => $this->context->currency->conversion_rate, 'currencyFormat' => $this->context->currency->format, - 'currencyBlank' => $this->context->currency->blank)); + 'currencyBlank' => $this->context->currency->blank, + )); + $this->context->smarty->assign(array( - 'HOOK_SHOPPING_CART' => Hook::exec('shoppingCart', $summary), - 'HOOK_SHOPPING_CART_EXTRA' => Hook::exec('shoppingCartExtra', $summary) + 'HOOK_SHOPPING_CART' => Hook::exec('displayShoppingCartFooter', $summary), + 'HOOK_SHOPPING_CART_EXTRA' => Hook::exec('displayShoppingCart', $summary) )); } @@ -405,8 +407,8 @@ class ParentOrderControllerCore extends FrontController 'delivery_option' => $this->context->cart->getDeliveryOption() )); $this->context->smarty->assign(array( - 'HOOK_EXTRACARRIER' => Hook::exec('extraCarrier', array('address' => $address)), - 'HOOK_BEFORECARRIER' => Hook::exec('beforeCarrier', array( + 'HOOK_EXTRACARRIER' => Hook::exec('displayCarrierList', array('address' => $address)), + 'HOOK_BEFORECARRIER' => Hook::exec('displayBeforeCarrier', array( 'carriers' => $carriers, 'checked' => $checked, 'delivery_option_list' => $delivery_option_list, @@ -451,8 +453,8 @@ class ParentOrderControllerCore extends FrontController protected function _assignPayment() { $this->context->smarty->assign(array( - 'HOOK_TOP_PAYMENT' => Hook::exec('paymentTop'), - 'HOOK_PAYMENT' => Hook::exec('payment'), + 'HOOK_TOP_PAYMENT' => Hook::exec('displayPaymentTop'), + 'HOOK_PAYMENT' => Hook::exec('displayPayment'), )); } diff --git a/controllers/front/ProductController.php b/controllers/front/ProductController.php index 6ebd21fa9..33f567e17 100644 --- a/controllers/front/ProductController.php +++ b/controllers/front/ProductController.php @@ -178,12 +178,12 @@ class ProductControllerCore extends FrontController 'attachments' => (($this->product->cache_has_attachments) ? $this->product->getAttachments($this->context->language->id) : array()), 'allow_oosp' => $this->product->isAvailableWhenOutOfStock((int)$this->product->out_of_stock), 'last_qties' => (int)Configuration::get('PS_LAST_QTIES'), - 'HOOK_EXTRA_LEFT' => Hook::exec('extraLeft'), - 'HOOK_EXTRA_RIGHT' => Hook::exec('extraRight'), - 'HOOK_PRODUCT_OOS' => Hook::exec('productOutOfStock', array('product' => $this->product)), - 'HOOK_PRODUCT_ACTIONS' => Hook::exec('productActions'), - 'HOOK_PRODUCT_TAB' => Hook::exec('productTab'), - 'HOOK_PRODUCT_TAB_CONTENT' => Hook::exec('productTabContent'), + 'HOOK_EXTRA_LEFT' => Hook::exec('displayLeftColumnProduct'), + 'HOOK_EXTRA_RIGHT' => Hook::exec('displayRightColumnProduct'), + 'HOOK_PRODUCT_OOS' => Hook::exec('actionProductOutOfStock', array('product' => $this->product)), + 'HOOK_PRODUCT_ACTIONS' => Hook::exec('displayProductButtons'), + 'HOOK_PRODUCT_TAB' => Hook::exec('displayProductTab'), + 'HOOK_PRODUCT_TAB_CONTENT' => Hook::exec('displayProductTabContent'), 'display_qties' => (int)Configuration::get('PS_DISPLAY_QTIES'), 'display_ht' => !Tax::excludeTaxeOption(), 'currencySign' => $this->context->currency->sign, @@ -437,7 +437,7 @@ class ProductControllerCore extends FrontController $this->context->smarty->assign('path', Tools::getPath((int)$this->product->id_category_default, $this->product->name)); $this->context->smarty->assign('categories', Category::getHomeCategories($this->context->language->id)); - $this->context->smarty->assign(array('HOOK_PRODUCT_FOOTER' => Hook::exec('productFooter', array('product' => $this->product, 'category' => $category)))); + $this->context->smarty->assign(array('HOOK_PRODUCT_FOOTER' => Hook::exec('displayFooterProduct', array('product' => $this->product, 'category' => $category)))); } public function transformDescriptionWithImg($desc) diff --git a/controllers/front/SearchController.php b/controllers/front/SearchController.php index 8e85bba2f..f45cd8b90 100644 --- a/controllers/front/SearchController.php +++ b/controllers/front/SearchController.php @@ -64,7 +64,7 @@ class SearchControllerCore extends FrontController $this->n = abs((int)(Tools::getValue('n', Configuration::get('PS_PRODUCTS_PER_PAGE')))); $this->p = abs((int)(Tools::getValue('p', 1))); $search = Search::find($this->context->language->id, $query, $this->p, $this->n, $this->orderBy, $this->orderWay); - Hook::exec('search', array('expr' => $query, 'total' => $search['total'])); + Hook::exec('actionSearch', array('expr' => $query, 'total' => $search['total'])); $nbProducts = $search['total']; $this->pagination($nbProducts); $this->context->smarty->assign(array( @@ -81,7 +81,7 @@ class SearchControllerCore extends FrontController $this->n = abs((int)(Tools::getValue('n', Configuration::get('PS_PRODUCTS_PER_PAGE')))); $this->p = abs((int)(Tools::getValue('p', 1))); $search = Search::find($this->context->language->id, $query, $this->p, $this->n, $this->orderBy, $this->orderWay); - Hook::exec('search', array('expr' => $query, 'total' => $search['total'])); + Hook::exec('actionSearch', array('expr' => $query, 'total' => $search['total'])); $nbProducts = $search['total']; $this->pagination($nbProducts); $this->context->smarty->assign(array( @@ -96,7 +96,7 @@ class SearchControllerCore extends FrontController $nbProducts = (int)(Search::searchTag($this->context->language->id, $tag, true)); $this->pagination($nbProducts); $result = Search::searchTag($this->context->language->id, $tag, false, $this->p, $this->n, $this->orderBy, $this->orderWay); - Hook::exec('search', array('expr' => $tag, 'total' => count($result))); + Hook::exec('actionSearch', array('expr' => $tag, 'total' => count($result))); $this->context->smarty->assign(array( 'search_tag' => $tag, 'products' => $result, // DEPRECATED (since to 1.4), not use this: conflict with block_cart module