Skip to content

Commit

Permalink
Merge pull request PrestaShop#22447 from Hlavtox/patch-4
Browse files Browse the repository at this point in the history
Add hook to display information in category header
  • Loading branch information
PululuK authored Dec 17, 2020
2 parents 18b0dbc + afd087b commit b83ebd7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions install-dev/data/xml/hook.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2655,6 +2655,11 @@
<title>Category footer</title>
<description>This hook adds new blocks under the products listing in a category/search</description>
</hook>
<hook id="displayHeaderCategory">
<name>displayHeaderCategory</name>
<title>Category header</title>
<description>This hook adds new blocks above the products listing in a category/search</description>
</hook>
<hook id="actionAdminAdministrationControllerPostProcessBefore">
<name>actionAdminAdministrationControllerPostProcessBefore</name>
<title>On post-process in Admin Configure Advanced Parameters Administration Controller</title>
Expand Down
1 change: 1 addition & 0 deletions install-dev/upgrade/sql/1.7.8.0.sql
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ INSERT IGNORE INTO `PREFIX_hook` (`id_hook`, `name`, `title`, `description`, `po
(NULL, 'actionModuleUninstallAfter', 'Module uninstall after', 'This hook is called at the end of module uninstall process', '1'),
(NULL, 'displayCartModalContent', 'Cart Presenter', 'This hook displays content in the middle of the window that appears after adding product to cart', '1'),
(NULL, 'displayCartModalFooter', 'Cart Presenter', 'This hook displays content in the bottom of window that appears after adding product to cart', '1'),
(NULL, 'displayHeaderCategory', 'Category header', 'This hook adds new blocks above the products listing in a category/search', '1'),
(NULL, 'actionCheckoutRender', 'Checkout process render', 'This hook is called when checkout process is constructed', '1'),
(NULL, 'actionPresentProductListing', 'Product Listing Presenter', 'This hook is called before a product listing is presented', '1'),
(NULL, 'actionGetProductPropertiesAfterUnitPrice', 'Product Properties', 'This hook is called after defining the properties of a product', '1'),
Expand Down
2 changes: 2 additions & 0 deletions themes/classic/templates/catalog/listing/product-list.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
{include file='catalog/_partials/subcategories.tpl' subcategories=$subcategories}
{/if}
{/block}

{hook h="displayHeaderCategory"}

<section id="products">
{if $listing.products|count}
Expand Down

0 comments on commit b83ebd7

Please sign in to comment.