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

Continue shopping NOT!

Thread began 2/04/2011 9:13 pm by andre363997 | Last modified 2/05/2011 3:55 pm by andre363997 | 1325 views | 2 replies

andre363997

Continue shopping NOT!

OK, my cart is functioning except for the continue shopping button does nothing.
With the code:
<?php
// WA eCart Redirect
if ($ymca1->redirStr != "") {
header("Location: ".$ymca1->redirStr);
}
?>

I get:

Cannot modify header information - headers already sent by (output started at /home/content/88/7288588/html/staging/cart2.php:10) in /home/content/88/7288588/html/staging/cart2.php on line 112

With the code removed, no error, but nothing happens.

Below is the code for the cart:

<?php
//WA eCart Include
require_once("WA_eCart/ymca1_PHP.php");
?>
<?php require_once('Connections/ConYcamps.php'); ?>
<?php
$ymca1->GetContent();
?>

<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$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;
}
}

mysql_select_db($database_ConYcamps, $ConYcamps);
$query_Recordset1 = "SELECT * FROM camps";
$Recordset1 = mysql_query($query_Recordset1, $ConYcamps) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<?php
// WA eCart Update
if (isset($_POST["ymca1_Update_100"]) || isset($_POST["ymca1_Update_100_x"])) {
$ymca1->UpdateCart();
$Redirect_redirStr="";
if ($Redirect_redirStr != "") {
$ymca1->redirStr = $Redirect_redirStr;
}
$ymca1->cartAction = "Update";
}
?>
<?php
// WA eCart Continue Shopping
if (isset($_POST["ymca1_Continue_100"]) || isset($_POST["ymca1_Continue_100_x"])) {
$Redirect_redirStr="traditional7.php";
if (true && isset($_SESSION['WAEC_ContinueRedirect'])) {
$Redirect_redirStr=siteToPageRel($_SESSION['WAEC_ContinueRedirect']);
}
if ($Redirect_redirStr != "") {
$ymca1->redirStr = $Redirect_redirStr;
}
$ymca1->cartAction = "Continue";
}
?>
<?php
// WA eCart Clear Cart
if (isset($_POST["ymca1_Clear_100"]) || isset($_POST["ymca1_Clear_100_x"])) {
$ymca1->ClearCart();
$Redirect_redirStr="";
if ($Redirect_redirStr != "") {
$ymca1->redirStr = $Redirect_redirStr;
}
$ymca1->cartAction = "ClearCart";
}
?>
<?php
//WA eCart Redirect Check Out
if (isset($_POST["ymca1_Checkout_1"]) || isset($_POST["ymca1_Checkout_1_x"])) {
$Redirect_redirStr="";
if ($Redirect_redirStr != "") {
if (isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] != "") {
if (strpos($Redirect_redirStr, "?") === false) {
$Redirect_redirStr .= "?".$_SERVER['QUERY_STRING'];
}
else {
$Redirect_redirStr .= "&".$_SERVER['QUERY_STRING'];
}
}

$ymca1->redirStr = $Redirect_redirStr;
}
$ymca1->cartAction = "Checkout";
}
?>
<?php
// WA eCart Redirect
if ($ymca1->redirStr != "") {
header("Location: ".$ymca1->redirStr);
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Summer is Camp, Summer to Discover</title>
<style type="text/css">
<!--
#viewcart {
position: absolute;
visibility: visible;
z-index: auto;
top: 4px;
right: 0px;
}
#CampDesc {
visibility: visible;
z-index: 3;
position: absolute;
width: 1230px;
height: 123px;
clear: none;
top: 40px;
left: 10px;
}

#CampTheme {
visibility: visible;
position: absolute;
height: 60px;
left: 403px;
clear: none;
width: 809px;
z-index: 2;
top: 0px;
}
#ContentTextHead {
position: absolute;
visibility: visible;
z-index: auto;
height: 32px;
width: 527px;
}
td {
font-family: Verdana, Geneva, sans-serif;
font-size: 9px;
}

-->
</style>

<link href="WA_eCart/CSS/eC_Clean_Pacifica_Verdana.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="outerWrapper">
<div id="header">
<div id="SummerMast"></div>
<div id="Mastheadimage">
</div>
</div>
<div id="contentWrapper">
<div class="eC_Clean_Pacifica_Verdana">
<?php
//WA eCart Show If Start
if (!$ymca1->IsEmpty()) {
?>
<form action="<?php echo ($_SERVER["PHP_SELF"].(isset($_SERVER["QUERY_STRING"])?"?".htmlentities($_SERVER["QUERY_STRING"]):""));?>" method="post" >
<h2>Your Shopping Cart</h2>
<table class="eC_ShoppingCart" border="0" cellspacing="0" cellpadding="0">
<tr>
<th class="eC_PriceItem" >ID</th>
<th>Branch</th>
<th>Camp Name</th>
<th>Camp Type</th>
<th>Camp Location</th>
<th>Camp Address</th>
<th>Theme</th>
<th>Starts On</th>
<th>Contact</th>
<th>&nbsp;</th>
<th class="eC_FormItem" >Quantity</th>
<th class="eC_PriceItem" >Price</th>
<th class="eC_FormItem" >Remove</th>
<th class="eC_PriceItem" >Total</th>
</tr>
<?php
while (!$ymca1->EOF()) {
?>
<tr>
<td class="eC_PriceItem" ><?php echo $ymca1->DisplayInfo("Personify"); ?></td>
<td><?php echo $ymca1->DisplayInfo("Branch"); ?></td>
<td><?php echo $ymca1->DisplayInfo("Name"); ?></td>
<td><?php echo $ymca1->DisplayInfo("Description"); ?></td>
<td><?php echo $ymca1->DisplayInfo("CampLocation"); ?></td>
<td><?php echo $ymca1->DisplayInfo("CampAddress"); ?></td>
<td><?php echo $ymca1->DisplayInfo("Theme"); ?></td>
<td><?php echo $ymca1->DisplayInfo("Week"); ?></td>
<td><?php echo $ymca1->DisplayInfo("Contact"); ?></td>
<td><?php echo $ymca1->DisplayInfo("Email"); ?><br>
<?php echo $ymca1->DisplayInfo("Phone"); ?></td>
<td class="eC_FormItem" ><input type="text" name="ymca1_Quantity_<?php echo $ymca1->DisplayIndex; ?>" size="3" value="<?php echo $ymca1->DisplayInfo("Quantity"); ?>" /></td>
<td class="eC_PriceItem" ><?php echo WA_eCart_DisplayMoney($ymca1, $ymca1->DisplayInfo("Price")); ?></td>
<td class="eC_FormItem" ><input type="checkbox" value="<?php echo $ymca1->DisplayInfo("ID"); ?>" name="ymca1_Delete_<?php echo $ymca1->DisplayIndex; ?>" /></td>
<td class="eC_PriceItem" ><?php echo WA_eCart_DisplayMoney($ymca1, $ymca1->DisplayInfo("TotalPrice")); ?></td>
</tr>
<?php
$ymca1->MoveNext();
}
$ymca1->MoveFirst();
?>
</table>
<div class="eC_OrderSummary">
<table border="0" cellpadding="0" cellspacing="0" class="eC_CartSummary">
<?php
//WA eCart Merchandizing Show Start
//ecart="ymca1"
if ($ymca1->GetDiscounts() > 0 || $ymca1->GetCharges() > 0 || $ymca1->GetShipping() > 0 || $ymca1->GetTax() > 0) {
?>
<tr>
<td class="eC_Subtotal eC_SummaryLabel">Sub-total</td>
<td class="eC_Subtotal"><?php echo WA_eCart_DisplayMoney($ymca1, $ymca1->TotalColumn("TotalPrice")); ?></td>
</tr>
<?php
//WA eCart Merchandizing Show End
//ecart="ymca1"
}
?>
<?php
//WA eCart Merchandizing Show Start
//ecart="ymca1"
if ($ymca1->GetDiscounts() > 0) {
?>
<?php
//WA eCart Merchandizing Show End
//ecart="ymca1"
}
?>
<?php
//WA eCart Merchandizing Show Start
//ecart="ymca1"
if ($ymca1->GetCharges() > 0) {
?>
<?php
//WA eCart Merchandizing Show End
//ecart="ymca1"
}
?>
<?php
//WA eCart Merchandizing Show Start
//ecart="ymca1"
if ($ymca1->GetShipping() > 0) {
?>
<?php
//WA eCart Merchandizing Show End
//ecart="ymca1"
}
?>
<?php
//WA eCart Merchandizing Show Start
//ecart="ymca1"
if ($ymca1->GetTax() > 0) {
?>
<?php
//WA eCart Merchandizing Show End
//ecart="ymca1"
}
?>
<tr class="eC_SummaryFooter">
<td class="eC_SummaryLabel">Total:</td>
<td><?php echo WA_eCart_DisplayMoney($ymca1, $ymca1->GrandTotal()); ?></td>
</tr>
</table>
</div>
<table class="eC_ButtonWrapper" cellpadding="0" cellspacing="0">
<tr>
<td><input type="submit" value="Add More Camps" name="ymca1_Continue_100">
<input type="submit" value="Clear Planner" name="ymca1_Clear_100">
<input type="submit" value="Update Planner" name="ymca1_Update_100">
<input type="submit" value="Print Planner" name="ymca1_Checkout_1"></td>
</tr>
</table>
</form>
<?php
//WA eCart Show If Middle
}
else {
?>
<table><tr><td>The cart is empty</td></tr></table>
<?php
//WA eCart Show If End
}
?>
</div>
</div>
</div>
</body>
</html>

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