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

Skip the first booking step when only one service and one provider are available. #349

Closed
dipiana opened this issue Jul 23, 2017 · 9 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@dipiana
Copy link

dipiana commented Jul 23, 2017

Hi,

Is there any way to skip the first page ("Select Service & Provider") when there is only one service and one provider available?
In my case it would confuse customers.
If not - is there any file I can change to make this adaptions myself?

Thanks in advance!

@alextselegidis
Copy link
Owner

alextselegidis commented Jul 24, 2017

Hi, yes this is a good suggestion!

You can change this behavior by adding some JavaScript in frontend_book.js that will check the number of option during initialization and skip the first page if needed.

The offending dropdowns are the #select-service and #select-provider.

You will just have to make the following ckeck $('#select-service option').length === 1 && $('#select-provider option').length === 2 (providers will always have two options because of the "Any Provider" entry).

Take a look at the book.php view file for further info on the HTML markup.

Pull requests are always welcome :)

  Alex Tselegidis, Easy!Appointments Creator
  Need a customization? Contact me in person!

@alextselegidis alextselegidis added the enhancement New feature or request label Jul 24, 2017
@alextselegidis alextselegidis self-assigned this Jan 28, 2018
@TVBZ
Copy link

TVBZ commented Feb 17, 2019

Hello

Just discovered EasyAppointments today.. Exciting, thumbs up! :)

I have same situation. I want to skip step 1. I have changed the book.php view file but I'm a bit lost in the js part. Can you elaborate where/how to implement the check?

Many thanks!

@alextselegidis
Copy link
Owner

@TVBZ the frontend_book.js has logic on proceeding with steps (back and forth).

You can find this and tweak so that it ignores the first step.

  Alex Tselegidis, Easy!Appointments Creator
  Need a customization? Contact me in person!

@jdaviescoates
Copy link

Given I'm trying to recreate a Calendly-like experience I would also love to be able to skip the first step.

Another way to achieve the same thing, which I think would be even nicer (and more Calendly-like), would be for people to be able to go domain.tld/user and then get a page that just presents all the services available from the specific user.

@vitormattos
Copy link
Contributor

A suggested solution is:

  • Define a unique slug for each service
  • Define a unique slug for each customer
  • Create a route /<service>/<customer>

This route will not display step 1 of the wizard and start the wizard at step 2.

The creation of the URL at first will be manual.

Solve the need? If so, I can send a pull request by implementing it.

@alextselegidis can I send a PR implementing this?

@vitormattos
Copy link
Contributor

I started the changes by reviewing the unit tests. #1042

@vitormattos
Copy link
Contributor

Updating the progress:

I created another PR implementing test coverage for customers and services #1044

@vitormattos
Copy link
Contributor

Done, closed in #1048

@alextselegidis alextselegidis added this to the v1.5.0 milestone Aug 27, 2021
@alextselegidis alextselegidis changed the title Skip first step when only one service + one provider available Skip the first booking step when only one service and one provider are available. Oct 22, 2021
@h-e-l-l-o-w-o-r-l-d
Copy link

h-e-l-l-o-w-o-r-l-d commented Dec 1, 2021

While this might be a nice addition for some people, I think it's not always wanted. Two reasons:

  • It's desirable to see what kind of booking you make an appointment for and who is the provider before you fill the form. step 1 shows it.
  • It's desirable to see information about duration and location. step 1 shows it. ;-)

I wouldn't want to have this addition, so I think it should be an option in the settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants