Announcement

Collapse
No announcement yet.

Current Date Prompt

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

    Current Date Prompt

    Has anyone managed to fix the drop down date prompt at product level to be set to a specific date (tomorrow, today + 1 week etc).

    v9.0.2


    Bikster
    SellerDeck Designs and Responsive Themes

    #2
    The silence says it all oh well.


    Bikster
    SellerDeck Designs and Responsive Themes

    Comment


      #3
      CAN'T YOU BE PATIENT?!

      It's only been 7 days, 15 hours and 55 minutes since you asked your question.

      Gee the people on the forum these days.

      Comment


        #4
        If Mr Javascript can't do this himself, I think it is not possible.

        Comment


          #5
          Sorry Duncan. I will go read the forum rules


          Bikster
          SellerDeck Designs and Responsive Themes

          Comment


            #6
            I thought Donna did this on delivery dates about 18 months ago. Normski was involved too i think.

            Comment


              #7
              Originally posted by jont View Post
              Has anyone managed to fix the drop down date prompt at product level to be set to a specific date (tomorrow, today + 1 week etc).

              v9.0.2
              I don't really know what this is is but we have a little bit of java running on our site that sets the date for our shipping info (see cotton bunting .co .uk and select a product or delivery info) I can paste that it if helps?
              D
              Donna

              Chief bunting supplier to Take That!

              Comment


                #8
                OMG, how spooky is that at the same time!!

                Comment


                  #9
                  great minds think a like!
                  I'll go find the code. D
                  Donna

                  Chief bunting supplier to Take That!

                  Comment


                    #10
                    sorry Jont I missed the thread first time round ...

                    Code:
                    <script type="text/javascript"> 
                    <!--
                    var myDate=new Date();
                    if ( myDate.getHours() < 13 ) // less than 1pm
                      {
                    var daystodeliver = [5,7,6,6,6,6,6][myDate.getDay()];
                      }
                    else
                      {
                      var daystodeliver = [5,7,7,7,7,7,6][myDate.getDay()]; 
                      }
                    myDate.setDate(myDate.getDate()+daystodeliver);
                    document.write(['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'][myDate.getDay()]);
                    var dayofmonth =  myDate.getDate();
                    suffix = ((dayofmonth < 10)||(dayofmonth > 20)) ? ['th','st','nd','rd','th','th','th','th','th','th'][dayofmonth % 10] : 'th';
                    document.write(' ' + dayofmonth + suffix + ' ');
                    document.write(['Jan','Feb','March','April','May','June','July','Aug','Sept','Oct','Nov','Dec'][myDate.getMonth()]);
                    // -->
                    </script>
                    Hope this is what you are after. Basically the numbers
                    var daystodeliver = [5,7,6,6,6,6,6][myDate.getDay()];
                    count the days on by this number for each day of the week you can simplify it if you need to (I couldn't obviously! LOL but I'm sure you could). D
                    Donna

                    Chief bunting supplier to Take That!

                    Comment


                      #11
                      And this is how it all came about.

                      http://community.actinic.com/showthr...delivery+dates

                      x
                      Donna

                      Chief bunting supplier to Take That!

                      Comment


                        #12
                        Hi Donna - I need to be able to allow the user to input a future delivery date via the drop down against each product but rather than show 1st Jan it would be nice to be able to <option selected> the current date plus a day so it defaults to tomorrow or Monday if a Friday etc. etc.

                        I can get the javascript to work but integrating anything into the list which generates the <option> is proving tricky as the ListIndex function does not work on drop down lists (only Actinic know why) and a UDV scoped into the layout does not work either.


                        Bikster
                        SellerDeck Designs and Responsive Themes

                        Comment


                          #13
                          I am having similar battles with drop downs being fully accessible here http://community.actinic.com/showthread.php?t=39370 ... that thread is with regards to dynamically changing the product price on screen when the drop down option changes ... when a new component is selected form the drop down I can get Actinic to change the main product price on screen (which is nice) BUT it will not work with VAT exempt products if part of the mix ... I have so far been unable to test if a product is exempt of VAT so as to be able to change the javascript equation accordingly.

                          Give me access to drop down lists please Actinic.


                          Bikster
                          SellerDeck Designs and Responsive Themes

                          Comment


                            #14
                            Sorry, thought I'd helped someone out then.

                            *pulls top back down and stops goal style celebration round the office and sits quietly back in seat*
                            Donna

                            Chief bunting supplier to Take That!

                            Comment


                              #15
                              Sorry to spoil your moment. At least it will be of use to others searching for your solution and finding this thread.


                              Bikster
                              SellerDeck Designs and Responsive Themes

                              Comment

                              Working...
                              X