# Code Style and Conventions ## General - **Language**: PHP (PrestaShop conventions) - **Comments/Notes**: Often in Polish (this is a Polish project) - **No strict linting** - no PHPStan/Psalm/PHP-CS-Fixer configured for the project ## PrestaShop Module Conventions - Module class extends `Module` - Module file named same as module folder (e.g., `customfeaturetab/customfeaturetab.php`) - Hooks: `hookDisplay*`, `hookAction*` methods - Templates: Smarty `.tpl` files in `views/templates/` - Admin controllers in `controllers/admin/` - Front controllers in `controllers/front/` ## PrestaShop Override Conventions - Override classes extend the original class - Place in `override/classes/` or `override/controllers/` - Must clear cache after adding overrides ## Custom Scripts - Root-level PHP scripts include PrestaShop config via: ```php include(dirname(__FILE__).'/config/config.inc.php'); include(dirname(__FILE__).'/init.php'); ``` - Use `Tools::getValue()` for GET/POST parameters - Use PrestaShop's `Db::getInstance()` for database queries ## Naming - Module names: lowercase, no spaces (e.g., `customfeaturetab`) - Database tables: `ps_` prefix (PrestaShop convention) - Class names: PascalCase - Variables/methods: camelCase (PrestaShop convention) ## Theme - Active theme: `InterBlue` (customized classic theme) - Templates: Smarty `.tpl` files - Assets in `themes/InterBlue/assets/`