update
This commit is contained in:
47
AGENTS.md
Normal file
47
AGENTS.md
Normal file
@@ -0,0 +1,47 @@
|
||||
# Repository Guidelines
|
||||
|
||||
## Project Structure & Module Organization
|
||||
This repository is a live **PrestaShop 1.7.x** shop instance. Core application code is in `classes/`, `controllers/`, `src/`, and `app/`. Customizations should usually go in `modules/`, `override/`, and `themes/InterBlue/`.
|
||||
|
||||
Key paths:
|
||||
- `themes/InterBlue/` - custom storefront theme (`assets/css/*.scss`, `templates/**/*.tpl`)
|
||||
- `modules/` - PrestaShop modules (custom and vendor)
|
||||
- `override/` - class/controller overrides (high-impact; change carefully)
|
||||
- `xml/`, `custom/`, root `*.php` scripts - feed/export/import integrations
|
||||
- `changelog/` - dated maintenance notes
|
||||
|
||||
## Build, Test, and Development Commands
|
||||
There is no single root build pipeline; use targeted commands.
|
||||
|
||||
- `php -l path\to\file.php` - quick PHP syntax check before commit.
|
||||
- `php .\import-products.php` - run product import script locally (only with safe test data).
|
||||
- `php .\modules\ps_facetedsearch\vendor\bin\phpunit -c .\modules\ps_facetedsearch\tests\phpunit.xml` - run module tests where bundled.
|
||||
- SCSS workflow: edit `themes/InterBlue/assets/css/custom.scss`; VSCode Live Sass Compiler (see `.vscode/settings.json`) compiles CSS on save.
|
||||
|
||||
After PHP/template/override changes, clear PrestaShop cache (`var/cache/*`) from Back Office Performance settings.
|
||||
|
||||
## Coding Style & Naming Conventions
|
||||
- Follow existing PrestaShop PHP conventions: 4-space indentation, `ClassNameCore` extension pattern in overrides, hook-first integrations.
|
||||
- Keep module strings translatable (`$this->l('...')`).
|
||||
- Use snake_case for script files (`custom-cron.php`) and PrestaShop-standard class/file names elsewhere.
|
||||
- Avoid direct core edits when a hook or module override can solve it.
|
||||
|
||||
## Testing Guidelines
|
||||
Automated test coverage is partial and module-specific. For custom changes, combine:
|
||||
- syntax checks (`php -l`),
|
||||
- targeted module PHPUnit when available,
|
||||
- manual Back Office + storefront regression checks (checkout, product page, cart rules, mail templates).
|
||||
|
||||
Document what you tested in PR notes.
|
||||
|
||||
## Commit & Pull Request Guidelines
|
||||
Recent history mixes generic (`update`) and descriptive commits; prefer descriptive, scoped messages, e.g. `Fix product import stock sync for XML feed`.
|
||||
|
||||
PRs should include:
|
||||
- purpose and affected paths,
|
||||
- deployment/cache-clear notes,
|
||||
- screenshots for UI/theme/admin changes,
|
||||
- linked issue/task and rollback considerations.
|
||||
|
||||
## Security & Configuration Tips
|
||||
Treat `.vscode/ftp-kr.json`, `app/config/parameters.yml`, and similar files as sensitive. Never introduce new credentials or tokens in commits.
|
||||
Reference in New Issue
Block a user