How do I make Buying button in mendix

0
Hi All, new user to Mendix.   How do i create a 'buy' button for my booking app where it just saves the details with the corresponding   user's data so that the user can click into another button to see his saved booking details?
asked
1 answers
0

Hi Scott,

To create a "Buy" button in your booking app that saves the booking details along with the corresponding user's data, you can follow these steps. First, ensure that you have a Booking entity associated with the BTCUser entity, where each user can have multiple bookings. Then, place a Button widget labeled "Buy" inside the booking page and set it to trigger a Microflow. In this Microflow, create a new Booking object, set the necessary details such as booking type (hotel, flight, or sports), and associate it with the currently logged-in user using the [%CurrentUser%] system variable. After saving the booking, show a confirmation message to the user. Additionally, create another page where users can view their saved bookings by using a List View or Data Grid that retrieves bookings filtered by the logged-in user. Finally, add a "View My Bookings" button on the home page that navigates to this booking history page. This setup ensures that users can easily save their bookings and access them later with a simple button click.

 

Let me know, if you have any issues,

Hope it helps!

answered