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/Component/Import/CONTEXT.md
View on GitHub# Import Component
## Purpose
Multi-step, batch-capable CSV import pipeline: file upload/reading, column-to-field mapping, entity-type-specific handlers, and stateful progress tracking across multiple HTTP requests. Does not handle localization pack imports (`LocalizationPackImporter` is separate).
## Layers
| Layer | Path |
|-------|------|
| Core pipeline contracts | `src/Core/Import/` |
| Entity field metadata (9 types) | `src/Core/Import/EntityField/Provider/` |
| Adapter handlers + utilities | `src/Adapter/Import/` |
| Controller entry point | `src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/ImportController.php` |
## Non-obvious patterns
- `ImportRuntimeConfig` is **mutable and serializable** — its `toArray()` output is stored between HTTP requests to track offset/limit/progress across batched imports
- `ImportConfig` (immutable) vs `ImportRuntimeConfig` (mutable per batch) — two separate objects for a reason; don't merge them
- `ProductImportHandler` is the most complex handler — it imports combinations, features, images, suppliers, and specific prices all via legacy ObjectModels
- 9 supported entity types defined as constants in `Entity`; `ImportHandlerFinder` matches by `supports()` — no if/else chains
## Canonical examples
- `src/Core/Import/ImporterInterface.php` + `src/Core/Import/Importer.php`
- `src/Core/Import/Handler/ImportHandlerInterface.php`
- `src/Adapter/Import/Handler/AbstractImportHandler.php`
## Related
- [Export Component](../Export/CONTEXT.md) — counterpart for CSV generation
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 |