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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

eCart 5, after checkout the cart is not cleared

Thread began 2/03/2010 11:46 am by Alexneg66 | Last modified 3/04/2010 3:13 am by Alexneg66 | 2973 views | 27 replies

andrea343335

Clearing out the shopping cart after a successful checkout and getting error

Hi,

I have been following this thread, because I am also having the problem where the shopping cart was not emptying after a successful checkout. So I added this code after the /html tag at the very bottom of my webpage:

<?php
// Initialize the session.
// If you are using session_name("something"), don't forget it now!
session_start();

// Unset all of the session variables.
$_SESSION = array();

// If it's desired to kill the session, also delete the session cookie.
// Note: This will destroy the session, and not just the session data!
if (ini_get("session.use_cookies")) {
$params = session_get_cookie_params();
setcookie(session_name(), '', time() - 42000,
$params["path"], $params["domain"],
$params["secure"], $params["httponly"]
);
}

// Finally, destroy the session.
session_destroy();
?>

The code destroyed my whole session, but that was good with me, because I am not using any login security processing, where I am creating special session names or variables.

At the very end I am receiving this error: Warning: Cannot modify header information - headers already sent by (output started at /data/9/1/94/7/1746496/user/1886916/htdocs/sbmanor/checkout_success.php:67) in /data/9/1/94/7/1746496/user/1886916/htdocs/sbmanor/checkout_success.php on line 565

I know that there maybe some output occurring, but I am stumped I cannot see it. I attached a compressed version of my whole checkout_success.php webpage, but here is an excerpt of everything from line 67 and before:

<?php
//WA eCart Include
require_once("WA_eCart/SBMCart_PHP.php");
?><?php
$SBMCart->GetContent();
?>
<?php
if ($SBMCart->IsEmpty()) {
$SBMCart->redirStr = "Cart.php";
$SBMCart->cartAction = "RedirectIfEmpty";
}
?>
<?php
// WA eCart Redirect
if ($SBMCart->redirStr != "") {
header("Location: ".$SBMCart->redirStr);
}
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

"http://www.w3.org/TR/html4/loose.dtd">

<!-- Design / code / css by Nadia www.perrelink.com.au -->

<html><!-- InstanceBegin template="/Templates/scrapbookmanor.dwt.php" codeOutsideHTMLIsLocked="false" -->

<head>
<!-- InstanceBeginEditable name="EditRegion3" -->
<title>The Scrapbook Manor</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<!-- InstanceBeginEditable name="EditRegion2" -->
<link href="WA_eCart/CSS/eC_Refreshing_Moab_Arial.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--

function MM_findObj(n, d) { //v4.01

var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];

for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);

if(!x && d.getElementById) x=d.getElementById(n); return x;

}



function MM_showHideLayers() { //v6.0

var i,p,v,obj,args=MM_showHideLayers.arguments;

for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];

if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }

obj.visibility=v; }

}

//-->

</script>
<!-- InstanceEndEditable -->
?>

I appreciate your second eye on it, sometimes when you are too close to it you miss stuff. Do you see where output is being created?

Thank you in advance, this forum is great and provides lots of assistance, I really appreciate all that you do.

Andrea

Attached Files
checkout_success.php.zip

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