- 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.
1.4 KiB
1.4 KiB
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
.tplfiles inviews/templates/ - Admin controllers in
controllers/admin/ - Front controllers in
controllers/front/
PrestaShop Override Conventions
- Override classes extend the original class
- Place in
override/classes/oroverride/controllers/ - Must clear cache after adding overrides
Custom Scripts
- Root-level PHP scripts include PrestaShop config via:
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
.tplfiles - Assets in
themes/InterBlue/assets/