Can Not Get The Subtotal And Total to show

Get help with nopcart intergration with MS FrontPage and related issues

Moderators: Koibito, Rosey

Can Not Get The Subtotal And Total to show

Postby brad0525 » Fri Jan 02, 2009 4:58 pm

Hello,

This script works great but I am not sure how to get the Subtotal and Total amounts to work. The email send everything but the subtotal and total lines are always blank. Any ideas on how to correct this would be great. Below is both my manage cart script and checkout.php script .thanks

Below is my managercart.html

Code: Select all
<SCRIPT LANGUAGE="JavaScript">

//=====================================================================||
//               NOP Design JavaScript Shopping Cart                   ||
//                                                                     ||
// 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 under the GPL.  You must keep this comment ||
// unchanged in your code.  For more information contact               ||
// Scott@NopDesign.com                                                 ||
//                                                                     ||
// JavaScript Shop Module, V.3.0.2                                     ||
//=====================================================================||


//---------------------------------------------------------------------||
// FUNCTION:    checkForm                                              ||
// PARAMETERS:  Form object, and true/false if we should check for     ||
//              a credit card number. You shouldn't accept credit cards||
//              via email.  Only use that when you are connected to a  ||
//              secure server.                                         ||
// RETURNS:     boolean (True form is correct, False form is in error) ||
// PURPOSE:     To check form elements                                 ||
//---------------------------------------------------------------------||
function checkForm(thisForm, checkForCreditCard)  {
        bFormError = false;   //Boolean variable to store form state
        bIsValidCard = false; //Boolean variable to store CC state
        strErrorList = "";    //String list of missing/errorsum fields

        if( thisForm.FIRST.value==''  ) {bFormError = true;  strErrorList += "First Name, ";}
        if( thisForm.LAST.value==''   ) {bFormError = true;  strErrorList += "Last Name, ";}
        if( thisForm.ADDRESS.value=='') {bFormError = true;  strErrorList += "Address, ";}
        if( thisForm.CITY.value==''   ) {bFormError = true;  strErrorList += "City, ";}
        if( thisForm.STATE.value==''  ) {bFormError = true;  strErrorList += "State, ";}
        if( thisForm.ZIP.value==''    ) {bFormError = true;  strErrorList += "Zip, ";}
        if( thisForm.PHONE.value==''  ) {bFormError = true;  strErrorList += "Phone, ";}
        if( thisForm.ACCOUNT.value=='') {bFormError = false;  strErrorList += "Credit Card Number, ";}
        if( thisForm.MONTH.value==''  ) {bFormError = false;  strErrorList += "Month, ";}
        if( thisForm.YEAR.value==''   ) {bFormError = false;  strErrorList += "Year ";}
        if( bFormError == true ) {
                alert("I'm sorry, but you had one or more missing or invalid entries.\n"
                     +"Please check the following fields: \n\n"
                     +strErrorList
                     +"\n\n");
                return false;
        }

                //Check for valid Visa
                if (((thisForm.ACCOUNT.value.length == 16) || (thisForm.ACCOUNT.value.length == 13)) &&
                (thisForm.ACCOUNT.value.substring(0,1) == 4))
                                bIsValidCard = true;

                //Check for valid MasterCard
                firstdig = thisForm.ACCOUNT.value.substring(0,1);
                seconddig = thisForm.ACCOUNT.value.substring(1,2);
                if ((thisForm.ACCOUNT.value.length == 16) &&
                    (firstdig == 5) && ((seconddig >= 1) &&
                        (seconddig <= 5))
                   )
                        bIsValidCard = true;

                if (bIsValidCard == false){
                        alert("I'm sorry, but you need to enter a valid credit card number.\n");
                        return false;
                }

        return needComments();
} //END function checkForm


//---------------------------------------------------------------------||
// FUNCTION:    CKquantity                                             ||
// PARAMETERS:  Quantity to                                            ||
// RETURNS:     Quantity as a number, and possible alert               ||
// PURPOSE:     Make sure quantity is represented as a number          ||
//---------------------------------------------------------------------||
function CKquantity(checkString) {

        strNewQuantity = "";    // String Adjusted Item Quantity
        count     = 0;          // Generic Loop Counter

        for (i = 0; i < checkString.length; i++) {
                ch = checkString.substring(i, i+1);

                if ((ch >= "0" && ch <= "9") || (ch == '.')) {
                        strNewQuantity += ch;
                }
        }

        if (strNewQuantity.length < 1)
                strNewQuantity = "1";

        return strNewQuantity;
}


//---------------------------------------------------------------------||
// FUNCTION:    AddToCart                                              ||
// PARAMETERS:  Form Object                                            ||
// RETURNS:     Cookie to user's browser, with prompt                  ||
// PURPOSE:     Adds a product to the user's shopping cart             ||
//---------------------------------------------------------------------||
function AddToCart(thisForm) {

        iNumberOrdered = 0;  //Integer number of products already ordered

        iNumberOrdered = GetCookie("NumberOrdered");
        iNumberOrdered++;

        if ( iNumberOrdered > 12 )
                alert("I'm Sorry, your cart is full, please proceed to checkout.");
        else {
                dbUpdatedOrder = thisForm.QUANTITY.value + "|"
                                 + thisForm.PRICE.value  + "|"
                                 + thisForm.ID_NUM.value + "|"
                                 + thisForm.NAME.value;

                NewOrder = "Order." + iNumberOrdered;
                SetCookie (NewOrder, dbUpdatedOrder, null, "/");
                SetCookie ("NumberOrdered", iNumberOrdered, null, "/");

                notice = thisForm.QUANTITY.value + " "
                         + thisForm.NAME.value
                         + " added to your shopping cart."

                alert(notice);
        }
}


//---------------------------------------------------------------------||
// FUNCTION:    getCookieVal                                           ||
// PARAMETERS:  offset                                                 ||
// RETURNS:     URL unescaped Cookie Value                             ||
// PURPOSE:     Get a specific value from a cookie                     ||
//---------------------------------------------------------------------||
function getCookieVal (offset) {
        var endstr = document.cookie.indexOf (";", offset);
        if (endstr == -1)
                endstr = document.cookie.length;
        return unescape(document.cookie.substring(offset, endstr));
}


//---------------------------------------------------------------------||
// FUNCTION:    FixCookieDate                                          ||
// PARAMETERS:  date                                                   ||
// RETURNS:     date                                                   ||
// PURPOSE:     Fixes cookie date, stores back in date                 ||
//---------------------------------------------------------------------||
function FixCookieDate (date) {
        var base = new Date(0);
        var skew = base.getTime();
        date.setTime (date.getTime() - skew);
}


//---------------------------------------------------------------------||
// FUNCTION:    GetCookie                                              ||
// PARAMETERS:  Name                                                   ||
// RETURNS:     Value in Cookie                                        ||
// PURPOSE:     Retrieves cookie from users browser                    ||
//---------------------------------------------------------------------||
function GetCookie (name) {
        var arg = name + "=";
        var alen = arg.length;
        var clen = document.cookie.length;
        var i = 0;
        while (i < clen)
                {
                var j = i + alen;
                if (document.cookie.substring(i, j) == arg) return getCookieVal (j);
                i = document.cookie.indexOf(" ", i) + 1;
                if (i == 0) break;
                }

        return null;
}


//---------------------------------------------------------------------||
// FUNCTION:    SetCookie                                              ||
// PARAMETERS:  name, value, expiration date, path, domain, security   ||
// RETURNS:     Null                                                   ||
// PURPOSE:     Stores a cookie in the users browser                   ||
//---------------------------------------------------------------------||
function SetCookie (name,value,expires,path,domain,secure) {
        document.cookie = name + "=" + escape (value) +
                        ((expires) ? "; expires=" + expires.toGMTString() : "") +
                        ((path) ? "; path=" + path : "") +
                        ((domain) ? "; domain=" + domain : "") +
                        ((secure) ? "; secure" : "");
}


//---------------------------------------------------------------------||
// FUNCTION:    DeleteCookie                                           ||
// PARAMETERS:  Cookie name, path, domain                              ||
// RETURNS:     null                                                   ||
// PURPOSE:     Removes a cookie from users browser.                   ||
//---------------------------------------------------------------------||
function DeleteCookie (name,path,domain) {
        if (GetCookie(name)) {
                document.cookie = name + "=" +
                                ((path) ? "; path=" + path : "") +
                                ((domain) ? "; domain=" + domain : "") +
                                "; expires=Thu, 01-Jan-70 00:00:01 GMT";
        }
}


//---------------------------------------------------------------------||
// FUNCTION:    MoneyFormat                                            ||
// PARAMETERS:  Number to be formatted                                 ||
// RETURNS:     Formatted Number                                       ||
// PURPOSE:     Reformats Dollar Amount to #.## format                 ||
//---------------------------------------------------------------------||
function moneyFormat(input) {
        var dollars = Math.floor(input)
        var tmp = new String(input)
        for (var decimalAt = 0; decimalAt < tmp.length; decimalAt++) {
                if (tmp.charAt(decimalAt)==".")
                        break;
        }

        var cents  = "" + Math.round(input * 100)
        cents = cents.substring(cents.length-2, cents.length)
        dollars += ((tmp.charAt(decimalAt+2)=="9")&&(cents=="00"))? 1 : 0;

        return dollars + "." + cents
}


//---------------------------------------------------------------------||
// FUNCTION:    RemoveFromCart                                         ||
// PARAMETERS:  Order Number to Remove                                 ||
// RETURNS:     Null                                                   ||
// PURPOSE:     Removes an item from a users shopping cart             ||
//---------------------------------------------------------------------||
function RemoveFromCart(RemOrder) {
        if (confirm("Click 'Ok' to remove this product from your shopping cart.")) {
                NumberOrdered = GetCookie("NumberOrdered");
                for(i=RemOrder; i <  NumberOrdered; i++) {
                        NewOrder1 = "Order." + (i+1);
                        NewOrder2 = "Order." + (i);
                        database = GetCookie(NewOrder1);
                        SetCookie (NewOrder2, database, null, "/");
                }
                NewOrder = "Order." + NumberOrdered;
                SetCookie ("NumberOrdered", NumberOrdered-1, null, "/");
                DeleteCookie(NewOrder, "/");
                location.href=location.href;
        }
}


//---------------------------------------------------------------------||
// FUNCTION:    GetFromCart                                            ||
// PARAMETERS:  Null                                                   ||
// RETURNS:     Product Table Written to Document                      ||
// PURPOSE:     Draws current cart product table on HTML page          ||
//---------------------------------------------------------------------||
function GetFromCart() {
        NumberOrdered = 0;
        Total=0;
        TOTotal=0;
        TOquantity = " ";
        TOprice = " ";
        TOid_num = " ";
        TOname = " ";
        NumberOrdered = GetCookie("NumberOrdered");
        whattowrite = "";

        for (i = 1; i <= NumberOrdered; i++) {
                NewOrder = "Order." + i;
                database = "";
                database = GetCookie(NewOrder);

                Token0 = database.indexOf("|", 0);
                Token1 = database.indexOf("|", Token0+1);
                Token2 = database.indexOf("|", Token1+1);

                fields = new Array;
                fields[0] = database.substring( 0, Token0 );
                fields[1] = database.substring( Token0+1, Token1 );
                fields[2] = database.substring( Token1+1, Token2 );
                fields[3] = database.substring( Token2+1, database.length );

                Total = Total + (fields[1] * fields[0]);
                TOTotal = moneyFormat(Total);

                whattowrite += "<tr><td>" + fields[2] + "</td><td><font size=-1>"
                                + fields[3] + "</font></td><td>$" + fields[1]
                                + "</td><td><input type=text size=2 name=\"QUANTITY_"+ i +"\" value=\""
                                + fields[0] + "\"></td>"
                                + "<td><input type=button value=\"  Remove  \" onClick=\"RemoveFromCart("+i+")\"></td>"
                                + "<input type=hidden name=\"ID_"+ i +"\" value=\"" + fields[2] + "\">"
                                + "<input type=hidden name=\"NAME_"+ i +"\" value=\"" + fields[3] + "\">"
                                + "<input type=hidden name=\"PRICE_"+ i +"\" value=\"" + fields[1] + "\">";
        }

        document.write(whattowrite);
        document.write("</td></tr><tr><td colspan=2><b>SUBTOTAL</b></td><td>$");
        document.write(TOTotal);
        document.write("</td><td></td>");
}


//---------------------------------------------------------------------||
// FUNCTION:    WriteToForm                                            ||
// PARAMETERS:  Null                                                   ||
// RETURNS:     Product hidden fields Written to Document              ||
// PURPOSE:     Draws current cart product hidden fields on HTML form  ||
//---------------------------------------------------------------------||
function WriteToForm() {
        NumberOrdered = 0;
        Total=0;
        TOTotal=0;
        TOquantity = " ";
        TOprice = " ";
        TOid_num = " ";
        TOname = " ";
        NumberOrdered = GetCookie("NumberOrdered");
        whattowrite = "";

        for (i = 1; i <= NumberOrdered; i++) {
                NewOrder = "Order." + i;
                database = "";
                database = GetCookie(NewOrder);

                Token0 = database.indexOf("|", 0);
                Token1 = database.indexOf("|", Token0+1);
                Token2 = database.indexOf("|", Token1+1);

                fields = new Array;
                fields[0] = database.substring( 0, Token0 );
                fields[1] = database.substring( Token0+1, Token1 );
                fields[2] = database.substring( Token1+1, Token2 );
                fields[3] = database.substring( Token2+1, database.length );

                Total = Total + (fields[1] * fields[0]);
                TOTotal = moneyFormat(Total);

                document.write("<input type=hidden name=\"ID_"+ i +"\" value=\"" + fields[2] + "\">");
                document.write("<input type=hidden name=\"NAME_"+ i +"\" value=\"" + fields[3] + "\">");
                document.write("<input type=hidden name=\"PRICE_"+ i +"\" value=\"" + fields[1] + "\">");
                document.write("<input type=hidden name=\"QUANTITY_"+ i +"\" value=\"" + fields[0] + "\">");
        }
}

//=====================================================================||
//               END NOP Design SmartPost Shopping Cart                ||
//                              V.3.0.1                                ||
//=====================================================================||

</SCRIPT>

<NOSCRIPT>
Whoops, we detected that your browser does not have JavaScript, or it is disabled.  Our product catalog
requires that you have JavaScript enabled to order products.  <a href="http://www.netscape.com">Netscape</a>
and <a href="http://www.microsoft.com/ie">Microsoft</a> offer free browsers which support JavaScript.
If you are using a JavaScript compliant browser and still have problems, make sure you have JavaScript enabled in
your browser's preferences.
</NOSCRIPT>
<!--Shopping Cart Checkout Begin-->
             The items listed below are currently in your shopping cart:
             <p>
             <form action="checkout.php" method="POST" onSubmit="return CheckForm(this)">
    <NOBR>
    <table border=1 cellspacing=0>
              <tr>
               <td width="100" bgcolor=#cccccc><b> Product Code </b></td>
               <td width="100" bgcolor=#cccccc><b> Name </b></td>
               <td width="100" bgcolor=#cccccc><b> Price </b></td>
               <td width="60" bgcolor=#cccccc><b> Quantity </b></td>
               <td width="100" bgcolor=#cccccc><b> Remove Item From Cart </b></td>
              </tr>
              <script>
               GetFromCart();
              </script>
             </table>
    </NOBR>
<br>
<P>
<font class="blacktext">
<b>Please fill out the following information below to complete your order.</b>
</font>

<p>
<b><font class="greetext">Billing Information:</font></b><P>

<TABLE class="blacktext">
<TR><TD>Name:    </TD><TD><input type="text" size="18" name="b_first"> <input type="text" size="15" name="b_last"></TD></TR>
<TR><TD>Address: </TD><TD><input type="text" size="37" name="b_addr"> </TD></TR>
<TR><TD>Address: </TD><TD><input type="text" size="37" name="b_addr2"></TD></TR>
<TR><TD>City:    </TD><TD><input type="text" size="21" name="b_city"> </TD></TR>
<TR><TD>State:   </TD><TD><input type="text" size="1"  name="b_state"> </TD></TR>
<TR><TD>Zip:     </TD><TD><input type="text" size="5"  name="b_zip"></TD></TR>
<TR><TD>Phone:   </TD><TD><input type="text" size="37" name="b_phone"></TD></TR>
<TR><TD>Fax:     </TD><TD><input type="text" size="37" name="b_fax"></TD></TR>
<TR><TD>Email:   </TD><TD><input type="text" size="37" name="b_email"> </TD></TR>
</TABLE>
<p>
<b><font class="greetext">Shipping Information (if different than billing):</font></b><P>
<TABLE class="blacktext">
<TR><TD>Name:    </TD><TD><input type="text" size="18" name="s_first"> <input type="text" size="15" name="s_last"></TD></TR>
<TR><TD>Address: </TD><TD><input type="text" size="37" name="s_addr"> </TD></TR>
<TR><TD>Address: </TD><TD><input type="text" size="37" name="s_addr2"></TD></TR>
<TR><TD>City:    </TD><TD><input type="text" size="21" name="s_city"> </TD></TR>
<TR><TD>State:   </TD><TD><input type="text" size="1"  name="s_state"> </TD></TR>
<TR><TD>Zip:     </TD><TD><input type="text" size="5"  name="s_zip"></TD></TR>
<TR><TD>Phone:   </TD><TD><input type="text" size="37" name="s_phone"></TD></TR>
<TR><TD>Fax:     </TD><TD><input type="text" size="37" name="s_fax"></TD></TR>
<TR><TD>Email:   </TD><TD><input type="text" size="37" name="s_email"> </TD></TR>
</TABLE>
<p>
<FONT class="blacktext">
<b><font class="greetext">Comments/Special Instructions:</font></b><P>
<TEXTAREA NAME="comment" ROWS=6 COLS=40>
</TEXTAREA>
</font>
<br /><br />
<input type=submit Value="Submit Order"> <INPUT type=RESET value="  Clear Form  ">
    </p>
    </center>   
    </FORM> 

Checkout.php

<?

//=====================================================================||
//               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     = "me@me.com";
$csvfilename   = "orders.csv";
$csvquote      = "\"\"";
$mode          = "BOTH";


//##############################################################
//#FUNCTION:   doFormError                                     #
//#RETURNS:                                                    #
//#PARAMETERS: A error message string.                         #
//#PURPOSE:    Generates an HTML page indicating a form        #
//#            submission error occurred.                      #
//##############################################################
function doFormError($errString) {

    include($header);

    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);

    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_state == "") || ($b_zip == "") || ($b_phone == "") || ($b_email == "")) {
   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 .= "A new order has been received.  A summary of this order appears below.\n";
$strMessageBody .= "\n";
$strMessageBody .= "Order Date: $today \n";
$strMessageBody .= " \n";
$strMessageBody .= "Bill To: \n";
$strMessageBody .= "-------- \n";
$strMessageBody .= "   $b_first $b_last \n";
$strMessageBody .= "   $b_addr \n";
$strMessageBody .= "   $b_addr2 \n";
$strMessageBody .= "   $b_city, $b_state  $b_zip \n";
$strMessageBody .= "   $b_phone \n";
$strMessageBody .= "   $b_fax \n";
$strMessageBody .= "   $b_email \n";
$strMessageBody .= " \n";
$strMessageBody .= " \n";
$strMessageBody .= "Ship To: \n";
$strMessageBody .= "-------- \n";
$strMessageBody .= "   $s_first $s_last \n";
$strMessageBody .= "   $s_addr \n";
$strMessageBody .= "   $s_addr2 \n";
$strMessageBody .= "   $s_city, $s_state  $s_zip \n";
$strMessageBody .= "   $s_phone \n";
$strMessageBody .= " \n";
$strMessageBody .= " \n";
$strMessageBody .= "Qty  Price(\$)   Product ID  - Product Name\n";
$strMessageBody .= "===================================================================== \n";
$strMessageBody .= "$QUANTITY_1    \$$PRICE_1    $ID_1 - $NAME_1   $ADDTLINFO_1  \n";
if( $NAME_2 ) {$strMessageBody .= "$QUANTITY_2    \$$PRICE_2    $ID_2 - $NAME_2   $ADDTLINFO_2  \n";}
if( $NAME_3 ) {$strMessageBody .= "$QUANTITY_3    \$$PRICE_3    $ID_3 - $NAME_3   $ADDTLINFO_3  \n";}
if( $NAME_4 ) {$strMessageBody .= "$QUANTITY_4    \$$PRICE_4    $ID_4 - $NAME_4   $ADDTLINFO_4  \n";}
if( $NAME_5 ) {$strMessageBody .= "$QUANTITY_5    \$$PRICE_5    $ID_5 - $NAME_5   $ADDTLINFO_5  \n";}
if( $NAME_6 ) {$strMessageBody .= "$QUANTITY_6    \$$PRICE_6    $ID_6 - $NAME_6   $ADDTLINFO_6  \n";}
if( $NAME_7 ) {$strMessageBody .= "$QUANTITY_7    \$$PRICE_7    $ID_7 - $NAME_7   $ADDTLINFO_7  \n";}
if( $NAME_8 ) {$strMessageBody .= "$QUANTITY_8    \$$PRICE_8    $ID_8 - $NAME_8   $ADDTLINFO_8  \n";}
if( $NAME_9 ) {$strMessageBody .= "$QUANTITY_9    \$$PRICE_9    $ID_9 - $NAME_9   $ADDTLINFO_9  \n";}
if( $NAME_10 ){$strMessageBody .= "$QUANTITY_10    \$$PRICE_10    $ID_10 - $NAME_10   $ADDTLINFO_10 \n";}
if( $NAME_11 ){$strMessageBody .= "$QUANTITY_11    \$$PRICE_11    $ID_11 - $NAME_11   $ADDTLINFO_11 \n";}
if( $NAME_12 ){$strMessageBody .= "$QUANTITY_12    \$$PRICE_12    $ID_12 - $NAME_12   $ADDTLINFO_12 \n";}
if( $NAME_13 ){$strMessageBody .= "$QUANTITY_13    \$$PRICE_13    $ID_13 - $NAME_13   $ADDTLINFO_13 \n";}
$strMessageBody .= "===================================================================== \n";
$strMessageBody .= "SUBTOTAL: $SUBTOTAL \n";
$strMessageBody .= "TOTAL: $TOTAL \n";
$strMessageBody .= "\n";
$strMessageBody .= "FREIGHT: $SHIPPING \n";
$strMessageBody .= "\n\n";
$strMessageBody .= "Comments: \n";
$strMessageBody .= "--------- \n";
$strMessageBody .= "$comment \n";
$strMessageBody .= " \n";


if( $mode == "BOTH" || $mode == "EMAIL") {
   //# 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);
}


//# 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>Thank you</h2>";
echo "Thank you for your order from our online store.  You will receive a confirmation email of your order ";
echo "momentarily.  Please contact us at $youremail if you have any questions or concerns.";
echo "<P>";
echo "<A HREF=\"$returnpage\" target=_top>Return Home</A>";
echo "<P>";

include($footer);

?>

brad0525
WebMaster
 
Posts: 2
Joined: Fri Jan 02, 2009 4:51 pm

Re: Can Not Get The Subtotal And Total to show

Postby Koibito » Sat Jan 03, 2009 6:14 am

Why are you using version 3 of the cart?
John
Koibito
Site Admin / Guru
 
Posts: 918
Joined: Sun May 28, 2006 1:59 am
Location: New Jersey, USA


Return to Help: FrontPage & NOPCart

Who is online

Users browsing this forum: No registered users and 2 guests

cron