close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Error message after adding quickcart to template header

Thread began 1/10/2012 8:53 am by bill3786 | Last modified 1/10/2012 12:10 pm by bill3786 | 1514 views | 5 replies |

bill3786

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

Attached Files
MasteroneColumn.dwt.zip
administration.zip
Sign in to reply to this post

Jason ByrnesWebAssist

on the template file, this code:

php:
<?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);
}
?>




needs to be moved to line 1.

Sign in to reply to this post

bill3786

I already tried the code at line 1 but I tried it again now and still get the following error

Notice: Undefined variable: eCart1 in C:\xampp\htdocs\tweedmill\index.php on line 208

Fatal error: Call to a member function TotalColumn() on a non-object in C:\xampp\htdocs\tweedmill\index.php on line 208

That is why I added the code to the head area of the template so that it is transfered to the updated pages on saving the template. This works for all the pages but with the single error on the administation page mentioned earlier.

Sign in to reply to this post

bill3786

I tried putting the code at the begining of the head area instead of at the end on the template page and the error with the administation page has gone.

Sign in to reply to this post

Jason ByrnesWebAssist

I have created a support ticket so we can look into this issue further.

To view and edit your support ticket, please log into your support history:
supporthistory.php

If anyone else is experiencing this same issue, please append to this thread.

Sign in to reply to this post

bill3786

The problem has disappeared so all seems to be ok on this now, many thanks

Sign in to reply to this post

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