Remove Requirement for Username and Password
Some people have reported success with this, but you will have to try it yourself, as I simply don't have the time any more to test modifications that Cartweaver does not support out of the box.
1. Remove the Username, password, and password confirm boxes and associated table rows from the CWIncOrderForm.php file. Add hidden fields to take their place to avoid confusion with other areas of site:
<input type="hidden" name="cstUsername" value="">
<input type="hidden" name="cstPassword" value="">
<input type="hidden" name="cstPasswordConfirm" value="">
2. Remove the check for username, password, and password confirm, and also the check for duplicate username and check for duplicate email on CWIncValidateOrderForm.php
3. Rewrite the login function to use Email rather than username on CWFunCustomerAction.php:
change this:
function login($username, $password) {
to this:
function login($email) {
change this:
$query_rsCWGetCustomer = "SELECT cst_ID, cst_ShpCity
FROM tbl_customers
WHERE cst_Username = '$username'
AND cst_Password = '$password'";
to this:
$query_rsCWGetCustomer = "SELECT cst_ID, cst_ShpCity
FROM tbl_customers
WHERE cst_Email = '$email'";
4. Find the login code in CWIncSetup.php and change it to use email:
change this:
/* If the customer log in form has been submitted, try to find a match */
$logged = false;
if(isset($_POST["retcustomer"])){
include("CWFunCustomerAction.php");
$loginError = login($_POST["username"],$_POST["password"]);
$logged = ($loginError == '');
if($logged) {
header("Refresh: 0; URL=" . $cartweaver->thisPageName);
exit();
}
}
to this:
/* If the customer log in form has been submitted, try to find a match */
$logged = false;
if(isset($_POST["retcustomer"])){
include("CWFunCustomerAction.php");
$loginError = login($_POST["email"]);
$logged = ($loginError == '');
if($logged) {
header("Refresh: 0; URL=" . $cartweaver->thisPageName);
exit();
}
}
5. Change the login form to ONLY use email. First, get rid of all the "Did you lose your password" code and form.
6. Remove the password field, and change the username field into an email field.