- Introduced a new template file 'review copy.tpl' for the order summary step in the one page checkout process. - The template includes a loading indicator and a header for the order summary section. - Conditional rendering based on customer registration status is implemented.
40 lines
1.4 KiB
Markdown
40 lines
1.4 KiB
Markdown
# 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/`
|