Announcement

Collapse
No announcement yet.

Other info prompt

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

    Other info prompt

    Hi again

    Im trying to make the other imfo prompt optional.
    I have found in the knowledge base the following:

    This prompt can be made optional by editing one of the perl scripts.
    - Locate the file ActinicOrder.pm in the site folder.
    - Edit the file with a text editor such as Notepad.
    - Search for "sub InfoValidate", you should see…

    if (length $sInfo == 0)
    {
    $sMessage .= ACTINIC::GetPhrase(-1, 55, "<B>$sPrompt</B>") . "<P>\n";
    }
    elsif (length $sInfo > 1000)

    - Comment out the first 4 lines (using #) and change the last line so that the code reads as

    #if (length $sInfo == 0)
    # {
    # $sMessage .= ACTINIC::GetPhrase(-1, 55, "<B>$sPrompt</B>") . "<P>\n";
    # }
    if (length $sInfo > 1000)

    - Save and exit.
    - Update the site.


    I have found the file I need to change but can you tell me exactly where I need to 'comment out' and insert the new html?

    Thank you

    #2
    The Subroutine is headed by a comment section describing the function. If you open the ActinicOrder.pm file in Notepad, and click Edit | Find - type InfoValidate in the text box and click Find, then click Find Next until you see the if (length $sInfo == 0) code.

    You will insert four # marks at the beginning of the first four lines and then delete 'else' from the elseif on the fifth line. There is no new code to be added.
    Bill
    www.egyptianwonders.co.uk
    Text directoryWorldwide Actinic(TM) shops
    BC Ness Solutions Support services, custom software
    Registered Microsoft™ Partner (ISV)
    VoIP UK: 0131 208 0605
    Located: Alexandria, EGYPT

    Comment


      #3
      Hi Bill

      Ive tried this....

      sub InfoValidate
      ####
      {
      my $sProdref = shift; # the reference of the product
      my $sInfo = shift; # the value of the field
      my $sPrompt = shift; # the prompt for the field
      my $sMessage;
      #
      # The default processing doesn't depend on the product reference
      # If you want product specific prodessing the edit the line
      # below as appropriate

      if (length $sInfo == 0) # if there is no info, reprompt
      {
      $sMessage .= ACTINIC::GetPhrase(-1, 55, "<B>$sPrompt</B>") . "<P>\n";
      }
      if (length $sInfo > 1000)
      {
      $sMessage .= ACTINIC::GetPhrase(-1, 5, "<B>$sPrompt</B>") . "<P>\n";
      }

      Have I put the #### in the wrong place?

      Sorry to be a pain

      Comment


        #4
        You have - it should read

        Code:
        #if (length $sInfo == 0) # if there is no info, reprompt
        #{
        #$sMessage .= ACTINIC::GetPhrase(-1, 55, "<B>$sPrompt</B>") . "<P>\n";
        #}
        if (length $sInfo > 1000)
        {
        $sMessage .= ACTINIC::GetPhrase(-1, 5, "<B>$sPrompt</B>") . "<P>\n";
        }
        Bill
        www.egyptianwonders.co.uk
        Text directoryWorldwide Actinic(TM) shops
        BC Ness Solutions Support services, custom software
        Registered Microsoft™ Partner (ISV)
        VoIP UK: 0131 208 0605
        Located: Alexandria, EGYPT

        Comment


          #5
          Bill

          Thank you.

          That has worked perfectly.

          I can now sleep!

          Comment

          Working...
          X