Synchronize hook reference pages with PrestaShop 9.1 metadata#2131
Synchronize hook reference pages with PrestaShop 9.1 metadata#2131MAX-IT-Tech wants to merge 4 commits into
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.
There was a problem hiding this comment.
The filename is wrong on this one. It should point to classes/controller/AdminController.php on 9.1.x branch
There was a problem hiding this comment.
The filename is wrong on this one. It should point to classes/controller/AdminController.php on 9.1.x branch
There was a problem hiding this comment.
This file doesn't exist anymore, and this hook is used in AdminController
| hookTitle: | ||
| files: | ||
| - | ||
| url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Product/AdminProductDataProvider.php' |
There was a problem hiding this comment.
To be deleted, hook doesn't exist anymore. There's actionAjaxDie inside classes/controller/Controller.php
| 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 |