View Full Version : adding recordset to checkout page error
email377288
05-17-2009, 12:48 AM
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?
johnlanglois
05-17-2009, 10:55 AM
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.
email377288
05-18-2009, 04:52 AM
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
Ray Borduin
05-18-2009, 07:40 AM
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.
vBulletin® v3.8.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.