
Originally Posted by
DrByte
To make COWOA case-insensitive for the "no-account" customers, you could simply edit the header_php.php for the orders_status page and wrap strtolower() around both variables in the comparison done in:
Code:
if (isset($_POST['query_email_address']) && $customer_info->fields['customers_email_address'] != $_POST['query_email_address']) {
That might not take into account the use of multibyte characters in your email addresses, but if that's a rarity for your typical customer then it might be moot.
The standard Zen Cart login is case-insensitive ... because the database is case-insensitive -- that's with the _ci is on the end of the database collation. A collation of utf8_general_ci indicates that database compares are to be case-insensitive.
That said, in a standard Zen Cart installation, if you create an account using the email address of [email protected] there is no problem on the login page using [email protected] ... because the comparison is done via the database lookup. Changing the order_status page's header_php.php starting at line 24 to the following uses the database comparisons and achieves the same functionality as DrByte's solution:
Code:
$customer_info_query = "SELECT customers_email_address, customers_id
FROM " . TABLE_ORDERS . "
WHERE orders_id = :ordersID
AND customers_email_address = :emailAddress";
$customer_info_query = $db->bindVars($customer_info_query, ':ordersID', $_POST['order_id'], 'integer');
$customer_info_query = $db->bindVars($customer_info_query, ':emailAddress', $_POST['query_email_address'], 'string');
$customer_info = $db->Execute($customer_info_query);
if ($customer_info->EOF) {
$errorNoMatch=TRUE;
} else {
...
P.S. Off-subject, but when I did a fresh install of COWOA on a fresh install of Zen Cart 1.5.1, the define TEXT_CHECKOUT_LOGOFF_CUSTOMER appears to be missing from the orders_status page.
Bookmarks