Announcement

Collapse
No announcement yet.

Delivery Cutoff

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Delivery Cutoff

    I am using a courier for next day deliveries that won't accept pickups after 4.30pm. I need to be able to prevent orders for next day delivery being submitted by, say, 4pm, but have them automatically put for the following day with a notification being given to the buyer.

    Can Actinic do this? If not, is there any way of making it do this?

    Thanks

    Ed

    #2
    we really need this feature as well for a client who sells flowers online..

    it would be very much appreciated if when choosing the date for delivery of the flowers if it wouldnt offer them todays date if it is after 11.30 in the morning..

    tia

    steve
    harlequin domains

    Comment


      #3
      Steve,

      Your one could be done (I think) with a bit of JavaScript in the product that checks the Date Prompt and compares that with the local time.

      Since this time would come from the clients system there's some possibility of error if they've set their clock wrong.

      Ed,

      Other than a putting a big message on the site I don't think there's an easy way to remove the Next Day shipping option dynamically without messing with the Perl scripts.



      Norman
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        im sure our client wouldnt mind paying some for this norman, it causes her quite a lot of grief...and ps. could it take its time from our server rather than client machine?

        eg. someone in america 8 hours behind can order flowers thinking its gonna be delivered tomorrow...but in uk time the 11.30 deadline is passed so it really does need to check the time on our server rather than client end


        steve

        Comment


          #5
          Steve,

          The client-side JavaScript can collect the Universtal (GMT) time so, (apart from daylight saving considerations) you'd know the time in the UK. However as this is still a client-side function it still depends on their clock being correct and that the've set up the correct time zone.

          Doing this on the server would require some scripting capabilities there. You'd have to tell me what you have available.

          Norman
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            whatever you need i will either get, beg, borrow it...and install/allow

            my servers are standard win2k sp4 boxes with perl/php/asp/aspx and this one running mssql server as well

            does that help..

            Comment


              #7
              Thanks for the reply Norman.

              I did a bit a bit of digging and got the attached perl from "http://www.webreference.com/js/tips/000109.html" (not a bad reference site). The script is server side include that delivers the servers local date and time. Thought it migh help Steve.

              Ed
              Attached Files

              Comment


                #8
                ive got my fingers and toes crossed it will help norman to help me...

                thanks a bunch if you excuse the pun

                Comment


                  #9
                  Here's Ed's file from Webreference rejigged to return the hour and minute as JavaScript variables. So it shouldn't be too hard to check the time before allowing same day shipment. You'd also want to set some JavaScript variables for the current day, month and year - I left those out for brevity.

                  Code:
                  You can use server-side includes in various ways to display the date on a Web page. 
                  However, we do not recommend this method, because server-side includes increase the time it takes users to access your Web pages. 
                  Furthermore, turning on server-side includes may pose a security risk to your system.
                  
                  If you decide to use a server-side include to display the date, despite the disadvantages, you must make sure they are turned on. 
                  For more information on enabling server-side includes, check out the NCSA HTTPd documentation (http://hoohoo.ncsa.uiuc.edu/docs/tut.../includes.html).
                  
                  The first step is to create a CGI (Perl) script that returns the hour and minute as JavaScript variables. 
                  Simply copy the following code and paste it in a text file named getservertime.pl (the file must be located in the cgi-bin directory):
                  
                  
                  #!c:/Perl/bin/perl.exe
                  # change this to perl's real path (I'm running the Standalone Server here)
                  # replace localtime with gmtime for GMT (UTC)
                   my($sec,  $min,  $hour, $mday, $mon,  $year, $wday, $yday, $isdst) = localtime(time); 
                   print "Content-type: text/html\n\n"; # HTTP header
                   print "<script language=JavaScript>\n";
                   print "var curhour = $hour;\n";
                   print "var curmin = $min;\n";
                   print "</script>\n";
                  
                  
                  
                  Now here's a demo page that uses the above script (test.shtml) - I've set the server to parse only .shtml files:
                  
                  
                  <html>
                  <head>
                  <title>Test</title>
                  </head>
                  <body>
                  We'll execute the server side include to return the hour and minute as JavaScript variables now.
                  <!--#exec cgi="/cgi-bin/getservertime.pl"-->
                  <br>
                  Done that (nothing should have appeared above).
                  <br>
                  Now we'll use these in some JavaScript to display the hour and minute.
                  <br>
                  
                  <script language=JavaScript>
                  document.write(curhour + ':' + curmin);
                  </script>
                  
                  <br>
                  Done that. You should see the time above here.
                  </body>
                  </html>
                  
                  
                  You should enter the virtual path to the script (getservertime.pl), or the full URL. 
                  This is not the script's real path, but the one you would use to execute it with your browser.
                  This is a somewhat clumsy and possibly insecure perl based solution. There must be easier ways on PHP based servers but I'm not running that at the moment.

                  Norman
                  Norman - www.drillpine.biz
                  Edinburgh, U K / Bitez, Turkey

                  Comment

                  Working...
                  X