1.6 KiB
Executable File
1.6 KiB
Executable File
Checkout Process Implementation Summary
Database Changes
- Migration: Added
first_nameandlast_namefields to theticketstable- File:
db/migrate/20250828143000_add_names_to_tickets.rb
- File:
Model Changes
- Ticket Model:
- Added validations for
first_nameandlast_namewhen required by ticket type - Added
requires_names?method to check if names are required based on ticket type
- Added validations for
Controller Changes
- Events Controller:
- Modified
checkoutaction to redirect to name collection when tickets require names - Added
collect_namesaction to display form for collecting ticket holder names - Added
process_namesaction to handle submitted names and proceed to payment - Updated
payment_successaction to create tickets with names when provided
- Modified
View Changes
-
Events Show View:
- Added
changeevent listener to quantity inputs in ticket cards
- Added
-
Ticket Card Component:
- Added
changeevent listener to quantity inputs
- Added
-
New View:
- Created
app/views/events/collect_names.html.erbfor collecting ticket holder names
- Created
Route Changes
- New Routes:
GET events/:slug.:id/names- Collect names for tickets requiring identificationPOST events/:slug.:id/names- Process submitted names and proceed to payment
JavaScript Changes
- Ticket Cart Controller:
- No changes needed as name collection is handled server-side
Outstanding Tasks
- Run the database migration in the Docker environment once gem issues are resolved
- Test the complete checkout flow with name collection