Module files
ps_module_file
Reads a module's files and, when there's no other way, changes them with a backup first; such changes disappear when the module is updated.
Free TellMyShop Audit: No. This tool is only in the paid version of TellMyShop. The free TellMyShop Audit has only tools that read your store.
Ask Claude
„The xyzshipping module keeps logging "Undefined index id_carrier". Find the line and fix it.”
Example preview
File module:xyzshipping/classes/Rates.php, 18,240 -> 18,262 bytes. Backup before saving. PHP syntax: OK. - $carrier = $params['id_carrier']; + $carrier = $params['id_carrier'] ?? 0; Note: this change will be lost on the next update of xyzshipping.
Technical details
Files of an installed module: action=list (folder, optional path), read (path, from_line), edit (path + search/replace, or content). WARNING: changes to module files are LOST when the module is updated. Change a module's look with ps_override_module_template (template copy in the theme); edit module files only when it's the only way (for example a PHP bug fix), and tell the user. PHP files are syntax-checked before saving and every write is backed up. Restore: ps_restore_file_backup.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| action | enum: list | read | edit | yes | list | read | edit. |
| module | string | yes | Technical module name. |
| path | string | when: action=read or edit | Path relative to the module folder (list: optional subfolder). Max 300 characters. |
| from_line | integer | no | read: start line (400 lines per call). |
| search | string | no | edit: exact fragment to replace (must appear exactly once). Max 100,000 characters. |
| replace | string | no | edit: the new fragment. Max 100,000 characters. |
| content | string | no | edit: whole new content (instead of search/replace). Max 500,000 characters. |
| confirm | boolean | no | false (default) returns a preview and saves nothing. true executes, only after the user approved the preview, together with change_token. |
| change_token | string | when: confirm=true | Token from the preview. Required with confirm=true. Valid 30 minutes, single use, bound to the previewed arguments and data state. |
Limits
read: 400 lines per call, files up to 1 MB. edit: text files only (php, tpl, twig, css, js, json, yml, xml, txt, md, html, htaccess, scss, svg); fragment must appear exactly once. 20 file writes per hour, shared by all file tools (adjustable in the Settings: security, alerts, limits card). The connector's own module is off limits. Block 4, service connector only.
What you see before anything is saved
Claude first calls the tool without confirming it. The module returns a preview (current and new values) and a single-use token valid for 30 minutes. Claude shows you the preview and saves the change only after your yes.
Related tools
- Override module template ps_override_module_template
- List file backups ps_list_file_backups
- Restore file backup ps_restore_file_backup
- Read PrestaShop logs ps_get_logs
Use cases with this tool
- Change how an add-on looks without losing it on the next update
- Change a fixed text in an add-on's box
- Restyle the featured products block on the homepage
- Fix headings and image descriptions in the homepage slider
- Check your add-on customisations before updating the add-on
- Change how an add-on behaves when changing its look is not enough
- Check and adjust add-on settings
- Fix a bug in an add-on's code until the author ships a fix
Last updated: 2026-10-05