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

rating

cart.php preview on local server

Thread began 3/10/2010 12:16 pm by art391139 | Last modified 3/12/2010 7:06 pm by Jason Byrnes | 1925 views | 24 replies |

art391139

cart.php preview on local server

I have installed Ecart 5. When I click on the ecart cart button it redirects me to the correct page cart.php. However the page is blank.

Sign in to reply to this post

Jason ByrnesWebAssist

when a page displays blank, it means a php error is occurring, but error reporting is turned of in the php.ini file.


to enable error reporting, add the following code at line 1 of your page:

php:
<?php

error_reporting
(E_ALL);
ini_set('display_errors','on');
?>
Sign in to reply to this post

art391139

error message

What does this mean?

//WA eCart Include require_once("../WA_eCart/store1_PHP.php"); ?>
Notice: Undefined variable: store1 in /Applications/MAMP/htdocs/Pages/c01.php on line 10

Fatal error: Call to a member function GetContent() on a non-object in /Applications/MAMP/htdocs/Pages/c01.php on line 10

Sign in to reply to this post

Jason ByrnesWebAssist

this error usually occurs if the Cart object and the Database connection have been with the same name.

You must use unique names for you application objects like connection, recordset or cart object.

Sign in to reply to this post

art391139

reply

The names are not the same

Sign in to reply to this post

Jason ByrnesWebAssist

please send a copy of your page so I can examine the code.

Sign in to reply to this post

art391139

File attached

Attached Files
c01.php.zip
Sign in to reply to this post

Jason ByrnesWebAssist

the file you have sent is not the same as the one generating the error message.

The error massage is saying:
Notice: Undefined variable: store1 in /Applications/MAMP/htdocs/Pages/c01.php on line 10

however line 10 in the file you sent is
if (!function_exists("GetSQLValueString")) {


there is no variable named "store1" on line 10.

I need to see the copy of the file that is causing the error you are reporting.

Sign in to reply to this post

art391139

It was the same file without this code in front
<?php
error_reporting(E_ALL);
ini_set('display_errors','on');
?>

I attached it again with the code

Attached Files
c01.php.zip
Sign in to reply to this post

Jason ByrnesWebAssist

right, so when you added in this code:

php:
<?php 

error_reporting
(E_ALL); 
ini_set('display_errors','on'); 
?>



you deleted the next opening php tag. Line 1 - 7:

php:
<?php 

error_reporting
(E_ALL); 
ini_set('display_errors','on'); 
?>
//WA eCart Include
require_once("../WA_eCart/store1_PHP.php");
?>




should be:

php:
<?php 

error_reporting
(E_ALL); 
ini_set('display_errors','on'); 
?>
<?php
//WA eCart Include
require_once("../WA_eCart/store1_PHP.php");
?>
Sign in to reply to this post
loading

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