activate customer account by admin
1) open admin/customers.php
find
if (tep_not_null($action)) {
switch ($action) {
case 'update':
after:
$entry_state = tep_db_prepare_input($HTTP_POST_VARS['entry_state']);
add
$customers_active_status= tep_db_prepare_input($HTTP_POST_VARS['customers_active_status']);
step 2
find
$sql_data_array = array('customers_firstname' => $customers_firstname,
'customers_lastname' => $customers_lastname,
'customers_email_address' => $customers_email_address,
'customers_telephone' => $customers_telephone,
'customers_fax' => $customers_fax,
add before the ")" with
, 'customers_active_status' => $customers_active_status
step 3
find
$customers_query = tep_db_query("select c.customers_id, c.customers_gender, c.customers_firstname, c.customers_lastname, c.customers_dob,
replace with
$customers_query = tep_db_query("select c.customers_id, c.customers_gender, c.customers_firstname, c.customers_lastname, c.customers_dob, c.customers_active_status,
step 4
find
<td class="main"><?php echo ENTRY_NEWSLETTER; ?></td>
<td class="main">
<?php
if ($processed == true) {
if ($cInfo->customers_newsletter == '1') {
echo ENTRY_NEWSLETTER_YES;
} else {
echo ENTRY_NEWSLETTER_NO;
}
echo tep_draw_hidden_field('customers_newsletter');
} else {
echo tep_draw_pull_down_menu('customers_newsletter', $newsletter_array, (($cInfo->customers_newsletter == '1') ? '1' : '0'));
}
?></td>
</tr>
add after
<?php
if ($action == 'edit' || $action == 'update') {
$active_status_array = array(array('id' => '1', 'text' => ENTRY_EMAILVALIDATE_YES),
array('id' => '0', 'text' => ENTRY_EMAILVALIDATE_NO));
}
?>
<tr>
<td class="main"><?php echo ENTRY_CUSTOMERS_EMAIL_VALIDATED;?> </td>
<td class="main">
<?
if(ACTIVATION_CODE=='on'){
echo tep_draw_pull_down_menu('customers_active_status',$active_status_array, (($cInfo->customers_active_status == '1') ? '1' : '0'));
}else{
echo TEXT_EMAIL_VALIDATE_FEATURE. tep_draw_hidden_field('customers_active_status',$cInfo->customers_active_status);
}
?>
</td>
</tr>
open admin/includes/languages/english/customers.php
add
define('ENTRY_CUSTOMERS_EMAIL_VALIDATED','Email Validated:');
define('ENTRY_EMAILVALIDATE_YES', 'Validated (active)');
define('ENTRY_EMAILVALIDATE_NO', 'Unvalidated (inactive)');
define('TEXT_EMAIL_VALIDATE_FEATURE','Require E-mail confirmation on account creation is set off.');
before ?>
This fix will autoselect the proper status and then update it upon submit.