I have done quick fix for you...
STEP 1: open admin>>customers.php
search for case 'update':
add this after search text
// add new notes first
$notes = zen_db_prepare_input($_POST['notes']);
$db->Execute("INSERT INTO " . TABLE_CUSTOMERS_HISTORY . "(customers_id,date,notes) VALUES(" .(int)$customers_id. ",now(),'" . $notes . "')");
// end of add new notes
STEP 2: same file as of step 1 search for
<?php echo zen_draw_input_field('customers_referral', $cInfo->customers_referral, zen_set_field_length(TABLE_CUSTOMERS, 'customers_referral', 15)); ?>
</td>
</tr>
</table></td>
</tr>
add this after search text
<!--Notes for customers-->
<tr>
<td><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<tr>
<td class="formAreaTitle"><?php echo 'Notes'; ?></td>
</tr>
<tr>
<td class="formArea"><table border="0" cellspacing="2" cellpadding="2">
<?php
$notes_query = $db->Execute("select * from ". TABLE_CUSTOMERS_HISTORY . " where customers_id = '" . (int)$customers_id . "' ORDER by date DESC LIMIT 5");
while (!$notes_query->EOF) {
echo '<tr><td class="main">' . $notes_query->fields['date'] . '</td><td class="main">' . $notes_query->fields['notes'] . '</td></tr>';
$notes_query->MoveNext();}?>
<tr><td colspan='2' class="main">Add Notes:</td>
<tr><td colspan='2' class="main"><?php echo zen_draw_textarea_field('notes', 'soft', '30', '5');?>
</td>
</table>
</td>
</tr>
<!--end of notes-->
after search text
STEP 3: open includes>>database_tables.php and add
define('TABLE_CUSTOMERS_HISTORY', DB_PREFIX . 'customers_history');
STEP 4: create a sql table using sql file attached.
DONE!!! Puf
You will be able to see last 5 notes in admin customers page and also be able to create new notes.
I will try to make it addon as soon as i get some time.
Bookmarks