I've tried the formprocessor.php and all the variables are there, but still getting this message.
Also tried using the .htaccess file with the both scripts suggested, but still no luck!
I'm at my wits end
Here is my checkout.php code below:
<?
//=====================================================================||
// NOP Design JavaScript Shopping Cart ||
// PHP SCRIPT Checkout Module ||
// ||
// For more information on SmartSystems, or how NOPDesign can help you ||
// Please visit us on the WWW at http://www.nopdesign.com ||
// ||
// Javascript portions of this shopping cart software are available as ||
// freeware from NOP Design. You must keep this comment unchanged in ||
// your code. For more information contact FreeCart@NopDesign.com. ||
// ||
// JavaScript Shop Module, V.4.4.0 ||
//=====================================================================||
// ||
// Function: Writes available form elements from the NOP ||
// Free Cart (http://www.nopdesign.com/freecart) ||
// and other form elements to an email file, and ||
// send user confirmation ||
// ||
//=====================================================================||
//######################################################################
// #
// User defined variables: #
// $header - string value containing the complete #
// path of the HTML page header #
// $footer - string value containing the complete #
// path of the HTML page footer #
// $youremail - string value containing the email address to #
// send catalog orders in EMAIL or BOTH modes #
// $returnpage - URL to send user when checkout is complete #
// $csvfilename - string value containing the complete #
// path of the user database. #
// $csvquote - string value containing what to use for quotes #
// in the csv file (typically "" or \") #
// $mode - string value containing 'EMAIL', 'FILE' or #
// 'BOTH' to determine if the script should send #
// an email to you with the new order, write the #
// order to a CSV file, or do both. #
//######################################################################
$header = "header.html";
$footer = "footer.html";
$returnpage = "/";
$youremail = "info@bridaletc.co.za";
$csvfilename = "orders.csv";
$csvquote = "\"\"";
$mode = "BOTH";
$stamp = strtotime ("now");
$orderid = "$stamp-$remote_addr";
$orderid = str_replace(".", "", "$orderid");
$b_first = $_POST["b_first"];
$b_last = $_POST["b_last"];
$b_addr = $_POST["b_addr"];
$b_addr2 = $_POST["b_addr2"];
$b_city = $_POST["b_city"];
$b_state = $_POST["b_state"];
$b_zip = $_POST["b_zip"];
$b_email = $_POST["b_email"];
$b_phone = $_POST["b_phone"];
$b_fax = $_POST["b_fax"];
$SUBTOTAL = $_POST["SUBTOTAL"];
$TOTAL = $_POST["TOTAL"];
//##############################################################
//#FUNCTION: doFormError #
//#RETURNS: #
//#PARAMETERS: A error message string. #
//#PURPOSE: Generates an HTML page indicating a form #
//# submission error occurred. #
//##############################################################
function doFormError($errString) {
include("header.html");
echo "<FONT SIZE=+2>The form you submitted was not complete.<BR><BR></FONT>";
echo "$errString<BR><BR>\n";
echo "<INPUT TYPE=BUTTON ONCLICK='history.back()' VALUE=' Return to the checkout page '><HR>";
include("footer.html");
exit;
}
//##############################################################
//#FUNCTION: doError #
//#RETURNS: #
//#PARAMETERS: A error message string. #
//#PURPOSE: Generates an HTML page indicating an error #
//# occurred. #
//##############################################################
function doError($errString) {
include($header);
echo "$errString<BR><BR>\n";
include($footer);
exit;
}
//##############################################################
//##############################################################
//### MAIN ###
//##############################################################
//##############################################################
if (($b_first == "") || ($b_last == "") || ($b_addr == "") || ($b_city == "") || ($b_zip == "") || ($b_phone == "") || ($b_email == "") || ($w_date =="" )) {
doFormError("I'm sorry, but it appears that you forgot to fill in a required field. Please go <A HREF='Javascript:history.go(-1);'>back</A> and correct the error.");
exit;
}
//# checks for valid email address
if( !(ereg("^(.+)@(.+)\\.(.+)$",$b_email)) ) {
doFormError("You submitted an invalid email address. Please go <A HREF='Javascript:history.go(-1);'>back</A> and correct the error.");
exit;
}
$today = date ("l, F jS Y");
$strMessageBody = "";
$strMessageBody .= "Thank you for your order with Bridal Etcetera.\n";
$strMessageBody .= "Our despatch time for our swarovski tiaras, hairpins & combs is 2-3 weeks.\n";
$strMessageBody .= "Diamante tiaras are despatched on confirmation of payment.\n";
$strMessageBody .= "For beaded items a 50% deposit is required to confirm your order. For our diamante tiaras the full amount is required to be paid. Please deposit the amount owing into our bank account.To prevent delays, please fax payment confirmaion to 086-640-2138. \n";
$strMessageBody .= "\n";
$strMessageBody .= "Our account details are:\n";
$strMessageBody .= "Standard Bank\n";
$strMessageBody .= "Branch: Thibault Square\n";
$strMessageBody .= "Branch Code: 020909\n";
$strMessageBody .= "Account No: 270910239\n";
$strMessageBody .= "\n";
$strMessageBody .= "If you have any concerns or questions, please email info@bridaletc.co.za \n";
$strMessageBody .= "Below is confirmation of your website order from http://www.bridaletc.co.za \n";
$strMessageBody .="\n";
$strMessageBody .= "Order Date: $today \n";
$strMessageBody .= " \n";
$strMessageBody .= "Order Number: $orderid \n";
$strMessageBody .= " \n";
$strMessageBody .= " \n";
$strMessageBody .= "Qty Price(\R) Product ID - Product Name\n";
$strMessageBody .= "===================================================================== \n";
$strMessageBody .= "$QUANTITY_1 R$PRICE_1 $ID_1 - $NAME_1 $ADDTLINFO_1 $ADDTLINFO2_1 \n";
if( $NAME_2 ) {$strMessageBody .= "$QUANTITY_2 R$PRICE_2 $ID_2 - $NAME_2 $ADDTLINFO_2 $ADDTLINFO2_2 \n";}
if( $NAME_3 ) {$strMessageBody .= "$QUANTITY_3 R$PRICE_3 $ID_3 - $NAME_3 $ADDTLINFO_3 $ADDTLINFO2_3 \n";}
if( $NAME_4 ) {$strMessageBody .= "$QUANTITY_4 R$PRICE_4 $ID_4 - $NAME_4 $ADDTLINFO_4 $ADDTLINFO2_4 \n";}
if( $NAME_5 ) {$strMessageBody .= "$QUANTITY_5 R$PRICE_5 $ID_5 - $NAME_5 $ADDTLINFO_5 $ADDTLINFO2_5 \n";}
if( $NAME_6 ) {$strMessageBody .= "$QUANTITY_6 R$PRICE_6 $ID_6 - $NAME_6 $ADDTLINFO_6 $ADDTLINFO2_6 \n";}
if( $NAME_7 ) {$strMessageBody .= "$QUANTITY_7 R$PRICE_7 $ID_7 - $NAME_7 $ADDTLINFO_7 $ADDTLINFO2_7 \n";}
if( $NAME_8 ) {$strMessageBody .= "$QUANTITY_8 R$PRICE_8 $ID_8 - $NAME_8 $ADDTLINFO_8 $ADDTLINFO2_8 \n";}
if( $NAME_9 ) {$strMessageBody .= "$QUANTITY_9 R$PRICE_9 $ID_9 - $NAME_9 $ADDTLINFO_9 $ADDTLINFO2_9 \n";}
if( $NAME_10 ){$strMessageBody .= "$QUANTITY_10 R$PRICE_10 $ID_10 - $NAME_10 $ADDTLINFO_10 $ADDTLINFO2_10 \n";}
if( $NAME_11 ){$strMessageBody .= "$QUANTITY_11 R$PRICE_11 $ID_11 - $NAME_11 $ADDTLINFO_11 $ADDTLINFO2_11 \n";}
if( $NAME_12 ){$strMessageBody .= "$QUANTITY_12 R$PRICE_12 $ID_12 - $NAME_12 $ADDTLINFO_12 $ADDTLINFO2_12 \n";}
if( $NAME_13 ){$strMessageBody .= "$QUANTITY_13 R$PRICE_13 $ID_13 - $NAME_13 $ADDTLINFO_13 $ADDTLINFO2_13 \n";}
$strMessageBody .= "===================================================================== \n";
$strMessageBody .= "SUBTOTAL: $SUBTOTAL \n";
$strMessageBody .= "SHIPPING: $SHIPPING \n";
$strMessageBody .= "\n";
$strMessageBody .= "TOTAL: $TOTAL \n";
$strMessageBody .= "\n\n";
$strMessageBody .= "Comments: \n";
$strMessageBody .= "--------- \n";
$strMessageBody .= "$comment \n";
$strMessageBody .= " \n";
$strMessageBody .= " \n";
$strMessageBody .= "Post To: \n";
$strMessageBody .= "-------- \n";
$strMessageBody .= " $b_first $b_last \n";
$strMessageBody .= " $b_addr \n";
$strMessageBody .= " $b_addr2 \n";
$strMessageBody .= " $b_city, $b_zip \n";
$strMessageBody .= " $b_phone \n";
$strMessageBody .= " $b_fax \n";
$strMessageBody .= " $b_email \n";
$strMessageBody .= " \n";
$strMessageBody .= " \n";
$strMessageBody .= "WEDDING DATE: \n";
$strMessageBody .= "------------- \n";
$strMessageBody .= " $w_date \n";
//# Send email order to you...
$mailheaders = "From: $b_email\r\n";
$mailheaders .="X-Mailer: PHP Mail generated by:NOP Design Shopping Cart\r\n";
$subject = "New Online Order";
mail($youremail, $subject, $strMessageBody, $mailheaders);
if( $mode == "BOTH" || $mode == "FILE") {
$csvcomments = $comment;
if (!$CSVF = fopen($csvfilename,'a')) {
doError("Unable to open CSV file for writing. Your order has not been saved.");
exit;
}
fputs($CSVF, $string);
fputs($CSVF, "\"");
fputs($CSVF, "$orderid");
fputs($CSVF, "\",\"");
fputs($CSVF, "$today");
fputs($CSVF, "\",\"");
fputs($CSVF, "$b_first");
fputs($CSVF, "\",\"");
fputs($CSVF, "$b_last");
fputs($CSVF, "\",\"");
fputs($CSVF, "$b_addr");
fputs($CSVF, "\",\"");
fputs($CSVF, "$b_addr2");
fputs($CSVF, "\",\"");
fputs($CSVF, "$b_city");
fputs($CSVF, "\",\"");
fputs($CSVF, "$b_zip");
fputs($CSVF, "\",\"");
fputs($CSVF, "$b_phone");
fputs($CSVF, "\",\"");
fputs($CSVF, "$b_fax");
fputs($CSVF, "\",\"");
fputs($CSVF, "$b_email");
fputs($CSVF, "\",\"");
fputs($CSVF, "$s_first");
fputs($CSVF, "\",\"");
fputs($CSVF, "$s_last");
fputs($CSVF, "\",\"");
fputs($CSVF, "$s_addr");
fputs($CSVF, "\",\"");
fputs($CSVF, "$s_addr2");
fputs($CSVF, "\",\"");
fputs($CSVF, "$s_city");
fputs($CSVF, "\",\"");
fputs($CSVF, "$s_zip");
fputs($CSVF, "\",\"");
fputs($CSVF, "$s_phone");
fputs($CSVF, "\",\"");
fputs($CSVF, "$w_date");
fputs($CSVF, "\",\"");
fputs($CSVF, "$QUANTITY_1");
fputs($CSVF, "\",\"");
fputs($CSVF, "\$$PRICE_1");
fputs($CSVF, "\",\"");
fputs($CSVF, "$ID_1");
fputs($CSVF, "\",\"");
fputs($CSVF, "$NAME_1");
fputs($CSVF, "\",\"");
fputs($CSVF, "$ADDTLINFO_1");
fputs($CSVF, "\",\"");
fputs($CSVF, "$QUANTITY_2");
fputs($CSVF, "\",\"");
fputs($CSVF, "\$$PRICE_2");
fputs($CSVF, "\",\"");
fputs($CSVF, "$ID_2");
fputs($CSVF, "\",\"");
fputs($CSVF, "$NAME_2");
fputs($CSVF, "\",\"");
fputs($CSVF, "$ADDTLINFO_2");
fputs($CSVF, "\",\"");
fputs($CSVF, "$QUANTITY_3");
fputs($CSVF, "\",\"");
fputs($CSVF, "\$$PRICE_3");
fputs($CSVF, "\",\"");
fputs($CSVF, "$ID_3");
fputs($CSVF, "\",\"");
fputs($CSVF, "$NAME_3");
fputs($CSVF, "\",\"");
fputs($CSVF, "$ADDTLINFO_3");
fputs($CSVF, "\",\"");
fputs($CSVF, "$QUANTITY_4");
fputs($CSVF, "\",\"");
fputs($CSVF, "\$$PRICE_4");
fputs($CSVF, "\",\"");
fputs($CSVF, "$ID_4");
fputs($CSVF, "\",\"");
fputs($CSVF, "$NAME_4");
fputs($CSVF, "\",\"");
fputs($CSVF, "$ADDTLINFO_4");
fputs($CSVF, "\",\"");
fputs($CSVF, "$QUANTITY_5");
fputs($CSVF, "\",\"");
fputs($CSVF, "\$$PRICE_5");
fputs($CSVF, "\",\"");
fputs($CSVF, "$ID_5");
fputs($CSVF, "\",\"");
fputs($CSVF, "$NAME_5");
fputs($CSVF, "\",\"");
fputs($CSVF, "$ADDTLINFO_5");
fputs($CSVF, "\",\"");
fputs($CSVF, "$QUANTITY_6");
fputs($CSVF, "\",\"");
fputs($CSVF, "\$$PRICE_6");
fputs($CSVF, "\",\"");
fputs($CSVF, "$ID_6");
fputs($CSVF, "\",\"");
fputs($CSVF, "$NAME_6");
fputs($CSVF, "\",\"");
fputs($CSVF, "$ADDTLINFO_6");
fputs($CSVF, "\",\"");
fputs($CSVF, "$QUANTITY_7");
fputs($CSVF, "\",\"");
fputs($CSVF, "\$$PRICE_7");
fputs($CSVF, "\",\"");
fputs($CSVF, "$ID_7");
fputs($CSVF, "\",\"");
fputs($CSVF, "$NAME_7");
fputs($CSVF, "\",\"");
fputs($CSVF, "$ADDTLINFO_7");
fputs($CSVF, "\",\"");
fputs($CSVF, "$QUANTITY_8");
fputs($CSVF, "\",\"");
fputs($CSVF, "\$$PRICE_8");
fputs($CSVF, "\",\"");
fputs($CSVF, "$ID_8");
fputs($CSVF, "\",\"");
fputs($CSVF, "$NAME_8");
fputs($CSVF, "\",\"");
fputs($CSVF, "$ADDTLINFO_8");
fputs($CSVF, "\",\"");
fputs($CSVF, "$QUANTITY_9");
fputs($CSVF, "\",\"");
fputs($CSVF, "\$$PRICE_9");
fputs($CSVF, "\",\"");
fputs($CSVF, "$ID_9");
fputs($CSVF, "\",\"");
fputs($CSVF, "$NAME_9");
fputs($CSVF, "\",\"");
fputs($CSVF, "$ADDTLINFO_9");
fputs($CSVF, "\",\"");
fputs($CSVF, "$QUANTITY_10");
fputs($CSVF, "\",\"");
fputs($CSVF, "\$$PRICE_10");
fputs($CSVF, "\",\"");
fputs($CSVF, "$ID_10");
fputs($CSVF, "\",\"");
fputs($CSVF, "$NAME_10");
fputs($CSVF, "\",\"");
fputs($CSVF, "$ADDTLINFO_10");
fputs($CSVF, "\",\"");
fputs($CSVF, "$QUANTITY_11");
fputs($CSVF, "\",\"");
fputs($CSVF, "\$$PRICE_11");
fputs($CSVF, "\",\"");
fputs($CSVF, "$ID_11");
fputs($CSVF, "\",\"");
fputs($CSVF, "$NAME_11");
fputs($CSVF, "\",\"");
fputs($CSVF, "$ADDTLINFO_11");
fputs($CSVF, "\",\"");
fputs($CSVF, "$QUANTITY_12");
fputs($CSVF, "\",\"");
fputs($CSVF, "\$$PRICE_12");
fputs($CSVF, "\",\"");
fputs($CSVF, "$ID_12");
fputs($CSVF, "\",\"");
fputs($CSVF, "$NAME_12");
fputs($CSVF, "\",\"");
fputs($CSVF, "$ADDTLINFO_12");
fputs($CSVF, "\",\"");
fputs($CSVF, "$QUANTITY_13");
fputs($CSVF, "\",\"");
fputs($CSVF, "\$$PRICE_13");
fputs($CSVF, "\",\"");
fputs($CSVF, "$ID_13");
fputs($CSVF, "\",\"");
fputs($CSVF, "$NAME_13");
fputs($CSVF, "\",\"");
fputs($CSVF, "$ADDTLINFO_13");
fputs($CSVF, "\",\"");
fputs($CSVF, "$SUBTOTAL");
fputs($CSVF, "\",\"");
fputs($CSVF, "$TOTAL");
fputs($CSVF, "\",\"");
fputs($CSVF, "$SHIPPING");
fputs($CSVF, "\",\"");
fputs($CSVF, "$comment");
fputs($CSVF, "\"\n");
fclose($CSVF);
}
//# Send email conformation to the customer.....
$mailheaders = "From: $youremail\r\n";
$mailheaders .="X-Mailer: PHP Mail generated by:NOP Design Shopping Cart\r\n";
$subject = "Order Confirmation";
mail($b_email, $subject, $strMessageBody, $mailheaders);
include($header);
echo "<h2>Bridal Etc - Thank you</h2>";
echo "Thank you for your order from our online store. You will receive a confirmation email of your order momentarily. ";
echo "<p>";
echo "Please contact us at $youremail if you have any questions or concerns.";
echo "<br>Please reference your <u> OrderID $orderid </u>.";
echo "<p><A HREF=\"$returnpage\" target=_top>Return Home</A>";
echo "<P>";
include($footer);
?>
