O'Reilly logo

PrestaShop Module Development by Fabien Serny

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding a callback to options

One last method I want to introduce you to is onClickOption. This method will permit you to set the JavaScript OnClick trigger on the module's action buttons.

Here are the different action buttons that are compliant with the onClickOption method:

Adding a callback to options

You are probably wondering when we should use the onClickOption method.

This method allows many possibilities. For example, in the case of our module, when the merchant uninstalls the module, it automatically drops the table of comments. When the merchant decides to reinstall the module, he won't retrieve the old comments.

Clicking the uninstall button by mistake is possible. With ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required