Skip to content

Add Guest Count with Dynamic Price Calculation #30

@AMANkumar0004

Description

@AMANkumar0004

Feature Overview:
Currently listing price is fixed. We need to allow users to select number of guests and dynamically adjust price.

Requirements:
Add guest count input in booking form
Add maxGuests field in Listing schema
Add guests field in Booking schema
Calculate total price using formula: basePrice multiplied by numberOfGuests multiplied by numberOfNights
Prevent booking if guest count exceeds maxGuests

Technical Notes:
Update Listing model
Update Booking model
Add validation in controller
Optionally add live price preview using JavaScript

Acceptance Criteria:
Price calculation works correctly
Guest limit validation works
Proper error messages displayed

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions