Announcement

Collapse
No announcement yet.

Does anyone know why this conditional message does not work?

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

    Does anyone know why this conditional message does not work?

    Does anyone know why this conditional message does not work?

    Example:
    Code:
    <!-- Code to display conditional message between mon - sat -->
    %IF((s.dyn_tm_wday LT 3) OR (s.dyn_tm_wday GT 7))%
    
        <!-- Code to display conditional message between 12:00 pm -3:00 pm ET -->
        %IF((s.dyn_time_t LT 15) OR (s.dyn_time_t GT 24))%
                    
             conditional message text here
    
    %ELSE%
    
        alternate conditional message text here
    
    %IFEND%
    Thank you, Bill Davis

    #2
    Re: Does anyone know why this conditional message does not work?

    Try closing the second if statement.

    Code:
    
    <!-- Code to display conditional message between mon - sat -->
    %IF((s.dyn_tm_wday LT 3) OR (s.dyn_tm_wday GT 7))%
    
        <!-- Code to display conditional message between 12:00 pm -3:00 pm ET -->
        %IF((s.dyn_time_t LT 15) OR (s.dyn_time_t GT 24))%
                    
             conditional message text here
    
    %ELSE%
    
        alternate conditional message text here
    
    %IFEND%
    %IFEND%
    It's a thing about the 4.xx that's easy to forget.

    Comment


      #3
      Re: Does anyone know why this conditional message does not work?

      That did not work, but you were close. At lease now I am able to display the alternate message by moving up the %IFEND% token as displayed below.

      But I still can't get the conditional message to display between 12:00 pm - 3:00 pm ET only. Thus I must have the wrong code for that portion. Though I am able to successfully display message from Monday through Saturday only.

      Code:
      <!-- Code to display conditional message between mon - sat -->
       %IF((s.dyn_tm_wday LT 3) OR (s.dyn_tm_wday GT 7))%
      
            <!-- Code to display conditional message between 12:00 pm -3 :00 pm ET -->
           %IF((s.dyn_time_t LT 15) OR (s.dyn_time_t GT 24))%
      
                 conditional message text here
      
      %IFEND%
      
       %ELSE%
      
            alternate conditional message text here
      
        %IFEND%
      Thank you, Bill Davis

      Comment


        #4
        Re: Does anyone know why this conditional message does not work?

        I think you mean

        LE 12 OR GE 15

        For all hours that are not between 12 & 3 PM

        Or

        GE 12 AND LE 15

        For hours between 12 and 3 PM
        Bruce Golub
        Phosphor Media - "Your Success is our Business"

        Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
        phosphormedia.com

        Comment


          #5
          Re: Does anyone know why this conditional message does not work?

          Thanks Bruce, it seems to be working fine now, will monitor it this week to make sure its working fine.

          One thing though, it there a way to set conditional to be time zone specific? If so, how?
          Thank you, Bill Davis

          Comment


            #6
            Re: Does anyone know why this conditional message does not work?

            in mivascript there is a timezone() function which returns the curent timezone, but I believe that would be for the server, I don't think there is anyway to reliably determine the timezone of your customer. (However, you should adjust your numbers for the server's time zone offset.)
            Bruce Golub
            Phosphor Media - "Your Success is our Business"

            Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
            phosphormedia.com

            Comment


              #7
              Re: Does anyone know why this conditional message does not work?

              Server is fine, if I can adjust for my store time zone (e.g.: -5).

              How would that work?
              Last edited by William Davis; 12-05-11, 04:54 PM.
              Thank you, Bill Davis

              Comment

              Working...
              X