Hi Jason,
Thanks for this.
I followed these guides you have given and had to create a recordset on the confirm page as there wasnt one there already..is this correct?? Also, this item is now only going to be an exclusive web offer that wont be sold on the site so is there a way i can create it as a static record for the giveaway and not use a database?
I followed your code and had to swap=> to >= as it bombed out, however now its bombing out with the following error
Parse error: syntax error, unexpected '{' in /home/barkerde/public_html/protx-confirm.php on line 331
This line of code looks like this:
<?php if ($stonehouse->GetTaxableTotal() >= "1000" { ?>
Also, when adding the ecart add to cart behaviour, im right in adding the get Contents From Recordset arent I?
Heres the relevant code the server behaviour generated. It also didnt give me a Button Confirm Order option in the trigger but a trigger option of Button: WADbSearch1 pressed which is the name of the button for the search box in the top of the page.
There is an option for current page submit...?????
Heres the code generated, along with the additional code you said to include:
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
?>
<?php
mysql_select_db($database_barkeran, $barkeran);
$query_Recordset1 = "SELECT * FROM productimport";
$Recordset1 = mysql_query($query_Recordset1, $barkeran) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<?php if ($stonehouse->GetTaxableTotal() >= "1000" { ?>
<?php
// WA eCart Get Info From RS
if (isset($_POST["Submit_order"])) {
$Redirect_redirStr="";
do {
$stonehouse_itemID = floatval("0");
$stonehouse_itemName = "Free - Union Jack Cushion";
$stonehouse_itemDescription = "";
$stonehouse_itemWeight = floatval("0");
$stonehouse_itemQuantity = floatval("0");
$stonehouse_itemPrice = floatval("0");
$stonehouse_itemThumbnail = "";
$stonehouse_itemShippingStatus = "";
$stonehouse_itemColour = "";
$stonehouse_itemSKU = "";
$stonehouse->AddToCart(1, "", $stonehouse_itemID, $stonehouse_itemName, $stonehouse_itemDescription, $stonehouse_itemWeight, $stonehouse_itemQuantity, $stonehouse_itemPrice, $stonehouse_itemThumbnail, $stonehouse_itemShippingStatus, $stonehouse_itemColour, $stonehouse_itemSKU);
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
if ($Redirect_redirStr != "") {
$stonehouse->redirStr = $Redirect_redirStr;
}
mysql_data_seek($Recordset1, 0);
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
}
?>
<?php } ?>
Thanks
Paul