The 'Other Info' 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…
- Comment out the first 4 lines (using #) and change the last line so that the code reads as
- Save and exit.
- Update the site.
Once this has been done and no text has been entered into the field; the text fields will still appear within the shopping cart.
To make the prompt only appear when text is entered into the field, please follow the instructions below.
In ActinicOrder.pm, search for Display info prompt
You will see the following lines :
Replace these with :
SellerDeck is not able to provide any detailed support for script changes made. If you find that there is a problem, an original copy of the script can be found within the 'Original' folder in your installation. Copy this into your site folder.
- 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…
Code:
if (length $sInfo == 0) { $sMessage .= ACTINIC::GetPhrase(-1, 55, "<B>$sPrompt</B>") . "<P>\n"; } elsif (length $sInfo > 1000)
Code:
#if (length $sInfo == 0) # { # $sMessage .= ACTINIC::GetPhrase(-1, 55, "<B>$sPrompt</B>") . "<P>\n"; # } if (length $sInfo > 1000)
- Update the site.
Once this has been done and no text has been entered into the field; the text fields will still appear within the shopping cart.
To make the prompt only appear when text is entered into the field, please follow the instructions below.
In ActinicOrder.pm, search for Display info prompt
You will see the following lines :
Code:
# Display info prompt # my $sInfoLine; if (length $$pProduct{'OTHER_INFO_PROMPT'} > 0) # if the info is defined, add it to the table { my $sInfo = $CurrentItem{'INFO'}; if ($aFailures->[$nLineCount]->{"INFOINPUT"} && defined $aFailures->[$nLineCount]->{"BAD_INFOINPUT"}) { $sInfo = $aFailures->[$nLineCount]->{"BAD_INFOINPUT"}; } $sInfo = InfoHTMLGenerate($$pProduct{'REFERENCE'}, $nLineCount, $sInfo, !$bIncludeButtons, $aFailures->[$nLineCount]->{"INFOINPUT"}); $sInfo =~ s/%0a/<BR>/g; # Restore new lines $sInfoLine = InfoLineHTML($$pProduct{'OTHER_INFO_PROMPT'}, $sInfo, $sInfoLineHTML); }
Replace these with :
Code:
my $sInfoLine; if (length $CurrentItem{'INFO'} > 0) { # # Display info prompt # if (length $$pProduct{'OTHER_INFO_PROMPT'} > 0) # if the info is defined, add it to the table { my $sInfo = $CurrentItem{'INFO'}; if ($aFailures->[$nLineCount]->{"INFOINPUT"} && defined $aFailures->[$nLineCount]->{"BAD_INFOINPUT"}) { $sInfo = $aFailures->[$nLineCount]->{"BAD_INFOINPUT"}; } $sInfo = InfoHTMLGenerate($$pProduct{'REFERENCE'}, $nLineCount, $sInfo, !$bIncludeButtons, $aFailures->[$nLineCount]->{"INFOINPUT"}); $sInfo =~ s/%0a/<BR>/g; # Restore new lines $sInfoLine = InfoLineHTML($$pProduct{'OTHER_INFO_PROMPT'}, $sInfo, $sInfoLineHTML); } }