Appointment booking calendar. Any suggestions?

11 years ago
I like to put an appointment booking calendar on a website.

It is to show vacant hours in a calendar. Let clients book to these hours.

Plese let me know if you know of a simple system for this.

Preferably using SQL Server or Access database, and VB or C# ASP.net code.
11 years ago
Try Google Calendar , you can implement it with your website

Here's the Google Calendar Developer's Guide - http://code.google.com/apis/calendar/data/2.0/developers_guide_protocol.html.
11 years ago
I am currently developing an event calendar using ASP.NET / C# with SQL Server. It is part of a CMS project I am working on and will be publishing the project next year. I have been working on this calendar for 2 months now. It is turning out to be a big project. I was able to use ASP.NET calendar control for the main calendar but for different views like week, day, and list view, I had to implement my own solutions. PM me for more details.
11 years ago
I would also suggest you use the google calendar. It works just fine and you can easily incorporate it into a site. The other suggestion is that you buy a system. my brother uses supersaas.com, and he is very happy with the way it works. but then you got to pay for it.
11 years ago
hovengen wrote:
I like to put an appointment booking calendar on a website.

It is to show vacant hours in a calendar. Let clients book to these hours.

Plese let me know if you know of a simple system for this.

Preferably using SQL Server or Access database, and VB or C# ASP.net code.


Google is the best option for you but still if you wanna try something else then:

There is an ASP.NET starter kit called "Club Site Starter Kit" which comes with Event Calender.

You can take a look at it and see if you could implement same calender on your nopCommerce project.

Here's the link: http://www.asp.net/downloads/starter-kits/club
4 years ago
how to integrate Google calendar in nopcommerce or any other suggestions that can be used to book appointment of client to visit store?
4 years ago
If its any help - We used a Task running in the background to read Google Calander using the API then store in a table - You need to setup the API and get the data from Google Calander and store in settings  
Later displayed the table data using FullCalander https://fullcalendar.io/
It also has a link to store enteries into Google Calander
https://fullcalendar.io/releases/fullcalendar/3.9.0/demos/gcal.html

//** Some old Code from V1.7 **/

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Web;
using System.Security.Cryptography.X509Certificates;
using Google.Apis.Authentication.OAuth2;
using Google.Apis.Authentication.OAuth2.DotNetOpenAuth;
using Google.Apis.Calendar.v3;
using Google.Apis.Util;

namespace NopSolutions.NopCommerce.BusinessLogic.Google
{
    public static class GoogleCalendar
    {
        #region Methods

        public static void ReplicateCalendar()
        {
            string eventName = null;

            string calendarId = "GoogleCalanderName";

            var googleEvents = Replicate(calendarId);
            if(!googleEvents.Any())
                return;

            foreach (var i in googleEvents)
            {
                eventName = i.Name;
                if (i.Start > DateTime.Now)
                {
                    bool deleted = !(!i.Deleted && i.Busy);

                    // Do Something with the calendar data

                }
            }
        }

        #endregion

        #region Utils

        private static IEnumerable<GoogleCalendarEvent> Replicate(string calendarId)
        {
            if(String.IsNullOrWhiteSpace(calendarId))
                throw new ArgumentNullException("calendarId");

            calendarId = calendarId.Trim();
            string clientSecret = SettingManager.GetSettingValue("Google.API.ClientSecret");
            string serviceAccountUser = SettingManager.GetSettingValue("Google.API.ServiceAccountUser");
            string serviceCertificate = SettingManager.GetSettingValue("Google.API.ServiceCertificate");
            string key = SettingManager.GetSettingValue("Google.API.Key");
            string serviceCertificatePath = String.Format("{0}files\\Certificates\\{1}", HttpRuntime.AppDomainAppPath, serviceCertificate);

            var certificate = new X509Certificate2(serviceCertificatePath,
                clientSecret,
                X509KeyStorageFlags.MachineKeySet |
                X509KeyStorageFlags.PersistKeySet |
                X509KeyStorageFlags.Exportable);
            var provider = new AssertionFlowClient(GoogleAuthenticationServer.Description, certificate)
            {
                ServiceAccountId = serviceAccountUser,
                Scope = CalendarService.Scopes.CalendarReadonly.GetStringValue()
            };
            var authenticator = new OAuth2Authenticator<AssertionFlowClient>(provider, AssertionFlowClient.GetState);
            var service = new CalendarService(authenticator)
            {
                Key = key
            };
            var req = new EventsResource.ListRequest(service, calendarId)
            {
                ShowDeleted = true,
                TimeMin = DateTime.Now.ToString("yyyy-MM-dd'T'HH:mm:ss.fffK", CultureInfo.InvariantCulture),
                MaxResults = Int32.MaxValue,
                SingleEvents = true,
            };
            var rsp = req.Fetch();
            if(rsp.Items == null || !rsp.Items.Any())
                return Enumerable.Empty<GoogleCalendarEvent>();

            return rsp.Items.Select(x => new GoogleCalendarEvent
            {
                Id = EnsureNotNull(x.Id),
                Name = EnsureNotNull(x.Summary),
                Description = EnsureNotNull(x.Description),
                Start = DateTime.Parse(String.IsNullOrWhiteSpace(x.Start.DateTime) ? x.Start.Date : x.Start.DateTime),
                End = DateTime.Parse(String.IsNullOrWhiteSpace(x.End.DateTime) ? x.Start.Date : x.End.DateTime),            // If end time is null event is all day but save end date as start date
                Busy = !EnsureNotNull(x.Transparency).Equals("transparent", StringComparison.InvariantCultureIgnoreCase),
                Deleted = x.Status.Equals("cancelled", StringComparison.InvariantCultureIgnoreCase)
            }).ToList();
        }

        private static string EnsureNotNull(string s)
        {
            return String.IsNullOrEmpty(s) ? String.Empty : s;
        }

        #endregion
    }

    public struct GoogleCalendarEvent
    {
        public string Id
        {
            get;
            set;
        }

        public string Name
        {
            get;
            set;
        }

        public string Description
        {
            get;
            set;
        }

        public DateTime Start
        {
            get;
            set;
        }

        public DateTime End
        {
            get;
            set;
        }

        public bool Busy
        {
            get;
            set;
        }

        public bool Deleted
        {
            get;
            set;
        }
    }
}
4 years ago
Yidna wrote:
If its any help - We used a Task running in the background to read Google Calander using the API then store in a table - You need to setup the API and get the data from Google Calander and store in settings  
Later displayed the table data using FullCalander https://fullcalendar.io/
It also has a link to store enteries into Google Calander
https://fullcalendar.io/releases/fullcalendar/3.9.0/demos/gcal.html

//** Some old Code from V1.7 **/

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Web;
using System.Security.Cryptography.X509Certificates;
using Google.Apis.Authentication.OAuth2;
using Google.Apis.Authentication.OAuth2.DotNetOpenAuth;
using Google.Apis.Calendar.v3;
using Google.Apis.Util;

namespace NopSolutions.NopCommerce.BusinessLogic.Google
{
    public static class GoogleCalendar
    {
        #region Methods

        public static void ReplicateCalendar()
        {
            string eventName = null;

            string calendarId = "GoogleCalanderName";

            var googleEvents = Replicate(calendarId);
            if(!googleEvents.Any())
                return;

            foreach (var i in googleEvents)
            {
                eventName = i.Name;
                if (i.Start > DateTime.Now)
                {
                    bool deleted = !(!i.Deleted && i.Busy);

                    // Do Something with the calendar data

                }
            }
        }

        #endregion

        #region Utils

        private static IEnumerable<GoogleCalendarEvent> Replicate(string calendarId)
        {
            if(String.IsNullOrWhiteSpace(calendarId))
                throw new ArgumentNullException("calendarId");

            calendarId = calendarId.Trim();
            string clientSecret = SettingManager.GetSettingValue("Google.API.ClientSecret");
            string serviceAccountUser = SettingManager.GetSettingValue("Google.API.ServiceAccountUser");
            string serviceCertificate = SettingManager.GetSettingValue("Google.API.ServiceCertificate");
            string key = SettingManager.GetSettingValue("Google.API.Key");
            string serviceCertificatePath = String.Format("{0}files\\Certificates\\{1}", HttpRuntime.AppDomainAppPath, serviceCertificate);

            var certificate = new X509Certificate2(serviceCertificatePath,
                clientSecret,
                X509KeyStorageFlags.MachineKeySet |
                X509KeyStorageFlags.PersistKeySet |
                X509KeyStorageFlags.Exportable);
            var provider = new AssertionFlowClient(GoogleAuthenticationServer.Description, certificate)
            {
                ServiceAccountId = serviceAccountUser,
                Scope = CalendarService.Scopes.CalendarReadonly.GetStringValue()
            };
            var authenticator = new OAuth2Authenticator<AssertionFlowClient>(provider, AssertionFlowClient.GetState);
            var service = new CalendarService(authenticator)
            {
                Key = key
            };
            var req = new EventsResource.ListRequest(service, calendarId)
            {
                ShowDeleted = true,
                TimeMin = DateTime.Now.ToString("yyyy-MM-dd'T'HH:mm:ss.fffK", CultureInfo.InvariantCulture),
                MaxResults = Int32.MaxValue,
                SingleEvents = true,
            };
            var rsp = req.Fetch();
            if(rsp.Items == null || !rsp.Items.Any())
                return Enumerable.Empty<GoogleCalendarEvent>();

            return rsp.Items.Select(x => new GoogleCalendarEvent
            {
                Id = EnsureNotNull(x.Id),
                Name = EnsureNotNull(x.Summary),
                Description = EnsureNotNull(x.Description),
                Start = DateTime.Parse(String.IsNullOrWhiteSpace(x.Start.DateTime) ? x.Start.Date : x.Start.DateTime),
                End = DateTime.Parse(String.IsNullOrWhiteSpace(x.End.DateTime) ? x.Start.Date : x.End.DateTime),            // If end time is null event is all day but save end date as start date
                Busy = !EnsureNotNull(x.Transparency).Equals("transparent", StringComparison.InvariantCultureIgnoreCase),
                Deleted = x.Status.Equals("cancelled", StringComparison.InvariantCultureIgnoreCase)
            }).ToList();
        }

        private static string EnsureNotNull(string s)
        {
            return String.IsNullOrEmpty(s) ? String.Empty : s;
        }

        #endregion
    }

    public struct GoogleCalendarEvent
    {
        public string Id
        {
            get;
            set;
        }

        public string Name
        {
            get;
            set;
        }

        public string Description
        {
            get;
            set;
        }

        public DateTime Start
        {
            get;
            set;
        }

        public DateTime End
        {
            get;
            set;
        }

        public bool Busy
        {
            get;
            set;
        }

        public bool Deleted
        {
            get;
            set;
        }
    }
}


Sir i am using Version 3.8 so please show me the steps to integrate in version 3.8
4 years ago
Still not sure what you want to do? But you (or someone else) is going to need to be doing some developing - the code above can be used in a copy of a task routine for example QueuedMessagesSendTask and used to read from Google Calander in the background. Then you need a new table to store the events from Google.

To display the data these guys have implemented Full Calander on a page see http://demo.nopcommerce.pl/eventCalendar
Maybe whatever else they have done would be useful.
4 years ago
L.K wrote:
Try Google Calendar , you can implement it with your website

Here's the Google Calendar Developer's Guide - http://code.google.com/apis/calendar/data/2.0/developers_guide_protocol.html.
.

This one is best solution..!!