The first person's solution is such that the original text reads as follows:
Modify Dede itself order procedures, Dede is not required to register members can it? Simple that I now register a public member written dead in the program is in the user name and password fields I directly write the value of the right is not ok oh, of course, if you want to be smart. If the user is a member of the user's membership number otherwise use the default account is also simple Ah js Bai!!!
The second person's solution is forgiven as follows:
This can be done to try the background first to open the member function if you do not want to have members to join can prohibit member registration
and find the plus/carbuyaction.php file.
Delete the following code
Confirm User Login Information
if ($cfg _ml->islogin ())
{
$userid = $cfg _ml->m_id;
}
Else
{
$username = Trim ($username);
$password = Trim ($password);
if (Empty ($username) | | $password)
{
ShowMsg ("Please choose login!") ","-1 ", 0,2000);
Exit ();
}
$rs = $cfg _ml->checkuser ($username, $password);
if ($rs ==0)
{
ShowMsg ("User name does not exist!") ","-1 ", 0,2000);
Exit ();
}
else if ($rs ==-1)
{
ShowMsg ("Bad password!) ","-1 ", 0,2000);
Exit ();
}
$userid = $cfg _ml->m_id;
}
In my site, neither of these can completely solve the problem, but the combination of two people, just meet my requirements. One problem with the first person's thinking is that "if someone buys something without paying later the user is not going to pay together to see the other unpaid orders", the following people have raised this question, not too well. The second person to delete the code, that is, the user login information is not in the order of the association, so we want visitors can order, members can also buy. If I have made the following modifications:
/plus/carbuyaction.php's
| The code is as follows |
Copy Code |
Confirm User Login Information if ($cfg _ml->islogin ()) { $userid = $cfg _ml->m_id; } Else { $username = Trim ($username); $password = Trim ($password);
if (Empty ($username) | | $password) { ShowMsg ("Please choose login!") ","-1 ", 0,2000); Exit (); }
$rs = $cfg _ml->checkuser ($username, $password); if ($rs ==0) { ShowMsg ("User name does not exist!") ","-1 ", 0,2000); Exit (); } else if ($rs ==-1) { ShowMsg ("Bad password!) ","-1 ", 0,2000); Exit (); } $userid = $cfg _ml->m_id; } |
To
| The code is as follows |
Copy Code |
Confirm User Login Information if ($cfg _ml->islogin ()) { $userid = $cfg _ml->m_id; } Else { $username = Trim ($username); $password = Trim ($password);
if (Empty ($username) | | $password) { $userid = 0; } Else { $rs = $cfg _ml->checkuser ($username, $password); if ($rs ==0) { ShowMsg ("User name does not exist!") ","-1 ", 0,2000); Exit (); } else if ($rs ==-1) { ShowMsg ("Bad password!) ","-1 ", 0,2000); Exit (); } $userid = $cfg _ml->m_id; } } |
Modification means that if the user does not login, then I will assign 0 to the ID, so in the background as long as you see is 0 orders, is the tourists. After the current test, no problem found