Synchronize hook reference pages with PrestaShop 9.1 metadata#2131
Conversation
MAX-IT-Tech
commented
Apr 13, 2026
| Questions | Answers |
|---|---|
| Branch? | 9.x |
| Description? | Synchronizes hook reference pages with current PrestaShop 9.1 hook metadata and call examples. Updates origin file paths, aliases normalization, and hook invocation snippets to match current sources. |
| Fixed ticket? | N/A |
kpodemski
left a comment
There was a problem hiding this comment.
First of all, thank you for your work. It seems it was automated, with some manual adjustments, but there are quite a few issues we need to address.
- Many hook aliases were incorrectly modified, this is crucial to fix.
- Quite a few hooks require adjustment in order to indicate that there are placed in multiple files.
- Some hooks were adjusted from
8.0.xto8.2.x, but if they don't exist in9.1.x, it means the code has been moved or removed. - There's a big problem because type of some display hooks was modified, not sure what caused
displaySomethingto be treated as a type: action, maybe something to be fixed in prompt? - Some hooks that are rendered in Smarty were modified to include
;at the end, which also has to change;`; is not needed and likely produces an error/not needed character.
I hope you can adjust the prompt to make the required fixes. I haven't added comments to every file that requires changes. I highly suggest you submit the next changes in a separate commit, without "force pushing" :)
This page is crucial to our developer community, and we need to ensure it contains the correct information.
| type: action | ||
| hookAliases: displayOrderConfirmation |
| file: classes/controller/FrontController.php | ||
| locations: | ||
| - 'front office' | ||
| type: display | ||
| type: action |
| type: action | ||
| hookAliases: displayPaymentReturn |
There was a problem hiding this comment.
wrong path, it is inside src/Adapter/Admin/LegacyBlockHelperSubscriber.php
There was a problem hiding this comment.
hooks is inside multiple files
|
Hello @MAX-IT-Tech I hope you're doing well! Do you plan to finish this contribution? |
Unfortunately, I haven't been able to complete the contribution yet (I'm sick and busy with my day job, so I just don't have the energy right now), but I'll try to do it as soon as I can. I'm just wondering what the best course of action is: should I leave everything as is for now and continue later, or should I cancel the unfinished project and create new PRs based on the updated version of the documentation, PrestaShop, and your comments? Could you please advise me on the best course of action? |
|
No worries, take your time. There's no need to rush. I think it would be great if you could just finalize this pull request. My understanding is that you came up with a good prompt for the AI tool you use, and now it's just a matter of asking it to make a bunch of fixes based on my comments. |
… and call examples
Restore hook aliases and types from PrestaShop 9.1.x sources, update origin files and call snippets from core/theme code, and add multi-file hook placements where needed. Co-authored-by: Cursor <cursoragent@cursor.com>
8228d8a to
31f8da4
Compare
Review fixes (commit 2)Added a second commit on top of the rebased branch to address the review feedback from @kpodemski. What was fixed
Verification
Branch was rebased onto current Happy to walk through any remaining inline threads if something still looks off. |
Repair invalid YAML introduced as `hookTitle: files:` by restoring an empty `hookTitle` field and keeping `files` as a separate key across affected hook pages so Hugo parsing succeeds. Co-authored-by: Cursor <cursoragent@cursor.com>
Apply systematic fixes across hook pages: restore reviewer-requested origins, remove stale paths, align module/theme links to real repositories, normalize metadata consistency, and keep snippets/examples compatible with the current source layout. Co-authored-by: Cursor <cursoragent@cursor.com>
Final systematic pass completedI pushed a final cleanup commit on top of this PR to address reviewer feedback as a pattern-level audit, not line-by-line spot fixes. What was finalized
Verification performed before push
This final update is intended to close the loop on path/link correctness and reduce risk of additional follow-up fixes. |
|
Thank you @MAX-IT-Tech - i'll take a look next week |
Removed unnecessary form handling code from the hook documentation.
Removed unnecessary form handling code from the hook documentation.
Removed unnecessary form handling code from the hook documentation.
…sBefore.md Removed unused form handling code from hook documentation.
Removed commented code and updated hook dispatch syntax.
Removed parameters details section from the hook documentation.
…oller><Method>.md
Added additional parameters to the actionProductPriceCalculation hook call for enhanced functionality.
Update the example of calling the actionShopDataDuplication hook in the documentation.
Fix the hook call logic for validating customer address form.
Removed unnecessary closing tags and block statements.
Added 'id_shop' parameter to the actionUpdateQuantity hook call.
Added new parameters 'check_carrier', 'useOrderPrices', 'isValidatedByModules', and 'isValidatedByModulesError' to the actionValidateCartRule hook call.
Removed the definition of DASHBOARD_ALLOWED_HOOKS and adjusted the constructor method.
Removed the definition of DASHBOARD_ALLOWED_HOOKS and adjusted the constructor.
Updated the hook call to only execute 'displayAfterCarrier' with the cart parameter.
Removed redundant hook call and retained only 'hookDisplayBeforeCarrier'.
Updated the example of calling the hook to use Twig syntax.
Add a null parameter and a true flag to the hook execution.
Add null and true parameters to the filterCmsContent hook call.
Updated the call to the 'filterHtmlContent' hook to include additional parameters.
Added null and true parameters to the Hook execution.
Updated the call to 'filterSupplierContent' hook to include a new parameter.
Added content_only parameter to overrideLayoutTemplate hook call.
Updated code block syntax from Twig to PHP for clarity.
|
Thank you @MAX-IT-Tech There were quite a few issues, but I managed to fix them all, and I've just merged your contribution :) |