Zen Cart Logo
Forums / Managing Customers and Orders / Add personal notes about customer's account?

Add personal notes about customer's account?

Views: 3,329

Results 1 to 11 of 11
23 Aug 2011, 10:44 PM
#1
sjolie avatar

sjolie

New Zenner

Join Date:
Oct 2009
Posts:
53
Plugin Contributions:
0

Add personal notes about customer's account?

Hello All,

I've been searching for hours on zen-cart forum and addon files for a script/addon that would allow admins to add comments/notes which would attach to a customers account.

I've installed the advanced admin note addon, but it doesn't work how I'd like.

Essentially we make sales calls throughout our database. I want to be able to make comments on each account we call, so we never have duplicate calls and/or can create history about calls so we can pickup where we left off.

Has anyone wrote anything to accomplish this? please point me in the right direction.

I appreciate all the help,

Mike

24 Aug 2011, 7:36 AM
#2
gaurav10feb avatar

gaurav10feb

Zen Follower

Join Date:
Jan 2010
Location:
Australia
Posts:
243
Plugin Contributions:
1

Re: Add personal notes about customer's account?

do u want just one notes field par customer or everytime you would like to create new notes and also to be able to see old notes history?

24 Aug 2011, 7:23 PM
#3
sjolie avatar

sjolie

New Zenner

Join Date:
Oct 2009
Posts:
53
Plugin Contributions:
0

Re: Add personal notes about customer's account?

It would be great to keep history of the notes as well. However even if there was a way to display the "last" note for example "Called customer, left message on 8/24/2011, Call back at later date". That message would let our other staff members know not to bug this customer for atleast 2 more weeks.

25 Aug 2011, 12:26 AM
#4
gaurav10feb avatar

gaurav10feb

Zen Follower

Join Date:
Jan 2010
Location:
Australia
Posts:
243
Plugin Contributions:
1

Re: Add personal notes about customer's account?

ok i will make it today ...let me know what version of zencart u r using.

25 Aug 2011, 1:36 AM
#5
gaurav10feb avatar

gaurav10feb

Zen Follower

Join Date:
Jan 2010
Location:
Australia
Posts:
243
Plugin Contributions:
1

Re: Add personal notes about customer's account?

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 :clap:

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.

30 Aug 2011, 6:40 PM
#6
sjolie avatar

sjolie

New Zenner

Join Date:
Oct 2009
Posts:
53
Plugin Contributions:
0

Re: Add personal notes about customer's account?

You are amazing, thank you so much for taking your personal time and putting this together. I'll be applying this to the system as soon as I can.

Thanks again,

31 Aug 2011, 4:02 AM
#7
gaurav10feb avatar

gaurav10feb

Zen Follower

Join Date:
Jan 2010
Location:
Australia
Posts:
243
Plugin Contributions:
1

Re: Add personal notes about customer's account?

No problem, you can always appreciate by donating zencart people.

Let us know if it worked out for you well.

31 Aug 2011, 12:27 PM
#8
gazag avatar

gazag

Zen Follower

Join Date:
Jun 2011
Posts:
195
Plugin Contributions:
0

Re: Add personal notes about customer's account?

Great mod gaurav10feb :clap:

But i think i have found one bug!

If you type a note with an apostrophe it comes up with a SQL error!

So if you type " I don't know if this works or not" it will come up with an error.

Also is there anyway to have the notes show up in the customers panel to the left of the table of customers???

1 Sep 2011, 12:02 AM
#9
gaurav10feb avatar

gaurav10feb

Zen Follower

Join Date:
Jan 2010
Location:
Australia
Posts:
243
Plugin Contributions:
1

Re: Add personal notes about customer's account?

Hello Gazag,

Thanks for telling...i knew this will come..but as i mentioned above this was a quick fix for person requested it.

if you are using same way then use two 's instead of one

"I don''t know if this works or not"

Alternately, modify above insert command and use addslashes($notes) instead

...will work out for your second request.

15 Jul 2013, 2:38 PM
#10
abcisme avatar

abcisme

Zen Follower

Join Date:
Jun 2006
Posts:
298
Plugin Contributions:
0

Re: Add personal notes about customer's account?

I'm wondering if anyone can help me to display these notes on the order screen for every order the customer makes... We use Super Orders 3.0 and ideally, I'd like to be able to have a customer note history show up on the order page as well as on the invoice. Thank you!

24 Jun 2014, 4:06 PM
#11
shopville avatar

shopville

Zen Follower

Join Date:
Aug 2012
Posts:
331
Plugin Contributions:
0

Re: Add personal notes about customer's account?

abcisme:

I'm wondering if anyone can help me to display these notes on the order screen for every order the customer makes... We use Super Orders 3.0 and ideally, I'd like to be able to have a customer note history show up on the order page as well as on the invoice. Thank you!

This sounds like what you are looking for http://www.zen-cart.com/downloads.php?do=file&id=847