It would seems I forgot some lines on the same file mentionned above.
Then, find:
$email_address = zen_db_prepare_input($_POST['email_address']);
replace with:
if (isset($_GET['email_address']) || isset($_POST['email_address'])) {
$email_address = (isset($_POST['email_address']) && !empty($email_address)) ? zen_db_prepare_input(trim($_POST['email_address'])) : "";
}
Then, find:
'customers_email_address' => $email_address,
replace with:
'customers_email_address' => trim($email_address),
/* Optional */
If you're using PHPbb to create user accounts within Zen Cart,
find:
$phpBB->phpbb_create_account($nick, $password, $email_address);
replace with:
$phpBB->phpbb_create_account($nick, $password, trim($email_address));
/* End of optional */
Then, find:
$db->Execute("insert into " . TABLE_COUPON_EMAIL_TRACK . " (coupon_id, customer_id_sent, sent_firstname, emailed_to, date_sent) values ('" . $coupon_id ."', '0', 'Admin', '" . $email_address . "', now() )");
replace with:
$db->Execute("insert into " . TABLE_COUPON_EMAIL_TRACK . " (coupon_id, customer_id_sent, sent_firstname, emailed_to, date_sent) values ('" . $coupon_id ."', '0', 'Admin', '" . trim($email_address) . "', now() )");
Then, find:
$db->Execute("insert into " . TABLE_COUPON_EMAIL_TRACK . " (coupon_id, customer_id_sent, sent_firstname, emailed_to, date_sent) values ('" . $insert_id ."', '0', 'Admin', '" . $email_address . "', now() )");
replace with:
$db->Execute("insert into " . TABLE_COUPON_EMAIL_TRACK . " (coupon_id, customer_id_sent, sent_firstname, emailed_to, date_sent) values ('" . $insert_id ."', '0', 'Admin', '" . trim($email_address) . "', now() )");
These should be all. :thumbsup: