close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Order Item Number Not Displaying

Thread began 6/11/2009 11:55 am by jenbar3378469 | Last modified 2/11/2010 2:11 pm by Ray Borduin | 1392 views | 8 replies |

jenbar3378469

Order Item Number Not Displaying

Hi when the email confirmation emails out, the order number is not displaying in the email, but it is being stored in the database properly. Can you help me once again? Here is the code I have now for the universal email:

<?php
if ((($_SERVER["REQUEST_METHOD"] == "POST") && (isset($_SERVER["HTTP_REFERER"]) && strpos(urldecode($_SERVER["HTTP_REFERER"]), urldecode($_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"])) > 0) && isset($_POST))) {
//WA Universal Email object="mail"
//Send Loop Once Per Entry
$RecipientEmail = "".((isset($_SESSION["eCartCheckoutForm_email"]))?$_SESSION["eCartCheckoutForm_email"]:"") ."";include("WA_Universal_Email/WAUE_confirm_3.php");

//Send Mail All Entries
if (""!="") {
header("Location: ");
}
}
?>

Thanks again!

Sign in to reply to this post

Ray BorduinWebAssist

The problem must be in how the order number is referenced on: WAUE_confirm_3.php

Sign in to reply to this post

jenbar3378469

Could it be because there is no styles set to that line of code?

Here is the code I am referencing from WAUE_confirm_3.php:

//WA eCart Show If Start
if (!$sumidrive1->IsEmpty()) {

$MailBody = $MailBody . "\r\n";
$MailBody = $MailBody . " <h2 style=\"font-size:medium; margin-bottom:7px; color:<Accent_10 />; /* Accent_10 */ \" >Email Order Receipt</h2>\r\n";
$MailBody = $MailBody . "<h3 style=\"font-size:small; margin:2px 0; color:<Text_Dark />; /* Text_Dark */\" >Order number: ";
$MailBody = $MailBody . ((isset($_SESSION["sumidrive1_OrderID"]))?$_SESSION["sumidrive1_OrderID"]:"");
$MailBody = $MailBody . "</h3>\r\n";
$MailBody = $MailBody . "<p style=\"font-size:x-small; margin:2px 0; color:<Global_Gray />; /* Global_Gray */\">Thank you for your order. Please allow 5-7 business days for delivery.</p>\r\n";
$MailBody = $MailBody . " <table style=\"font-size:x-small; background-color:#E0E8F0; /* BG_Light */\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n";
$MailBody = $MailBody . " <tr>\r\n";
$MailBody = $MailBody . " \r\n";
$MailBody = $MailBody . " <th style=\" padding:10px 14px 10px 7px; vertical-align:top; text-align:left; background-color:#E5F385; /* Accent11 */ color:#222847; /* Text_Dark */\">Name</th>\r\n";
$MailBody = $MailBody . " \r\n";
$MailBody = $MailBody . "\r\n";
$MailBody = $MailBody . " <th style=\" padding:10px 14px 10px 7px; vertical-align:top; text-align:left; background-color:#E5F385; /* Accent11 */ color:#222847; /* Text_Dark */\">Description</th>\r\n";
$MailBody = $MailBody . " \r\n";
$MailBody = $MailBody . "\r\n";
$MailBody = $MailBody . " <th style=\" padding:10px 14px 10px 7px; vertical-align:top; text-align:left; background-color:#E5F385; /* Accent11 */ color:#222847; /* Text_Dark */\">Size</th>\r\n";
$MailBody = $MailBody . " \r\n";
$MailBody = $MailBody . "\r\n";
$MailBody = $MailBody . " <th style=\" padding:10px 14px 10px 7px; vertical-align:top; text-align:left; background-color:#E5F385; /* Accent11 */ color:#222847; /* Text_Dark */\">Color</th>\r\n";
$MailBody = $MailBody . " \r\n";
$MailBody = $MailBody . "\r\n";
$MailBody = $MailBody . " <th style=\" padding:10px 14px 10px 7px; vertical-align:top; text-align:right; background-color:#E5F385; /* Accent11 */ color:#222847; /* Text_Dark */\">Price</th>\r\n";
$MailBody = $MailBody . " \r\n";
$MailBody = $MailBody . "\r\n";
$MailBody = $MailBody . " <th style=\" padding:10px 14px 10px 7px; vertical-align:top; text-align:center; background-color:#E5F385; /* Accent11 */ color:#222847; /* Text_Dark */\">Quantity</th>\r\n";
$MailBody = $MailBody . " \r\n";
$MailBody = $MailBody . "\r\n";
$MailBody = $MailBody . " <th style=\" padding:10px 14px 10px 7px; vertical-align:top; text-align:right; background-color:#E5F385; /* Accent11 */ color:#222847; /* Text_Dark */\">Total</th>\r\n";
$MailBody = $MailBody . " \r\n";
$MailBody = $MailBody . " </tr>\r\n";
$MailBody = $MailBody . " ";

while (!$sumidrive1->EOF()) {

$MailBody = $MailBody . "\r\n";
$MailBody = $MailBody . " <tr>\r\n";
$MailBody = $MailBody . " \r\n";
$MailBody = $MailBody . " <td style=\"padding:10px 14px 10px 7px; vertical-align:top;\" >";
$MailBody = $MailBody . $sumidrive1->DisplayInfo("Name");
$MailBody = $MailBody . "</td>\r\n";
$MailBody = $MailBody . " \r\n";
$MailBody = $MailBody . "\r\n";
$MailBody = $MailBody . " <td style=\"padding:10px 14px 10px 7px; vertical-align:top;\" >";
$MailBody = $MailBody . $sumidrive1->DisplayInfo("Description");
$MailBody = $MailBody . "</td>\r\n";
$MailBody = $MailBody . " \r\n";
$MailBody = $MailBody . "\r\n";
$MailBody = $MailBody . " <td style=\"padding:10px 14px 10px 7px; vertical-align:top;\" >";
$MailBody = $MailBody . $sumidrive1->DisplayInfo("Size");
$MailBody = $MailBody . "</td>\r\n";
$MailBody = $MailBody . " \r\n";
$MailBody = $MailBody . "\r\n";
$MailBody = $MailBody . " <td style=\"padding:10px 14px 10px 7px; vertical-align:top;\" >";
$MailBody = $MailBody . $sumidrive1->DisplayInfo("Color");
$MailBody = $MailBody . "</td>\r\n";
$MailBody = $MailBody . " \r\n";
$MailBody = $MailBody . "\r\n";
$MailBody = $MailBody . " <td style=\"padding:10px 14px 10px 7px; vertical-align:top; text-align:right;\" >";
$MailBody = $MailBody . WA_eCart_DisplayMoney($sumidrive1, $sumidrive1->DisplayInfo("Price"));
$MailBody = $MailBody . "</td>\r\n";
$MailBody = $MailBody . " \r\n";
$MailBody = $MailBody . "\r\n";
$MailBody = $MailBody . " <td style=\"padding:10px 14px 10px 7px; vertical-align:top; text-align:center;\" >";
$MailBody = $MailBody . $sumidrive1->DisplayInfo("Quantity");
$MailBody = $MailBody . "</td>\r\n";
$MailBody = $MailBody . " \r\n";
$MailBody = $MailBody . "\r\n";
$MailBody = $MailBody . " <td style=\"padding:10px 14px 10px 7px; vertical-align:top; text-align:right;\" >";
$MailBody = $MailBody . WA_eCart_DisplayMoney($sumidrive1, $sumidrive1->DisplayInfo("TotalPrice"));
$MailBody = $MailBody . "</td>\r\n";
$MailBody = $MailBody . " \r\n";
$MailBody = $MailBody . " </tr>\r\n";
$MailBody = $MailBody . " ";

THANKS!

Sign in to reply to this post

Ray BorduinWebAssist

OK it is referencing the session variable: sumidrive1_OrderID

What is the name of the session variable specified in the Store Cart Summary in database server behavior on the confirm page? Do they match?

Maybe try adding a session_commit() call after the session variable is set when the order is inserted to make sure it is being stored properly.

Sign in to reply to this post

jenbar3378469

Ray, Yes they appear to match. Here is the code for the Store Summary server behavior:

<?php
// WA eCart Store Cart Summary in Db
if (($_SERVER["REQUEST_METHOD"] == "POST") && (isset($_SERVER["HTTP_REFERER"]) && strpos(urldecode($_SERVER["HTTP_REFERER"]), urldecode($_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"])) > 0) && isset($_POST)) // Trigger
{
$WA_connection = $rsmyconnect;
$WA_table = "orders";
$WA_redirectURL = "";
$WA_indexField = "OrderId";
$WA_fieldNamesStr = "OrderReferenceId|OrderVisitorID|OrderShipping|OrderTax|OrderTotal|OrderShipAddress1|OrderShipAddress2|OrderShipCity|OrderShipStateId|OrderShipZip|OrderShipCountryId";
$WA_fieldValuesStr = "".session_id() ."" . "|" . "".$_SESSION['eCartCheckoutForm_email'] ."" . "|" . "".$sumidrive1->GetShipping() ."" . "|" . "".$sumidrive1->GetTax() ."" . "|" . "".$sumidrive1->GrandTotal() ."" . "|" . "".$_SESSION['eCartCheckoutForm_street1'] ."" . "|" . "".$_SESSION['eCartCheckoutForm_street2'] ."" . "|" . "".$_SESSION['eCartCheckoutForm_city'] ."" . "|" . "".$_SESSION['eCartCheckoutForm_state_province'] ."" . "|" . "".$_SESSION['eCartCheckoutForm_postcode'] ."" . "|" . "".$_SESSION['eCartCheckoutForm_country'] ."";
$WA_columnTypesStr = "',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''";
$WA_sessionName = "sumidrive1_OrderID";
$WA_Sql = "";
$NeedInsert = false;
$indexFieldIndex = -1;
$WA_fieldValues = explode("|", $WA_fieldValuesStr);
$WA_columns = explode("|", $WA_columnTypesStr);
$WA_connectionDB = $database_rsmyconnect;
$updateFieldValue = "";
mysql_select_db($WA_connectionDB, $WA_connection);
if (!session_id()) session_start();
if ($WA_redirectURL != "" && isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] !== "" && sizeof($_POST) > 0) {
$WA_redirectURL .= ((strpos('?', $WA_redirectURL) === false)?"?":"&").$_SERVER["QUERY_STRING"];
}
$WA_fieldNames = explode("|", $WA_fieldNamesStr);
$WA_columns = explode("|", $WA_columnTypesStr);
for ($i = 0; $i < sizeof($WA_fieldNames); $i++)
{
if ($WA_indexField == $WA_fieldNames[$i])
{
$indexFieldIndex = $i;
break;
}
}
$deleteFieldValue = "";
$updateColType = "none,none,NULL";
if ($indexFieldIndex >= 0) $updateFieldValue = $WA_fieldValues[$indexFieldIndex];
if ($updateFieldValue == "" && isset($_SESSION[$WA_sessionName])) $updateFieldValue = $_SESSION[$WA_sessionName];
if ($indexFieldIndex >= 0) $updateColType = $WA_columns[$indexFieldIndex];
if ($updateFieldValue != "") {
$updateParamsObj = WA_generateInsertParams($WA_fieldNames, $WA_columns, $WA_fieldValues, $indexFieldIndex);
$valueForWhere = WA_generateInsertParams(array($WA_indexField), array($updateColType), array($updateFieldValue), -1);
$WA_Sql = "update " . $WA_table . " SET " . $updateParamsObj->WA_setValues . " where " . $WA_indexField . " = " . $valueForWhere->WA_dbValues;
$WA_editCmd = mysql_query($WA_Sql, $WA_connection) or die(mysql_error());
$_SESSION[$WA_sessionName] = $updateFieldValue;
$result = mysql_query("SELECT * FROM " . $WA_table . " where " . $WA_indexField . " = " . $valueForWhere->WA_dbValues, $WA_connection);
$num_rows = mysql_num_rows($result);
$NeedInsert = (mysql_num_rows($result) === 0);
}
if ($updateFieldValue === "" || $NeedInsert) {
$updateFieldValue = "";
$insertParamsObj = WA_generateInsertParams($WA_fieldNames, $WA_columns, $WA_fieldValues, -1);
$WA_Sql = "insert into " . $WA_table . " (" . $insertParamsObj->WA_tableValues . ") values (" . $insertParamsObj->WA_dbValues . ")";
$WA_editCmd = mysql_query($WA_Sql, $WA_connection) or die(mysql_error());
$_SESSION[$WA_sessionName] = mysql_insert_id();
}
if ($WA_redirectURL != "") {
header("Location: ".$WA_redirectURL); exit;
}
}
?>

Would I put the session_commit() after this code? Thanks again!

Sign in to reply to this post

Ray BorduinWebAssist

yeah, try adding:

<?php
session_commit();
?>

immediately after that code. I think it should work as it does appear they are both set correctly and the session is started on both pages since both pages use session variables elsewhere that appear to be working.

Sign in to reply to this post

jenbar3378469

Ray, that didn't work either. Any other ideas? Thanks!

Sign in to reply to this post

jenbar3378469

This still is not working and nobody ever responded, alas, I have not been "bugging" you about this either.

Sign in to reply to this post

Ray BorduinWebAssist

I opened a support incident so that we can look into this with you directly. I'm still unsure of the cause, so we will likely have to debug it with you over the phone and through the internet.

Make sure to update your support incident to include contct information and we will try to get you help as soon as possible.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...