View Full Version : Can NETQUOTEVAR:OTHERINFOPROMPT be not required?
stoffeman
16-Jun-2005, 10:38 AM
I am looking for a way to make NETQUOTEVAR:OTHERINFOPROMPT not required, as well as NETQUOTEVAR : DATEPROMPT.
The objective is to make it possible for users to leave the 'Dedication' and 'Date' fields blank at
http://www.futureforests.com/acatalog/Future_Forests_plant_a_tree_4.html
Is this possible?
TraceyG
20-Jun-2005, 10:39 AM
Hi,
To stop the 'Other Info Prompt' from being required you can amend the ActinicOrder.pm file in your site folder (usually Site1). Open this file in a text editor such as notepad and search for:
if (length $sInfo == 0) # if there is no info, reprompt
{
$sMessage .= ACTINIC::GetPhrase(-1, 55, "<B>$sPrompt</B>") . "<P>\n";
}
elsif (length $sInfo > 1000)
{
$sMessage .= ACTINIC::GetPhrase(-1, 56, "<B>$sPrompt</B>") . "<P>\n";
}
Change this to read:
#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, 56, "<B>$sPrompt</B>") . "<P>\n";
}
I will ask our development team if it is possible to leave the date field blank.
TraceyG
20-Jun-2005, 03:54 PM
Hi,
The following change will treat the default date as null and will not appear in the cart, on the receipt or on the invoice.
Edit ActinicOrder.pm in a text editor such as notepad:
Search for '$$pProduct{'DATE_PROMPT'}' you will see...
if (length $$pProduct{'DATE_PROMPT'} > 0
replace this with...
# if (length $$pProduct{'DATE_PROMPT'} > 0
my $bDateExists = (length $$pProduct{'DATE_PROMPT'} > 0);
if (!defined $CurrentItem{"DATE"} ||
($CurrentItem{"DATE"} eq "2000/01/01"))
{
$bDateExists = $::FALSE;
}
if ($bDateExists)
Search for 'if ($bDateExists)' you will see...
if ($bDateExists)
{
$nDay = substr($$pOrderDetails{"DATE"}, 8, 2);
$nMonth = substr($$pOrderDetails{"DATE"}, 5, 2);
$nYear = substr($$pOrderDetails{"DATE"}, 0, 4);
Insert before the above lines...
if (!defined $$pOrderDetails{"DATE"} ||
($$pOrderDetails{"DATE"} eq "2000/01/01"))
{
$$pOrderDetails{"DATE"} eq "";
$bDateExists = $::FALSE;
}
Save and Exit
Edit Cart.pm in a text editor
Search for '$pCartItem->{'DATE'}' you should see...
if ($pCartItem->{'DATE'}
replace the above line with...
if ($pCartItem->{'DATE'} &&
$pCartItem->{"DATE"} ne "2000/01/01")
Search for '$pCartItem->{'DATE'} = $sYear' you should see...
$pCartItem->{'DATE'} = $sYear . "/" . $sMonth . "/" . $sDay;
replace this with...
my $sTemp = $sYear . "/" . $sMonth . "/" . $sDay;
if ($sTemp ne "2000/01/01")
{
$pCartItem->{'DATE'} = $sYear . "/" . $sMonth . "/" . $sDay;
}
Search again for '$pCartItem->{'DATE'} = $sYear' and make the same change as above.
Save and Exit.
The above assumes that the default date is 01/01/2000. adjust the above if using a different default date.
Actinic 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.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.