5-Minute Quickstart
This quickstart runs the Aegean Voyages (aegeanvoyages.example) charter workflow from site/modules/Charter/examples/real-world/.
End-to-End Brokerage Flow
Section titled “End-to-End Brokerage Flow”-
Search Available Yachts With
FleetSearchService:<?php declare(strict_types=1);namespace ProcessWire;$charter = Charter::requireInstance($wire);$results = $charter->fleet()->search(['check_in' => '2026-07-11','check_out' => '2026-07-18','guests' => 8,'cabins_min' => 4,'currency' => 'EUR','limit' => 12,]); -
Compute an Itemized Multi-Currency Quote With
PricingEngine:$quote = $charter->pricing()->calculate(['yacht_ref' => 'entry:' . $yacht->id,'check_in' => '2026-07-11','check_out' => '2026-07-18','guests' => 8,'currency' => 'USD',]);echo "{$quote->nights} nights | Net: {$quote->netCharterFee} {$quote->currencyCode} | Grand Total: {$quote->grandTotal}"; -
Capture an Inquiry & Convert to an Option Booking:
$workflow = $charter->workflow();$inquiry = $workflow->createInquiryFromSubmission(['client_name' => 'Elena Rossi','yacht_ref' => 'entry:' . $yacht->id,'check_in' => '2026-07-11','check_out' => '2026-07-18','guests' => 8,]);// Acquires CharterWriteLock and verifies half-open [check_in, check_out) availability$booking = $workflow->convertInquiryToBooking($inquiry); -
Generate a Branded or Unbranded HMAC Proposal Link:
$brandedUrl = $charter->proposals()->shareUrl('booking', (string) $booking->id, branded: true, ttlSeconds: 604800);$unbrandedUrl = $charter->proposals()->shareUrl('booking', (string) $booking->id, branded: false, ttlSeconds: 604800);