close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Syntax error on submitting order.

Thread began 6/15/2010 6:05 am by rikaG_510 | Last modified 7/17/2010 9:17 am by rikaG_510 | 2204 views | 18 replies

rikaG_510

Hello Eric,

Sorry it's been while since I got your reply.
So I tried to re creat the Store Cart Detail in Database.

I wasn't so sure about one point though.
Where you choose value for each column title (under the value field by clicking lightening button), I kept DetailsID blank as you suggested. For "DetailOderID", I chose [session ID] under "swift" which is the cart, and this got me a code; <?php echo session_id(); ?>. Is this correct?

Under the "Session", all I see there is "paypal_ECO_~, or "eCartCheckoutForm_~" and these didn't sound right for me, so I didn't touch it.

BUT, there is one problem!
As I mentioned in #5, when I change the UE code into below (as you suggested), the confirm.php page doesn't function at all. It appears as a blank page.

//WA Universal Email object="mail"
set_time_limit(0);
$EmailRef = "waue_confirm_1";
$BurstSize*=*200;*
$BurstTime*=*1;*
$WaitTime*=*1;*
$GoToPage = "";
$RecipArray = array();
$StartBurst = time();
$LoopCount = 0;
$TotalEmails = 0;
$RecipIndex = 0;

What do you think is the reason??

Just in case I pasted the newly inserted Store Cart Details code as well.


<?php
// WA eCart Store Cart Details in Db
if ($_SERVER["REQUEST_METHOD"] == "POST") // Trigger
{
$WA_connection = $localhost;
$WA_table = "OrderDetail";
$WA_redirectURL = "";
$WA_indexField = "DetailsOrderID";
$WA_fieldNamesStr = "DetailsOrderID|DetailsItemID|DetailsItemName|DetailsItemDsc|DetailsQuantity|DetailPrice";
$WA_fieldValuesStr = WA_eCDB_ConvertNumber("".session_id() ."") . "|" . WA_eCDB_ConvertNumber("".$Swift->DisplayInfo("ID") ."") . "|" . "".$Swift->DisplayInfo("Name") ."" . "|" . "".$Swift->DisplayInfo("Description") ."" . "|" . WA_eCDB_ConvertNumber("".$Swift->DisplayInfo("Quantity") ."") . "|" . WA_eCDB_ConvertNumber("".$Swift->DisplayInfo("Price") ."");
$WA_columnTypesStr = "none,none,NULL|none,none,NULL|',none,''|',none,''|none,none,NULL|none,none,NULL";
$WA_sql = "";
mysql_select_db($database_localhost, $WA_connection);
$indexFieldIndex = -1;
$WA_fieldValues = explode("|", $WA_fieldValuesStr);
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 = $WA_fieldValues[$indexFieldIndex];
if (isset($deleteFieldValue) && $deleteFieldValue != "")
{
$deleteParamsObj = WA_generateInsertParams(array($WA_indexField), array($WA_columns[$indexFieldIndex]), array($deleteFieldValue), -1);
$WA_sql = "Delete from " . $WA_table . " where " . $WA_indexField . " = " . $deleteParamsObj->WA_dbValues;
$WA_editCmd = mysql_query($WA_sql, $WA_connection) or die(mysql_error());
$WA_okToDelete = false;
}
$Swift->MoveFirst();
while (!$Swift->EOF())
{
$WA_fieldValuesStr = WA_eCDB_ConvertNumber("".session_id() ."") . "|" . WA_eCDB_ConvertNumber("".$Swift->DisplayInfo("ID") ."") . "|" . "".$Swift->DisplayInfo("Name") ."" . "|" . "".$Swift->DisplayInfo("Description") ."" . "|" . WA_eCDB_ConvertNumber("".$Swift->DisplayInfo("Quantity") ."") . "|" . WA_eCDB_ConvertNumber("".$Swift->DisplayInfo("Price") ."");
$WA_fieldValues = explode("|", $WA_fieldValuesStr);
$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());
$Swift->MoveNext();
}
if ($WA_redirectURL != "") {
header("Location: ".$WA_redirectURL); exit;
}
$Swift->MoveFirst();
}
?>

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...