Conversation
8d39ed6 to
e2c52e5
Compare
|
Wouldn't it be better if you could change the $menu variable instead? With this solution, you can display things only after the list, but cannot modify the items. |
I like this Idea |
e2c52e5 to
b0601c8
Compare
|
Sorry, I lost the thread! Yes it's ok for me :) You will need to add the new hook on the core side (in hook.xml file) |
|
@M0rgan01 I think we shouldn't, the core should include no data or references to any modules I think. |
|
I thought that was the case :) Everything is good |
|
Hi @bibips Thank you for your PR, I tested it and unfortunately this one doesn't works as expected as you can see : Indeed, the "use Hook;" doesn't seems to works and, because of that, the hook isn't accessible Thank you |
b0601c8 to
f775adb
Compare
|
@AureRita Excuse me for the delay, I've removed |
|
This would be a great addition for external modules to be able to add links to the main menu. |
Hlavtox
left a comment
There was a problem hiding this comment.
I don't see much value in this… isn't the sole purpose of menu that it's purely configurable by people?
Do you have any real use case for this hook?
The explained use case makes sense to me and there are probably many others. The implementation is also ok so I dismiss your blocker for now @Hlavtox.
If you are other worries don't hesitate to re-review
|
Hello @bibips, I tried to test your PR, but I'm not sure I understood the steps to reproduce correctly. Can you please explain the steps to reproduce more precisely? Thanks for your feedback! |
|
@paulnoelcholot I have created a module that use this new hook for your test. Thanks this module you can see a new menu item only if a customer is connected. |
Hlavtox
left a comment
There was a problem hiding this comment.
You also need to change config.xml if you are bumping version.
Thanks this hook it's possible to alter main menu. For instance you can display menu items per customer or per group of customer
f775adb to
ff78da0
Compare
|
@Hlavtox It's fixed |
|
Hello @bibips, I tested your PR and it's good for me! Thanks! |
|
PR merged, well done! Message to @PrestaShop/committers: do not forget to milestone it before the merge. |
|
Thanks @bibips! |



actionMainMenuModifier.Thanks this hook it's possible to have menu items specific per customer by example.
actionMainMenuModifierand add or edit something into main menuHook usage :