Skip to content

Repository files navigation

PrestaShop Technical Documentation

BuildDevDocs Site update

This documentation is available at https://devdocs.prestashop-project.org/

Contributing

Contributions are more than welcome! Find out how.

Note

This repository has specific contribution rules, please read them.

Rendering the site locally

See https://github.com/PrestaShop/devdocs-site/

Deployment

The deployment pipeline is documented on the sources repository for DevDocs.

License

Content from this documentation is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License.

Maintaining Hook list referential

A complete referential of hook and informations on each hook is located in modules/concepts/hooks/list-of-hooks/.

This referential can be generated with a script, crawling all:

  • PrestaShop (core) codebase
  • all native modules
  • all native themes

In the documentation, a hook is described in yaml format:

---
Title: string #name of the hookhidden: boolean[true] #must be truehookTitle: string #title for the descriptiondescription: string #description sentenceorigin: string #core, module or themefiles:
-
theme: string #theme name only if origin=thememodule: string #module name only if origin=moduleurl: string #url of the file on githubfile: string #path of the filelocations:
- string #back office, front office or bothtype: string #action or displayhookAliases:
- string #old hook name or aliasarray_return: boolean #true or false if the hook has an `$array_return` parameter set to `true`check_exceptions: boolean #true or false if the hook has a `$check_exceptions` parameter set to `false`chain: boolean #true or false if the hook has a `$chain` parameter set to `true` 
---

This YAML structure enables the shortcode hookDescriptor to generate an HTML page with condensed information for documentation, and allows the search script to search within this metadata.

Next, add the shortcode in the page's content:

{{% hookDescriptor %}}

Finally, if available, add a section with a code example and parameters details:

## Parameters details
[...]
## Call of the Hook in the origin file
[...]

About

PrestaShop technical documentation

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages