Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0] new module pms_ website_sale : online booking #237

Closed
wants to merge 56 commits into from

Conversation

robinkeunen
Copy link
Contributor

Hi there,

This is a work in progress on pms_website_sale. The aim of this module is to allow online booking for visitors.

The booking process has 6 steps

  1. /ebooking/rooms : date and room type selection
  2. /ebooking/booking : summary of the booking
  3. /ebooking/booking/extra_info: extra information from the customer
  4. /ebooking/booking/address: address and invoicing information
  5. /ebooking/booking/payment: payment page, uses installed and allowed payment acquirers
  6. /ebooking/booking/success: success / failure page

The ebooking controller uses the booking engine to display availabilities and price.

A few things left to do

  • make the module independent from website, if possible
  • add a room type page
  • booking process for a logged in user
  • optimise the use of booking engine
  • ...

This is a MVP at this stage, we're submitting it to our customer. Feedbacks are welcome.

carmenbianca and others added 30 commits November 2, 2023 17:11
[IMP] pms_website_sale: Show a very basic list of room types

Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>

[IMP] pms_website_sale: Filter improvements

Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>

[IMP] pms_website_sale: Images

Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>

[REF] pms_website_sale: Use booking engine in controller

Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>

[IMP] pms_website_sale: Page for room types

Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>

[IMP] pms_website_sale: Load /room page when not logged in

During this work, I also realised that pms.room.type is a product, so I
incorporated that design, which required some subsequent refactoring.

Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>

[IMP] pms_website_sale: Add important comment

Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Input are now required, to avoid user entering only one date an not the
other.

A button has been added to reset the date search.
This commit contains a refactor of the BookingEngineParser.
- Use SESSION_KEY when saving data into session
- Discussion about the add_room_request() method and other method
- Catch error when casting values from the formular
Errors can now be shown in the log file and properly to the user.
On the /rooms page and /booking page
Using URLLookup `model()` does not work for public user as public user
has no specific rights on any object.

Another way to solve it is to give read rights for pblic user. But that
seams dangerous to me as any request made on the website is performed by
public user.
Using `price_total` from the `availability_result` does not work as by
default in the booking.engine wizard the number of selected rooms
(`num_room_selected`) is equal to zero. Therefor the `price_total` is
null.

To solve that we set the amount of room selected to 1 for each rooms
available.

As the booking.engine for the rooms page is not stored this is a
temporary value that will not be used for booking.
remytms and others added 26 commits November 2, 2023 17:11
Using route `/rooms` conflict with other pms modules.

Now routes for booking online are prefixed `/ebooking`.
When testing to create a folio from an empty parser, the creation of the
partner fails because no partner data are present in the parser.

This fixes the tests, but it lead to issue in the case when the user
bypass the address formular in the booking process.
@robinkeunen robinkeunen force-pushed the 14.0-pms_website_sale branch from 893ed21 to bd24457 Compare November 2, 2023 16:11
@robinkeunen robinkeunen closed this Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants