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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

adding recordset to checkout page error

Thread began 5/17/2009 3:48 am by email377288 | Last modified 5/18/2009 10:40 am by Ray Borduin | 1134 views | 3 replies |

email377288

adding recordset to checkout page error

i have built user registration pages using security assist and checkout pages using eCart.

i am now trying to populate the checkout page form fields with data from the user registration table in my database.

After inserting the recordset on the checkout page it no longer loads and gives the following error...

Fatal error: Call to a member function GetContent() on a non-object in C:\wamp\www\sosume\store_checkout.php on line 12

any thoughts?

Sign in to reply to this post

johnlanglois

Originally Said By: email377288
  i have built user registration pages using security assist and checkout pages using eCart.

i am now trying to populate the checkout page form fields with data from the user registration table in my database.

After inserting the recordset on the checkout page it no longer loads and gives the following error...

Fatal error: Call to a member function GetContent() on a non-object in C:\wamp\www\sosume\store_checkout.php on line 12

any thoughts?  



Sounds like you lost your include file statement when you went to the checkout page.
Look at the top of your registration page and see the different files that are contained in a statement like

<?php require_once("WA_DataAssist/WA_AppBuilder_PHP.php"); ?>
<?php require_once("WA_ValidationToolkit/WAVT_Scripts_PHP.php"); ?>
<?php require_once("WA_ValidationToolkit/WAVT_ValidatedForm_PHP.php"); ?>



The one that contains the code for the GetContent() function is missing from your checkout page.
If you are using Dreamweaver, you can search the whole website for GetContent() and discover where it lives.

Also, be sure to start your session on each page.

Sign in to reply to this post

email377288

hey thanks, i edited the code on the checkout page to read:

<?php
if (!isset($_SESSION)) {
session_start();
}
?>
<?php
//WA eCart Include
require_once("WA_eCart/sosume_PHP.php");
?>
<?php
$sosume->GetContent();
?>
<?php require_once('Connections/sosume.php'); ?>

--------------

The GetContent error has disappeared and now the checkout page shows

Fatal error: Call to a member function IsEmpty() on a non-object in C:\wamp\www\sosume\store_checkout.php on line 56

If I comment this section of code from line 56:

<?php
if ($sosume->IsEmpty()) {
$sosume->redirStr = "store_cart.php";
$sosume->cartAction = "RedirectIfEmpty";
}
?>
<?php
// WA eCart Redirect
if ($sosume->redirStr != "") {
header("Location: ".$sosume->redirStr);
}
?>

--------------

The error disappears and the checkout page displays correctly.

Assuming the above code is important to eCart functionality, any ideas how to get it to work without commenting it out?

cheers

Sign in to reply to this post

Ray BorduinWebAssist

Remove:


<?php
if (!isset($_SESSION)) {
session_start();
}
?>

it isn't needed.

You can also remove:

<?php
if ($sosume->IsEmpty()) {
$sosume->redirStr = "store_cart.php";
$sosume->cartAction = "RedirectIfEmpty";
}
?>

although it is odd you are getting an error, since that should be defined in the same place as the rest of the cart.

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