alextselegidis / easyappointments

:date: Easy!Appointments - Self Hosted Appointment Scheduler
https://easyappointments.org
GNU General Public License v3.0
3.34k stars 1.28k forks source link

Possibility to embed booking widget in website. #543

Open mr2017x opened 6 years ago

mr2017x commented 6 years ago

Hello Guys,

thank you for programming this nice tool.

May you can think about a general function to embed your tool into other websites as a widget. I think like in 10to8 or something alike.

Thank you in advance.

Chris

alextselegidis commented 6 years ago

HI @mr2017x, if you plan to work with wordpress you can use the official integration plugin

https://wordpress.org/plugins/easyappointments/

otherwise you can always hook the booking page (or any provider - service dedicated link) to your page with the help of an iframe.

Hope that helps :)

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

mr2017x commented 6 years ago

Hi Alex,

thank you for answer my question. Ok, may it could be possible to implement a function like in 10to8 with direct script embedding for better interoperability with mobile sites?

thanks in advance

alextselegidis commented 6 years ago

@mr2017x Now that I think of it again, this is actually a good idea 👍

Marked as a future enhancement :)

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

mr2017x commented 6 years ago

Hope so, otherwise i just would waste your and my time...and that's not on my plan :-)

Thank you and have a nice weekend

skylarmt commented 2 years ago

I've added code to my instance that hides the background and header on the booking page when a URL parameter is added. This allows me to embed into an iframe completely seamlessly. The parent page background shows through and users can't really tell it's a different site. I've also added a parameter to skip straight to the date/time page.

These modifications didn't take me too long and allow fine-tuning the user experience, like seen here: https://helena.express/schedule One of the iframe URLs loaded by that page is https://appointments.netsyms.com/index.php?embed=1&only=1&service=19, where only=1 skips the service/provider page as I only have one provider and service=19 has already set the service. The embed parameter hides all the unnecessary stuff so the embed looks seamless.

It didn't take me long to implement this, but while my code works it's really hacky so I don't think a pull request would be any use. I'd love to see it as a feature in 1.5, so I don't have to do it all over again after upgrading.

mr2017x commented 2 years ago

i didn't check it yet to be honest, but iframes are (as i know from former projects) already a big hazzle with nginx as well as apache?

skylarmt commented 2 years ago

I've never had issues with web servers and iframes, unless you're having the server send X-Frame-Options headers that tell the browser to block the iframe. The entire point of iframes is making it easy and possible to embed a page in another page, for use cases exactly like this one.

In fact, web servers shouldn't even know if they're serving something into an iframe or a top level frame, because that's done client side.