Error message after adding quickcart to template header
I'm adding a quickcart to the header of my template so that it appears on everypage of the site, currently 46 pages.
I created the quick cart on a dummy page so that I didnt mess up the template page until I was happy with it (lots of floats and clears on the template page that always give me trouble). I then copied the actual cart to my template header. I then copied the code which had been generated, shown below, into the end of the head area of the template (was this correct). On saving the template all 46 files were updated and they all work fine except for one page which is an administration page. Continued after code.
<?php
//WA eCart Include
require_once("../WA_eCart/eCart1_PHP.php");
?>
<?php
$eCart1->GetContent();
?>
<?php
// WA eCart Clear Cart
if (isset($_POST["eCart1_Clear_100"]) || isset($_POST["eCart1_Clear_100_x"])) {
$eCart1->ClearCart();
$Redirect_redirStr="";
if ($Redirect_redirStr != "") {
$eCart1->redirStr = $Redirect_redirStr;
}
$eCart1->cartAction = "ClearCart";
}
?>
<?php
//WA eCart Redirect Check Out
if (isset($_POST["eCart1_Checkout"]) || isset($_POST["eCart1_Checkout_x"])) {
$Redirect_redirStr="";
if ($Redirect_redirStr != "") {
if (isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] != "") {
if (strpos($Redirect_redirStr, "?") < 0) {
$Redirect_redirStr .= "?".$_SERVER['QUERY_STRING'];
}
else {
$Redirect_redirStr .= "&".$_SERVER['QUERY_STRING'];
}
}
$eCart1->redirStr = $Redirect_redirStr;
}
$eCart1->cartAction = "Checkout";
}
?>
<?php
// WA eCart Redirect
if ($eCart1->redirStr != "") {
header("Location: ".$eCart1->redirStr);
}
?>
The admin page shows a warning mesage at the top as shown in the attachment. The admin page is different to the other pages in that it has a secondary menu, could this be the cause of the warning message. The second menu works perfectly. How do I get rid of the warning message and did I add the quickcart stuff correctly? Copy of admin and template attached.
0p