lat9,
i want to further state how great i think this add-on is. i'm rolling it out to a couple of customers soon and i'm sure i will get more feedback. i wanted to document a couple of small changes that i made to make this add-on a little easier for someone to use.
as the basis for the admin to login is the email address in YOUR_ADMIN/customers, i added the following line right after one of your comments:
PHP Code:
//-eof-a-EMP login link *** 1 of 1 ***
$contents[] = array('text' => '<br />Customers Email Address: ' . $cInfo->customers_email_address);
its just easier to have the customers email address right there.
in the same vein, i changed one line to automatically fill in the email address when selecting to place an order (almost makes the previous code irrelevant). the code is in includes/templates/YOUR_TEMPLATE/templates/tpl_login_default:
PHP Code:
//original
<?php echo zen_draw_input_field('email_address', '', 'size="30" id="login-email-address"'); ?>
// new line
<?php echo zen_draw_input_field('email_address', (($_POST['email_address'] !== null) ? $_POST['email_address']: ''), 'size="30" id="login-email-address"'); ?>
finally as i think the admin would like to see who they might be logged in as, i modified my templates header to include this information. where someone might want to put this bit in their template is up to them, but again i think it's just something that makes life easier for the admin entering the order (or whatever they might be doing on the customer account):
PHP Code:
<?php if (($_SESSION['customer_id']) && ($_SESSION['emp_admin_login'] == true)) { ?>
<li><a href="<?php echo zen_href_link(index, '', 'NONSSL'); ?>">Logged in as <? echo $_SESSION['customer_first_name'] . ' ' . $_SESSION['customer_last_name'] ?></a></li>
<?php } else { ?>
<li><a href="<?php echo zen_href_link(index, '', 'NONSSL'); ?>"><?php echo 'Home'; ?></a></li>
<?php } ?>
if these ideas were already documented somewhere, and i missed them, i apologize for being redundant!
best.
Bookmarks