5 Replies Latest reply on Feb 11, 2010 12:21 AM by Davin_Dhillon

    Kennel Website: Datepickers that calculate a total?

    Davin_Dhillon

      Hello all, just a quick post to see if someone can help.

      I am looking to input a page into a dreamweaver website that calculates a total fee based upon dates in a calendar.

      It's for a kennel and they charge a daily rate.

      I would like the visitors to be able to input the drop off date (with a visual calendar)

      Then input their collection date (also with a visual calendar).

      And have a fee calculated based upon this duration.

       

      Does anyone know a script that does this? I am using Dreamweaver CS4 on a Mac Pro running Snow Leopard.

       

      Thanks

       

      Davin

        • 1. Re: Kennel Website: Datepickers that calculate a total?
          Ben M Adobe Community Professional

          I'll start with the calendar for you.  A good resource I have found is the jQuery UI project:

           

          http://jqueryui.com/

          http://jqueryui.com/demos/datepicker/ - Date Picker. 

          http://jquery.com/ - jQuery

           

          Pretty straight forward.  It's basically just includes and CSS modifications for the styles.  I've set that up a few times without any issues.

           

          With regards to the calculation that is a little more challenging.  Does your client need it to be live or can it be on a check-out or estimate style of page.  If it is the latter you will need to use server-side scripting such as php or asp, if it is the former you will need javascript.  Either way you will need to get more information from your client in order to do this.  Do weekends cost more than weekdays, holidays, etc.?  If all days are the same then you should be able to multiply the difference of date 1 to date 2 by a fixed cost.  However, if there are other variables at play you would need to know that in order to properly calculate the totals.  I'm not sure of anything pre-built, but knowing more information would help determine that.

          • 2. Re: Kennel Website: Datepickers that calculate a total?
            Davin_Dhillon Level 1

            Snakeyes02,

                                Sensational! Thanks for yiur reply.

            I am waiting to hear back from the client however I do feel as though it may be a fixed daily amount, regardless of weekends e.t.c

            I dont think it has to be live (connected to room availability e.t.c) Just a simple caluation with the following drop downs:

             

            Number of Dogs

            Date of Drop Off

            Date of Collection

             

            Then the form to calcuate

            Total: £

             

            Where the amount of days is multiplied by the amount of dogs and then multiplied by the daily rate.

             

            If this can be done with a nice clean simple pop out calendar it would suit my needs perfectly!

             

            I really appreciate your help and I will confirm the rates are all the same accross the board.

             

            Davin

            • 3. Re: Kennel Website: Datepickers that calculate a total?
              Davin_Dhillon Level 1

              Okay, Here goes.

               

              I just spoke to the client and this is how it calculates.

               

              Each day is a flat rate, regardless of what time they drop off, and whether it's a weekend.

              So that makes it easy, each day is a flat rate.

               

              Now here's where it is tricky. They are offering discounts on the amount of dogs at one time.

               

              1 dog = 7.50 GBP per day

              2 dogs = 12 GBP per day

              3 Dogs = 15 GBP per day

               

              So.....

               

              I think it best to run it like:

               

              first Drop Down Box How Many dogs 1, 2, 3, 4, 5

               

              Then the dates with pop out calendars.

               

              So

               

              If the drop down box indicates 1 then it multiplies the amount of days indicated by the calendar by 7.50.

              If the drop down box indicates 2 then it multiplies the amount of days indicated by the calendar by 12

              If the drop down box indicates 3 then it multiplies the amount of days indicated by the calendar by 15

              If the drop down box indicates 4 then it multiplies the amount of days indicated by the calendar by 20 (@5 per dog)

              If the drop down box indicates 5 then it multiplies the amount of days indicated by the calendar by 25 (@5 per dog)

               

              How does that sound?

               

              Let me know if this is too difficult, I understand it is a little tricky.

               

               

              Davin

              • 4. Re: Kennel Website: Datepickers that calculate a total?
                Nancy OShea Adobe Community Professional & MVP

                Let me know if this is too difficult, I understand it is a little tricky.

                 

                Davin,

                If you are unable to build this custom script yourself with jQuery & JavaScripts, you should hire someone who can.  Maybe if you arrange terms privately with SnakEyze02, you'll get some help with this.

                 

                 

                 

                Nancy O.
                Alt-Web Design & Publishing
                Web | Graphics | Print | Media  Specialists
                www.alt-web.com/
                www.twitter.com/altweb
                www.alt-web.blogspot.com

                1 person found this helpful
                • 5. Re: Kennel Website: Datepickers that calculate a total?
                  Davin_Dhillon Level 1

                  Cheers Nancy,

                                      I wasnt sure how it all worked. Both my requirment and this forum.

                  More than happy to pay the right person to get this done as I have never used iQuery OR Javascript.

                  Thanks again.

                  Davin