Products System
The Products system manages travel packages across multiple markets with localized content and dynamic flight configuration.
Architecture
Section titled “Architecture”ProductTemplate (Master Content) │ ├── defines trip identity: route, itinerary, duration ├── source locale content (en_US, es_ES, etc.) │ └── ProductByMarket (Market-Specific) │ ├── market assignment (ES, DE, etc.) ├── locale selection (es_ES, ca_ES) ├── flight search configuration │ ├── ProductByMarketTranslation (Translated Content) │ └── localized title, description, itinerary │ └── ProductByMarketFlightConfig (Flight Routes) └── ProductByMarketFlightLeg (Individual Legs)When to Use Each Entity
Section titled “When to Use Each Entity”| Entity | Purpose |
|---|---|
| ProductTemplate | Define what a trip IS (route, structure, base content) |
| ProductByMarket | Configure HOW a trip is sold in a specific market |
| ProductByMarketTranslation | Localized content for display |
| ProductByMarketFlightConfig | Departure airport and route configuration |
| ProductByMarketFlightLeg | Individual flight segments |
Key Relationships
Section titled “Key Relationships”ProductTemplate is the master definition. ProductByMarket creates market-specific versions. Each ProductByMarket can have multiple translations (one per locale) and multiple flight configurations (one per departure airport).
Source: backend/app/Models/ProductTemplate.php, backend/app/Models/ProductByMarket.php
SKU Formats
Section titled “SKU Formats”| Entity | Format | Example |
|---|---|---|
| ProductTemplate | <ID>-<DAYS> | 138-10 |
| ProductByMarket | <MARKET>-<ID>-<DAYS>-<LANG><VERSION> | ES-138-10-ES1 |
SKUs are auto-generated based on template ID, duration, market, and language.
Related
Section titled “Related”- Product Templates - Base product definitions
- Products by Market - Market-specific configuration
- Admin Panel - Filament resource management
- Database Relationships - Entity relationship diagram