Remove "Add to Cart" button when there are no more timeslots

More
7 years 7 months ago #111187 by DLM
Hi there,

I was wondering how to "deactivate" the button' add to cart' when there are no more timeslots available.
I use this component on my website for customers to make bookings. However when there are no more timeslots available, the button still remains visible. This apparently is very confusing for my customers because they cannot select (obviously) a timeslot anymore and it should be better if there's no more button visible.

Thanks for the feedback!

Please Log in or Create an account to join the conversation.

More
7 years 7 months ago #111192 by Dang Thuc Dam
Hi,
I will think about your idea in future when i improve OS Services Booking.
Thanks
Dam

Please Log in or Create an account to join the conversation.

More
7 years 7 months ago #111261 by DLM
Hi!

thanks for your feedback.
So can I in the meanwhile change this myself, until it might be added in the new version.

If so, can you please tell me which variable 'says' whether there are still available timeslots or not?

I think I need to make the change in helpers/calendar.php.

There is, near row 1450 a button 'addtocartbtn' that is mentioned.
I want to add a simple if else condition based on the variable timeslots 'is not empty'.
I noticed $ableBook is based on the fact that the selected day is a 'booking day', so I need one value extra.

Thanks for your feedback,
kind regards!

Please Log in or Create an account to join the conversation.

More
7 years 7 months ago #111612 by DLM
@Dang Thuc Dam, can you please tell me which variables 'determine' whether the timeslots are reserved or not?

- $ableBook = 1
- $show_no_timeslot_text = 0

I'm missing something to finish my conditions.

Thanks in advance!

Please Log in or Create an account to join the conversation.

Moderators: Dang Thuc Dam