Hooking

Hooking is a concept in programming that deals with control flow. A hook is just a special place in the source code that serves as an entry point for some external code.

Thanks to this technique, you can create an add-on and hook it to the necessary part of code. As a result, your add-on will work without affecting the core functionality.

A great practical example of hook usage is provided in the Advanced Add-on Tutorial.

CS-Cart uses two kinds of hooks—in the source code (PHP hooks) and in the templates (TPL hooks). In this section you can find both hook types explained.

Here you can read some general information on hooking.

Important

If you want us to add a new hook, please request it in this topic on our forum or in the developer chat. We may adjust your requested hook according to our standards.