Skip to content

Products System

The Products system manages travel packages across multiple markets with localized content and dynamic flight configuration.

The primary entry point is a Tour (SupplierTour), which owns a ProductTemplate 1:1. Tours are created and managed under Suppliers > Tours. Publishing a tour to a market creates a ProductByMarket.

SupplierTour (Entry Point — Suppliers > Tours)
├── ProductTemplate (1:1 — Master Content)
│ ├── defines trip identity: route, itinerary, duration
│ └── source locale content (en_US, es_ES, etc.)
├── SupplierTourItinerary[] (hotel/activity/transfer assignments per day)
└── "Publish to Market" action creates:
└── 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)
EntityPurpose
SupplierTourCreate and manage a trip (wizard creates ProductTemplate + service assignments)
ProductTemplateMaster content definition (managed through Tour, not standalone)
ProductByMarketConfigure HOW a trip is sold in a specific market
ProductByMarketTranslationLocalized content for display
ProductByMarketFlightConfigDeparture airport and route configuration
ProductByMarketFlightLegIndividual flight segments

SupplierTour owns a ProductTemplate 1:1. The Tour wizard creates both simultaneously. ProductByMarket creates market-specific versions of the template. Each ProductByMarket can have multiple translations (one per locale) and multiple flight configurations (one per departure airport).

Source: backend/app/Models/SupplierTour.php, backend/app/Models/ProductTemplate.php, backend/app/Models/ProductByMarket.php

EntityFormatExample
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.

Generate test product templates with itineraries, market translations, and flight configurations.

Terminal window
# Interactive mode
./vendor/bin/sail artisan products:generate
# Non-interactive
./vendor/bin/sail artisan products:generate \
--templates=5 --markets=ES --per-market=1

Options:

OptionDefaultDescription
--templatesinteractiveNumber of product templates to create
--markets=*interactiveMarket codes (e.g., ES, UK)
--per-marketinteractiveProducts per market per template
--route-typemulti_cityFlight config type (multi_city or separate)
--use-aioffUse AI for realistic product content
--translateoffUse AI translation for non-English locales

Requires existing suppliers, airports, and markets from seeders (db:seed). Blocked from running in production.

Source: backend/app/Console/Commands/GenerateTestProducts.php