jeffsenso/prestashop-skills / skills/prestashop-module-development
prestashop-module-development
VerifiedComplete PrestaShop module development workflow using modern architecture and best practices. Use when: creating new PrestaShop modules, updating legacy modules to modern code, implementing hooks and actions, setting up module configuration pages, adding front office features, handling database operations, implementing security measures, managing translations, creating cart rules and vouchers, building Symfony console commands, or modernizing existing PrestaShop modules from legacy patterns to current standards.
ps9-core-ai/Domain/OrderState/CONTEXT.md
View on GitHub# OrderState Domain
## Purpose
Manages the configurable set of order statuses (e.g., "Payment accepted", "Shipped") including their labels, colors, associated email templates, and icon images. Does not handle order state transitions on individual orders (that is the Order domain's responsibility).
## Layers
| Layer | Path |
|-------|------|
| Core CQRS | `src/Core/Domain/OrderState/` — Commands, Queries, QueryResults, ValueObjects, Exceptions |
| Adapter | `src/Adapter/OrderState/` — handler implementations, `AbstractOrderStateHandler.php`, `OrderStateDataProvider.php` (no repository — handlers use the legacy ObjectModel directly) |
| Legacy ObjectModel | `classes/order/OrderState.php` (171 lines) — do not add logic here |
| Back-office UI | `src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/OrderStateController.php`, `src/Core/Grid/Definition/Factory/OrderStatesGridDefinitionFactory.php` |
## Non-obvious patterns
- `OrderStateFileUploaderInterface` in the domain root is a domain-level interface for uploading the state icon image; its implementation lives outside the Adapter layer and is injected via DI — icon upload is part of Add/Edit, not a separate command.
- `OrderStateSettings` at the domain root holds field-length constants; check it before adding new constraints.
- There is no `Repository` class in `src/Adapter/OrderState/` — handlers load and persist via the legacy `OrderState` ObjectModel directly.
- Order state is listed under **Shop Parameters** in admin navigation, not under Orders or Catalog.
## Canonical examples
- `src/Core/Domain/OrderState/Command/AddOrderStateCommand.php` + `src/Adapter/OrderState/CommandHandler/AddOrderStateHandler.php`
## Related
- [CQRS Component](../../Component/CQRS/CONTEXT.md)
- [Forms Component](../../Component/Forms/CONTEXT.md)
- [Grid Component](../../Component/Grid/CONTEXT.md)
- `tests/Integration/Behaviour/Features/Scenario/OrderState/` — Behat behavior scenarios
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |