Okay
  Public Ticket #2227487
Issue extra option count + technical question
Closed

Comments

  • Barfleur en mer started the conversation

    Hi

    First I would like to congratulation you for this amazing plugin !

    Secondly, I have few questions :

    I don't understand the extra option count when booking. It is multiply by the amount of people but we can also choose the extra quantity so it does not make sense. I think this is an issue

    My use case is : The extra option is use as children price, so I would like to count it as a person BUT with the extra (discount) price. I'm developper and I try to found out where I can add this feature this.

    The issue seems to be there : src/Application/Services/Reservation/AbstractReservationService.php -> Method getPaymentAmount() (line : 351)

    When I try to edit this code it doesn't make any effect during the booking process even if I'm returning a fix price of 999. 

    I would like also to edit the fron-end to remove the "2 persons * extra..."

    Could please provide me a way to do this ?

    I would really appreciate, thanks in advance

    Best regards

    Victor

  • [deleted] replied

    Hello Victor, 

    Thank you for your purchase and for the compliments as wellsmile.png We are glad to hear that you like Amelia!

    The extras option is not for people (it can't add some number of people to the booking process), this option is used when you have some extra option for this service available - so they can extend the duration of the service for example or add some price for some extra service.  And the option that the extra will be multiplied by the number of people means that it will be multiplied by the number of people that you set in the booking process for the service (before), it doesn't add people to the booking process.

    I am not sure if your use case can be achieved and how. We have coupons option in Amelia, so you can make several coupons (since only one coupon can be added to one booking) for different number of children.

    Coupon 1 - 1 child - discount 5$

    Coupon 2 - 2 children - discount 10$ 

    Coupon 3 - 3 children - discount 15$ 

    And you would need to send these coupons to the users so they can use them in the booking process if they bring children. 

    If I think of some other solution for this I will let you know.


    You can hide parts of the booking form on the front-end with some custom CSS, if you need my help please tell me what part you want to hide and on which page so I will send you the code. 

    If you have any further questions or concerns feel free to ask,

  • Barfleur en mer replied

    Hello Marija,

    thank you for your fast answer.

    I still don't understand why extra are multiplied by number of people of the appointment. Cutomers can set the extra quantity. So if two people booked an appointment, they should be allow to choose only 1 extra if they want and let them choose how many extras they want depending of the amount of person on their own.


    I don't think coupon can be used, it was smart but I need some options like : 

    Children under 13 = $

    Children under 3 = Free

    And adding a children should remove a slot to the appointment to avoid over capacity.

    I really figured it out only if I can edit the php backend like I asked. I found the file, feel so close to accomplish that but I just need some help, would you think it is possible to show me ?

    Thanks !


  • [deleted] replied

    Hello Victor, 

    You are welcome.

    The extras don't need to be multiplied by the number of people in the service, you can disable this option when you create the service/extra. Before the extras were always multiplied by the number of people in the booking - and some users need it to not be multiplied by the number of people, so we implemented an option for our users to choose if they want that or just the quantity. Since some of the users need this and some don'tsmile.png So, if you disable 'The price will multiply by the number of people ' while you create the extra it will not be multiplied by the number of people, and you can set the maximum quantity so customers can choose quantity that they want for the extra.

    I am not sure if I understood well what is the thing that you want to change in the back-end? 

    You can't change the fact that with extras no person is added to the booking unfortunately, it is not made for this purpose. It is made for some additional price/duration for the service itself.

  • Barfleur en mer replied

    Hello Marija, 

    I'm sorry but I can't find the option : 'The price will multiply by the number of people ' when I create an extra

    By editing the backend I would like to programmatically add slot linked to the quantity of extra during the process booking. I found the file like I said, but editing it makes no changes. After reviewing your database model adding a slot is possible.

    Use case : 

    Service  : 20$ / person

    Extra (child) : 10$

    2 parents book with 1 children (as extra), they will answer the question : "Will you bring someone with you ?" to 3 (2 parent + 1 child)

    My goal is to deduct the original price with the extra quantity

    2 adult + 1 child = 20$ * (3 - extra quantity) + (extra price * extra quantity)

    so I just need to make the "20$ * (3 - extra quantity)" working with the getPaymentAmount method I've found

    Hope I've been clear. I know it's a personal feature, but if you are agree to explain me how I can edit it I would really appreciate.

    Thanks in advance

    Victor

  •   [deleted] replied privately
  •   Barfleur en mer replied privately
  •   [deleted] replied privately