View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Spending over X and getting Y product free

Thread began 9/18/2009 5:11 am by Suggs | Last modified 9/24/2009 11:56 am by Suggs | 1391 views | 7 replies


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

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";
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
return $theValue;
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" { ?>
// WA eCart Get Info From RS
if (isset($_POST["Submit_order"])) {
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 } ?>



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





Ease of use


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