close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Column 'OrderUserID' cannot be null

Thread began 5/17/2012 4:16 pm by mpiasecki1437949 | Last modified 5/30/2012 8:47 am by Jason Byrnes | 3102 views | 16 replies |

mpiasecki1437949

"Column 'OrderUserID' cannot be null" message and blank confirm page

This is continuation of my post about download center showthread.php?t=26510. Everything works good now except for one thing. When I press checkout the confirm.php page displays blank with this message "Column 'OrderUserID' cannot be null" I check in database table and this column is not null there. I can not complete the translation and go to pay pal for payment. I attached page for review.

Attached Files
downloadcenter (2).zip
Sign in to reply to this post

Jason ByrnesWebAssist

on the confirm page, the store order summary behavior is set to use the UserID session variable.

it should be using the SecurityAssist_UserID session variable instead.


your login page is still quire a bit of a mess. you have unneeded instances of the authenticate user server behavior and there is also an instance of the Dreamweaver Login user behavior.

Sign in to reply to this post

mpiasecki1437949

confirm pge

Jason,
Could you please clear those items from log in page and attache to repply. I ran the SA wizard and this must be left overs, I don not know which items to remove so the log in is still working.

Sign in to reply to this post

Jason ByrnesWebAssist

delete this code from line 181 - 223:

php:
<?php

// *** Validate request to login to this site.
if (!isset($_SESSION)) {
  
session_start();
}

$loginFormAction $_SERVER['PHP_SELF'];
if (isset(
$_GET['accesscheck'])) {
  
$_SESSION['PrevUrl'] = $_GET['accesscheck'];
}

if (isset(
$_POST['Log_In_group_Email'])) {
  
$loginUsername=$_POST['Log_In_group_Email'];
  
$password=$_POST['Log_In_group_Password'];
  
$MM_fldUserAuthorization "";
  
$MM_redirectLoginSuccess "userprofile.php";
  
$MM_redirectLoginFailed "login_test.php";
  
$MM_redirecttoReferrer false;
  
mysql_select_db($database_connlive$connlive);
  
  
$LoginRS__query=sprintf("SELECT UserID, UserEmail FROM users WHERE UserID=%s AND UserEmail=%s",
    
GetSQLValueString($loginUsername"int"), GetSQLValueString($password"text")); 
   
  
$LoginRS mysql_query($LoginRS__query$connlive) or die(mysql_error());
  
$loginFoundUser mysql_num_rows($LoginRS);
  if (
$loginFoundUser) {
     
$loginStrGroup "";
    
    if (
PHP_VERSION >= 5.1) {session_regenerate_id(true);} else {session_regenerate_id();}
    
//declare two session variables and assign them
    
$_SESSION['MM_Username'] = $loginUsername;
    
$_SESSION['MM_UserGroup'] = $loginStrGroup;          

    if (isset(
$_SESSION['PrevUrl']) && false) {
      
$MM_redirectLoginSuccess $_SESSION['PrevUrl'];    
    }
    
header("Location: " $MM_redirectLoginSuccess );
  }
  else {
    
header("Location: "$MM_redirectLoginFailed );
  }
}
?>




and this code from line 94 - 130:

php:
if(WA_Auth_RulePasses("Log in success")){

    $WA_Auth_Parameter = array(
    "connection" => $connlive,
    "database" => $database_connlive,
    "tableName" => "users",
    "columns" => explode($WA_Auth_Separator,"UserEmail"),
    "columnValues" => explode($WA_Auth_Separator,"mpiasecki1@gmail.com"),
    "columnTypes" => explode($WA_Auth_Separator,"text"),
    "sessionColumns" => explode($WA_Auth_Separator,"UserID".$WA_Auth_Separator."UserEmail"),
    "sessionNames" => explode($WA_Auth_Separator,"UserID".$WA_Auth_Separator."UserEmail"),
    "successRedirect" => "userprofile.php",
    "failRedirect" => "",
    "gotoPreviousURL" => FALSE,
    "keepQueryString" => FALSE
    );
    
    WA_AuthenticateUser($WA_Auth_Parameter);
}

if(WA_Auth_RulePasses("Logged in to users")){
    $WA_Auth_Parameter = array(
    "connection" => $connlive,
    "database" => $database_connlive,
    "tableName" => "users",
    "columns" => explode($WA_Auth_Separator,"UserID"),
    "columnValues" => explode($WA_Auth_Separator,"redirect_userprifile"),
    "columnTypes" => explode($WA_Auth_Separator,"int"),
    "sessionColumns" => explode($WA_Auth_Separator,"UserID"),
    "sessionNames" => explode($WA_Auth_Separator,"UserID"),
    "successRedirect" => "userprofile.php",
    "failRedirect" => "",
    "gotoPreviousURL" => FALSE,
    "keepQueryString" => TRUE
    );
    
    WA_AuthenticateUser($WA_Auth_Parameter);
}
Sign in to reply to this post

mpiasecki1437949

another problem

Thanks this did the work with this one but created another problem. Now the order is being recorded before paypal transaction. As soon as I press checkout button after entering billing information at checkout.php page the transaction is recorded and download center and customer orders are being displayed. I have attached pages.

Attached Files
downloadcenter_3.zip
Sign in to reply to this post

Jason ByrnesWebAssist

the confirm page is posting to the paypal standard gateway, this is the way that paypal standard works.


as i outlined in the initial thread you started for this:
showthread.php?t=26510


i dont recommend using paypal standard, you would be better of using paypal express.

Sign in to reply to this post

mpiasecki1437949

pay pal

I changed standard to express at pay pal but didn't change confirm page. When you go thru e cart process there are only two options pay pal standard or pro no express checkout that's why those setting are still there. Is there a way to change it on the confirm page ?

Sign in to reply to this post

Jason ByrnesWebAssist

no, you should delete the confirm page so it wont go through paypal standard and only use the pay with express checkout button on the checkout page.

Sign in to reply to this post

mpiasecki1437949

pay pal

What kind of button and how to link it with pay pal express and e-card. Did anybody tried this and have the code.

Sign in to reply to this post

mpiasecki1437949

check out

Jason,
But the transaction is recorded after checkout button at checkout page is pressed not at confirm page. This should be some error there. Even with using standard paypal this should not happen becouse confirm page redirects to paypal and not checkout. I did your suggestions with canceling the confirma page but then how to apply all these code at check out page to fill out paypal with product info etc.

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