[*] PROJECT : New Module API (part 1)

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9790 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
fSerny
2011-11-02 10:49:01 +00:00
parent 953cb8b872
commit 0ba4fe9c7e
53 changed files with 640 additions and 339 deletions
+173 -85
View File
@@ -1,91 +1,179 @@
SET NAMES 'utf8';
INSERT INTO `PREFIX_hook_alias` (`id_hook_alias`, `name`, `alias`) VALUES
(1, 'displayPayment', 'payment'),
(2, 'actionValidateOrder', 'newOrder'),
(3, 'actionPaymentConfirmation', 'paymentConfirm'),
(4, 'displayPaymentReturn', 'paymentReturn'),
(5, 'actionUpdateQuantity', 'updateQuantity'),
(6, 'displayRightColumn', 'rightColumn'),
(7, 'displayLeftColumn', 'leftColumn'),
(8, 'displayHome', 'home'),
(9, 'displayHeader', 'header'),
(10, 'actionCartSave', 'cart'),
(11, 'actionAuthentication', 'authentication'),
(12, 'actionProductAdd', 'addproduct'),
(13, 'actionProductUpdate', 'updateproduct'),
(14, 'displayTop', 'top'),
(15, 'displayRightColumnProduct', 'extraRight'),
(16, 'actionProductDelete', 'deleteproduct'),
(17, 'displayFooterProduct', 'productfooter'),
(18, 'displayInvoice', 'invoice'),
(19, 'actionOrderStatusUpdate', 'updateOrderStatus'),
(20, 'displayAdminOrder', 'adminOrder'),
(21, 'displayFooter', 'footer'),
(22, 'displayPDFInvoice', 'PDFInvoice'),
(23, 'displayAdminCustomers', 'adminCustomers'),
(24, 'displayOrderConfirmation', 'orderConfirmation'),
(25, 'actionCustomerAccountAdd', 'createAccount'),
(26, 'displayCustomerAccount', 'customerAccount'),
(27, 'actionOrderSlipAdd', 'orderSlip'),
(28, 'displayProductTab', 'productTab'),
(29, 'displayProductTabContent', 'productTabContent'),
(30, 'displayShoppingCartFooter', 'shoppingCart'),
(31, 'displayCustomerAccountForm', 'createAccountForm'),
(32, 'displayAdminStatsModules', 'AdminStatsModules'),
(33, 'displayAdminStatsGraphEngine', 'GraphEngine'),
(34, 'actionOrderReturn', 'orderReturn'),
(35, 'displayProductButtons', 'productActions'),
(36, 'displayBackOfficeHome', 'backOfficeHome'),
(37, 'displayAdminStatsGridEngine', 'GridEngine'),
(38, 'actionWatermark', 'watermark'),
(39, 'actionProductCancel', 'cancelProduct'),
(40, 'displayLeftColumnProduct', 'extraLeft'),
(41, 'actionProductOutOfStock', 'productOutOfStock'),
(42, 'actionProductAttributeUpdate', 'updateProductAttribute'),
(43, 'displayCarrierList', 'extraCarrier'),
(44, 'displayShoppingCart', 'shoppingCartExtra'),
(45, 'actionSearch', 'search'),
(46, 'displayBeforePayment', 'backBeforePayment'),
(47, 'actionCarrierUpdate', 'updateCarrier'),
(48, 'actionOrderStatusPostUpdate', 'postUpdateOrderStatus'),
(49, 'displayCustomerAccountFormTop', 'createAccountTop'),
(50, 'displayBackOfficeHeader', 'backOfficeHeader'),
(51, 'displayBackOfficeTop', 'backOfficeTop'),
(52, 'displayBackOfficeFooter', 'backOfficeFooter'),
(53, 'actionProductAttributeDelete', 'deleteProductAttribute'),
(54, 'actionCarrierProcess', 'processCarrier'),
(55, 'actionOrderDetail', 'orderDetail'),
(56, 'displayBeforeCarrier', 'beforeCarrier'),
(57, 'displayOrderDetail', 'orderDetailDisplayed'),
(58, 'actionPaymentCCAdd', 'paymentCCAdded'),
(59, 'displayProductComparison', 'extraProductComparison'),
(60, 'actionCategoryAdd', 'categoryAddition'),
(61, 'actionCategoryUpdate', 'categoryUpdate'),
(62, 'actionCategoryDelete', 'categoryDeletion'),
(63, 'actionBeforeAuthentication', 'beforeAuthentication'),
(64, 'displayPaymentTop', 'paymentTop'),
(65, 'actionHtaccessCreate', 'afterCreateHtaccess'),
(66, 'actionAdminMetaSave', 'afterSaveAdminMeta'),
(67, 'displayAttributeGroupForm', 'attributeGroupForm'),
(68, 'actionAttributeGroupSave', 'afterSaveAttributeGroup'),
(69, 'actionAttributeGroupDelete', 'afterDeleteAttributeGroup'),
(70, 'displayFeatureForm', 'featureForm'),
(71, 'actionFeatureSave', 'afterSaveFeature'),
(72, 'actionFeatureDelete', 'afterDeleteFeature'),
(73, 'actionProductSave', 'afterSaveProduct'),
(74, 'actionProductListOverride', 'productListAssign'),
(75, 'displayAttributeGroupPostProcess', 'postProcessAttributeGroup'),
(76, 'displayFeaturePostProcess', 'postProcessFeature'),
(77, 'displayFeatureValueForm', 'featureValueForm'),
(78, 'displayFeatureValuePostProcess', 'postProcessFeatureValue'),
(79, 'actionFeatureValueDelete', 'afterDeleteFeatureValue'),
(80, 'actionFeatureValueSave', 'afterSaveFeatureValue'),
(81, 'displayAttributeForm', 'attributeForm'),
(82, 'actionAttributePostProcess', 'postProcessAttribute'),
(83, 'actionAttributeDelete', 'afterDeleteAttribute'),
(84, 'actionAttributeSave', 'afterSaveAttribute'),
(85, 'actionTaxManager', 'taxManager');
INSERT INTO `PREFIX_hook` (`id_hook`, `name`, `title`, `description`, `position`, `live_edit`) VALUES
(1, 'payment', 'Payment', NULL, 1, 1),
(2, 'newOrder', 'New orders', NULL, 0, 0),
(3, 'paymentConfirm', 'Payment confirmation', NULL, 0, 0),
(4, 'paymentReturn', 'Payment return', NULL, 0, 0),
(5, 'updateQuantity', 'Quantity update', 'Quantity is updated only when the customer effectively <b>place</b> his order.', 0, 0),
(6, 'rightColumn', 'Right column blocks', NULL, 1, 1),
(7, 'leftColumn', 'Left column blocks', NULL, 1, 1),
(8, 'home', 'Homepage content', NULL, 1, 1),
(9, 'header', 'Header of pages', 'A hook which allow you to do things in the header of each pages', 1, 0),
(10, 'cart', 'Cart creation and update', NULL, 0, 0),
(11, 'authentication', 'Successful customer authentication', NULL, 0, 0),
(12, 'addproduct', 'Product creation', NULL, 0, 0),
(13, 'updateproduct', 'Product Update', NULL, 0, 0),
(14, 'top', 'Top of pages', 'A hook which allow you to do things a the top of each pages.', 1, 0),
(15, 'extraRight', 'Extra actions on the product page (right column).', NULL, 0, 0),
(16, 'deleteproduct', 'Product deletion', 'This hook is called when a product is deleted', 0, 0),
(17, 'productfooter', 'Product footer', 'Add new blocks under the product description', 1, 1),
(18, 'invoice', 'Invoice', 'Add blocks to invoice (order)', 1, 0),
(19, 'updateOrderStatus', 'Order''s status update event', 'Launch modules when the order''s status of an order change.', 0, 0),
(20, 'adminOrder', 'Display in Back-Office, tab AdminOrder', 'Launch modules when the tab AdminOrder is displayed on back-office.', 0, 0),
(21, 'footer', 'Footer', 'Add block in footer', 1, 0),
(22, 'PDFInvoice', 'PDF Invoice', 'Allow the display of extra informations into the PDF invoice', 0, 0),
(23, 'adminCustomers', 'Display in Back-Office, tab AdminCustomers', 'Launch modules when the tab AdminCustomers is displayed on back-office.', 0, 0),
(24, 'orderConfirmation', 'Order confirmation page', 'Called on order confirmation page', 0, 0),
(25, 'createAccount', 'Successful customer create account', 'Called when new customer create account successfuled', 0, 0),
(26, 'customerAccount', 'Customer account page display in front office', 'Display on page account of the customer', 1, 0),
(27, 'orderSlip', 'Called when a order slip is created', 'Called when a quantity of one product change in an order.', 0, 0),
(28, 'productTab', 'Tabs on product page', 'Called on order product page tabs', 0, 0),
(29, 'productTabContent', 'Content of tabs on product page', 'Called on order product page tabs', 0, 0),
(30, 'shoppingCart', 'Shopping cart footer', 'Display some specific informations on the shopping cart page', 0, 0),
(31, 'createAccountForm', 'Customer account creation form', 'Display some information on the form to create a customer account', 1, 0),
(32, 'AdminStatsModules','Stats - Modules', NULL, 1, 0),
(33, 'GraphEngine','Graph Engines', NULL, 0, 0),
(34, 'orderReturn','Product returned', NULL, 0, 0),
(35, 'productActions', 'Product actions', 'Put new action buttons on product page', 1, 0),
(36, 'backOfficeHome', 'Administration panel homepage', NULL, 1, 0),
(37, 'GridEngine','Grid Engines', NULL, 0, 0),
(38, 'watermark','Watermark', NULL, 0, 0),
(39, 'cancelProduct', 'Product cancelled', 'This hook is called when you cancel a product in an order', 0, 0),
(40, 'extraLeft', 'Extra actions on the product page (left column).', NULL, 0, 0),
(41, 'productOutOfStock', 'Product out of stock', 'Make action while product is out of stock', 1, 0),
(42, 'updateProductAttribute', 'Product attribute update', NULL, 0, 0),
(43, 'extraCarrier', 'Extra carrier (module mode)', NULL, 0, 0),
(44, 'shoppingCartExtra', 'Shopping cart extra button', 'Display some specific informations', 1, 0),
(45, 'search', 'Search', NULL, 0, 0),
(46, 'backBeforePayment', 'Redirect in order process', 'Redirect user to the module instead of displaying payment modules', 0, 0),
(47, 'updateCarrier', 'Carrier Update', 'This hook is called when a carrier is updated', 0, 0),
(48, 'postUpdateOrderStatus', 'Post update of order status', NULL, 0, 0),
(49, 'createAccountTop', 'Block above the form for create an account', NULL, 1, 0),
(50, 'backOfficeHeader', 'Administration panel header', NULL , 0, 0),
(51, 'backOfficeTop', 'Administration panel hover the tabs', NULL , 1, 0),
(52, 'backOfficeFooter', 'Administration panel footer', NULL , 1, 0),
(53, 'deleteProductAttribute', 'Product Attribute Deletion', NULL, 0, 0),
(54, 'processCarrier', 'Carrier Process', NULL, 0, 0),
(55, 'orderDetail', 'Order Detail', 'To set the follow-up in smarty when order detail is called', 0, 0),
(56, 'beforeCarrier', 'Before carrier list', 'This hook is display before the carrier list on Front office', 1, 0),
(57, 'orderDetailDisplayed', 'Order detail displayed', 'Displayed on order detail on front office', 1, 0),
(58, 'paymentCCAdded', 'Payment CC added', 'Payment CC added', 0, 0),
(59, 'extraProductComparison', 'Extra Product Comparison', 'Extra Product Comparison', 0, 0),
(60, 'categoryAddition', 'Category creation', '', 0, 0),
(61, 'categoryUpdate', 'Category modification', '', 0, 0),
(62, 'categoryDeletion', 'Category removal', '', 0, 0),
(63, 'beforeAuthentication', 'Before Authentication', 'Before authentication', 0, 0),
(64, 'paymentTop', 'Top of payment page', 'Top of payment page', 0, 0),
(65, 'afterCreateHtaccess', 'After htaccess creation', 'After htaccess creation', 0, 0),
(66, 'afterSaveAdminMeta', 'After save configuration in AdminMeta', 'After save configuration in AdminMeta', 0, 0),
(67, 'attributeGroupForm', 'Add fileds to the form "attribute group"', 'Add fileds to the form "attribute group"', 0, 0),
(68, 'afterSaveAttributeGroup', 'On saving attribute group', 'On saving attribute group', 0, 0),
(69, 'afterDeleteAttributeGroup', 'On deleting attribute group', 'On deleting attribute group', 0, 0),
(70, 'featureForm', 'Add fields to the form "feature"', 'Add fields to the form "feature"', 0, 0),
(71, 'afterSaveFeature', 'On saving attribute feature', 'On saving attribute feature', 0, 0),
(72, 'afterDeleteFeature', 'On deleting attribute feature', 'On deleting attribute feature', 0, 0),
(73, 'afterSaveProduct', 'On saving products', 'On saving products', 0, 0),
(74, 'productListAssign', 'Assign product list to a category', 'Assign product list to a category', 0, 0),
(75, 'postProcessAttributeGroup', 'On post-process in admin attribute group', 'On post-process in admin attribute group', 0, 0),
(76, 'postProcessFeature', 'On post-process in admin feature', 'On post-process in admin feature', 0, 0),
(77, 'featureValueForm', 'Add fileds to the form "feature value"', 'Add fileds to the form "feature value"', 0, 0),
(78, 'postProcessFeatureValue', 'On post-process in admin feature value', 'On post-process in admin feature value', 0, 0),
(79, 'afterDeleteFeatureValue', 'On deleting attribute feature value', 'On deleting attribute feature value', 0, 0),
(90, 'afterSaveFeatureValue', 'On saving attribute feature value', 'On saving attribute feature value', 0, 0),
(91, 'attributeForm', 'Add fileds to the form "feature value"', 'Add fileds to the form "feature value"', 0, 0),
(92, 'postProcessAttribute', 'On post-process in admin feature value', 'On post-process in admin feature value', 0, 0),
(93, 'afterDeleteAttribute', 'On deleting attribute feature value', 'On deleting attribute feature value', 0, 0),
(94, 'afterSaveAttribute', 'On saving attribute feature value', 'On saving attribute feature value', 0, 0),
(95, 'taxManager', 'Tax Manager Factory', '' , 0, 0);
(1, 'displayPayment', 'Payment', NULL, 1, 1),
(2, 'actionValidateOrder', 'New orders', NULL, 0, 0),
(3, 'actionPaymentConfirmation', 'Payment confirmation', NULL, 0, 0),
(4, 'displayPaymentReturn', 'Payment return', NULL, 0, 0),
(5, 'actionUpdateQuantity', 'Quantity update', 'Quantity is updated only when the customer effectively <b>place</b> his order.', 0, 0),
(6, 'displayRightColumn', 'Right column blocks', NULL, 1, 1),
(7, 'displayLeftColumn', 'Left column blocks', NULL, 1, 1),
(8, 'displayHome', 'Homepage content', NULL, 1, 1),
(9, 'displayHeader', 'Header of pages', 'A hook which allow you to do things in the header of each pages', 1, 0),
(10, 'actionCartSave', 'Cart creation and update', NULL, 0, 0),
(11, 'actionAuthentication', 'Successful customer authentication', NULL, 0, 0),
(12, 'actionProductAdd', 'Product creation', NULL, 0, 0),
(13, 'actionProductUpdate', 'Product Update', NULL, 0, 0),
(14, 'displayTop', 'Top of pages', 'A hook which allow you to do things a the top of each pages.', 1, 0),
(15, 'displayRightColumnProduct', 'Extra actions on the product page (right column).', NULL, 0, 0),
(16, 'actionProductDelete', 'Product deletion', 'This hook is called when a product is deleted', 0, 0),
(17, 'displayFooterProduct', 'Product footer', 'Add new blocks under the product description', 1, 1),
(18, 'displayInvoice', 'Invoice', 'Add blocks to invoice (order)', 1, 0),
(19, 'actionOrderStatusUpdate', 'Order''s status update event', 'Launch modules when the order''s status of an order change.', 0, 0),
(20, 'displayAdminOrder', 'Display in Back-Office, tab AdminOrder', 'Launch modules when the tab AdminOrder is displayed on back-office.', 0, 0),
(21, 'displayFooter', 'Footer', 'Add block in footer', 1, 0),
(22, 'displayPDFInvoice', 'PDF Invoice', 'Allow the display of extra informations into the PDF invoice', 0, 0),
(23, 'displayAdminCustomers', 'Display in Back-Office, tab AdminCustomers', 'Launch modules when the tab AdminCustomers is displayed on back-office.', 0, 0),
(24, 'displayOrderConfirmation', 'Order confirmation page', 'Called on order confirmation page', 0, 0),
(25, 'actionCustomerAccountAdd', 'Successful customer create account', 'Called when new customer create account successfuled', 0, 0),
(26, 'displayCustomerAccount', 'Customer account page display in front office', 'Display on page account of the customer', 1, 0),
(27, 'actionOrderSlipAdd', 'Called when a order slip is created', 'Called when a quantity of one product change in an order.', 0, 0),
(28, 'displayProductTab', 'Tabs on product page', 'Called on order product page tabs', 0, 0),
(29, 'displayProductTabContent', 'Content of tabs on product page', 'Called on order product page tabs', 0, 0),
(30, 'displayShoppingCartFooter', 'Shopping cart footer', 'Display some specific informations on the shopping cart page', 0, 0),
(31, 'displayCustomerAccountForm', 'Customer account creation form', 'Display some information on the form to create a customer account', 1, 0),
(32, 'displayAdminStatsModules','Stats - Modules', NULL, 1, 0),
(33, 'displayAdminStatsGraphEngine','Graph Engines', NULL, 0, 0),
(34, 'actionOrderReturn','Product returned', NULL, 0, 0),
(35, 'displayProductButtons', 'Product actions', 'Put new action buttons on product page', 1, 0),
(36, 'displayBackOfficeHome', 'Administration panel homepage', NULL, 1, 0),
(37, 'displayAdminStatsGridEngine','Grid Engines', NULL, 0, 0),
(38, 'actionWatermark','Watermark', NULL, 0, 0),
(39, 'actionProductCancel', 'Product cancelled', 'This hook is called when you cancel a product in an order', 0, 0),
(40, 'displayLeftColumnProduct', 'Extra actions on the product page (left column).', NULL, 0, 0),
(41, 'actionProductOutOfStock', 'Product out of stock', 'Make action while product is out of stock', 1, 0),
(42, 'actionProductAttributeUpdate', 'Product attribute update', NULL, 0, 0),
(43, 'displayCarrierList', 'Extra carrier (module mode)', NULL, 0, 0),
(44, 'displayShoppingCart', 'Shopping cart extra button', 'Display some specific informations', 1, 0),
(45, 'actionSearch', 'Search', NULL, 0, 0),
(46, 'displayBeforePayment', 'Redirect in order process', 'Redirect user to the module instead of displaying payment modules', 0, 0),
(47, 'actionCarrierUpdate', 'Carrier Update', 'This hook is called when a carrier is updated', 0, 0),
(48, 'actionOrderStatusPostUpdate', 'Post update of order status', NULL, 0, 0),
(49, 'displayCustomerAccountFormTop', 'Block above the form for create an account', NULL, 1, 0),
(50, 'displayBackOfficeHeader', 'Administration panel header', NULL , 0, 0),
(51, 'displayBackOfficeTop', 'Administration panel hover the tabs', NULL , 1, 0),
(52, 'displayBackOfficeFooter', 'Administration panel footer', NULL , 1, 0),
(53, 'actionProductAttributeDelete', 'Product Attribute Deletion', NULL, 0, 0),
(54, 'actionCarrierProcess', 'Carrier Process', NULL, 0, 0),
(55, 'actionOrderDetail', 'Order Detail', 'To set the follow-up in smarty when order detail is called', 0, 0),
(56, 'displayBeforeCarrier', 'Before carrier list', 'This hook is display before the carrier list on Front office', 1, 0),
(57, 'displayOrderDetail', 'Order detail displayed', 'Displayed on order detail on front office', 1, 0),
(58, 'actionPaymentCCAdd', 'Payment CC added', 'Payment CC added', 0, 0),
(59, 'displayProductComparison', 'Extra Product Comparison', 'Extra Product Comparison', 0, 0),
(60, 'actionCategoryAdd', 'Category creation', '', 0, 0),
(61, 'actionCategoryUpdate', 'Category modification', '', 0, 0),
(62, 'actionCategoryDelete', 'Category removal', '', 0, 0),
(63, 'actionBeforeAuthentication', 'Before Authentication', 'Before authentication', 0, 0),
(64, 'displayPaymentTop', 'Top of payment page', 'Top of payment page', 0, 0),
(65, 'actionHtaccessCreate', 'After htaccess creation', 'After htaccess creation', 0, 0),
(66, 'actionAdminMetaSave', 'After save configuration in AdminMeta', 'After save configuration in AdminMeta', 0, 0),
(67, 'displayAttributeGroupForm', 'Add fileds to the form "attribute group"', 'Add fileds to the form "attribute group"', 0, 0),
(68, 'actionAttributeGroupSave', 'On saving attribute group', 'On saving attribute group', 0, 0),
(69, 'actionAttributeGroupDelete', 'On deleting attribute group', 'On deleting attribute group', 0, 0),
(70, 'displayFeatureForm', 'Add fields to the form "feature"', 'Add fields to the form "feature"', 0, 0),
(71, 'actionFeatureSave', 'On saving attribute feature', 'On saving attribute feature', 0, 0),
(72, 'actionFeatureDelete', 'On deleting attribute feature', 'On deleting attribute feature', 0, 0),
(73, 'actionProductSave', 'On saving products', 'On saving products', 0, 0),
(74, 'actionProductListOverride', 'Assign product list to a category', 'Assign product list to a category', 0, 0),
(75, 'displayAttributeGroupPostProcess', 'On post-process in admin attribute group', 'On post-process in admin attribute group', 0, 0),
(76, 'displayFeaturePostProcess', 'On post-process in admin feature', 'On post-process in admin feature', 0, 0),
(77, 'displayFeatureValueForm', 'Add fileds to the form "feature value"', 'Add fileds to the form "feature value"', 0, 0),
(78, 'displayFeatureValuePostProcess', 'On post-process in admin feature value', 'On post-process in admin feature value', 0, 0),
(79, 'actionFeatureValueDelete', 'On deleting attribute feature value', 'On deleting attribute feature value', 0, 0),
(90, 'actionFeatureValueSave', 'On saving attribute feature value', 'On saving attribute feature value', 0, 0),
(91, 'displayAttributeForm', 'Add fileds to the form "feature value"', 'Add fileds to the form "feature value"', 0, 0),
(92, 'actionAttributePostProcess', 'On post-process in admin feature value', 'On post-process in admin feature value', 0, 0),
(93, 'actionAttributeDelete', 'On deleting attribute feature value', 'On deleting attribute feature value', 0, 0),
(94, 'actionAttributeSave', 'On saving attribute feature value', 'On saving attribute feature value', 0, 0),
(95, 'actionTaxManager', 'Tax Manager Factory', '' , 0, 0);
INSERT INTO `PREFIX_configuration` (`id_configuration`, `name`, `value`, `date_add`, `date_upd`) VALUES
(1, 'PS_LANG_DEFAULT', '1', NOW(), NOW()),