Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Admin Notes


PopTheTop

Recommended Posts

Unbelievable, i havent been here for a while since our shop is running like a charm with no problms wha's so ever and now i was thinking, lets see what's new.

 

I found this great contribution (thank you very much), with just a small hickup (forgot to add that step in your zip file).

 

I place my question and yet again carine comes to save the day for me :thumbsup:

 

Carine, thanks once again, you seem to be my lucky angel :blush:

Do you ever take a day of hehehe?

 

 

 

BTW, everything now works again thanks to the both of you

Link to comment
Share on other sites

  • Replies 185
  • Created
  • Last Reply

Top Posters In This Topic

  • 4 weeks later...

Hi Scott,

 

thank you for this great contribution!!

 

Noticed one tiny typo (line 405 admin/admin_notes.php):

            <td class="dataTableContent"><?php echo $sInfo->status . ': ' . $status_desc; ?></td>

should be:

            <td class="dataTableContent"><?php echo $sInfo->status . ': ' . $status_desc; ?></td>

(the ; is missing after the  )

Link to comment
Share on other sites

Thanks, it will be added to the next upload.

L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Link to comment
Share on other sites

I have a question.

 

Although the contribution works fine i have a comment.

Maybe i have done something wrong(doubt it because the install is pretty simple), but i have noticed that when you create you are able to choose a category, but you can only set a marker of your choice when you have first made a new note and then you have to edit it again to set the marker.

 

Isn't it a far better plan to be able to set the marker also when you create a new note?

 

Can someone shed a light in this case?

Link to comment
Share on other sites

True, I noticed that as well, but as soon as you create the new note, you are taken back to the complete list of notes and that newly entered note is selected. All you have to do is click on the marker button there to change it.

 

Since you are able to do that, I left it the way it is now.

L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Link to comment
Share on other sites

THX for that great contri

 

i have added and upload german translation of language files

 

 

some ideas for the next Version:

may be it will be usefull to let the coustomers few a part of the "coustomers notize"

so he can read the information that he have 10% discount

 

a posibloe way to get all coustomners information...not only thoughs who has acceped newsletter

 

 

But my php knowledge is too bad

Link to comment
Share on other sites

I think that you are stating that it would be useful to add a note that the customer can see???

 

Where, in the customer's profile?

Edited by PopTheTop

L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Link to comment
Share on other sites

  • 2 weeks later...

Hi guys ;)

 

great contribution, congratulation... :thumbsup:

 

I would like to know if somebody has included admin notes in admin/orders.php...

 

It should be great to display and to edit these notes, just under customers infos, when we edit the customers orders....

Very useful to read them if a customer is a bad payer or in case of security problem (banned customer, banned country... )

 

It seems to be a good idea, isn't it?

 

(sorry for my bad english, I'm french... ;) )

Link to comment
Share on other sites

It is already in the latest release of this MOD.

L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Link to comment
Share on other sites

Hi Pop :D

 

Your last release displays the admin notes for customers in the Edit Customer page of Admin... notes availables in the customer's profile.

 

I would like to display these notes in the Edit Customer's order page (/admin/orders.php?selected_box=customers&page=1&oID=30&action=edit), just before the ordered products list.... ;)

Link to comment
Share on other sites

image1.gif

 

Here comes a picture of my mod...

This is the code I've added to display this text area:

 

<!-- Modif Admin Notes //-->
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	 <tr>
          <td valign="top" class="main">Notes Administrateur :</td>
           <td class="main">
<?php
 if ($processed == true) {
 echo $cInfo->customers_notes . tep_draw_hidden_field('customers_notes');
 } else {
 echo tep_draw_textarea_field('customers_notes', 'soft', '75', '5', ($cInfo->customers_notes));
 }
?></td>
         </tr>
       </table></td>
     </tr>
<!-- Modif Admin Notes //-->

 

But now, I need the query to display customer's admin notes, from customer's profile, inside this text area... ;)

Somebody could provide it to me?

Thx for all... :thumbsup:

Link to comment
Share on other sites

I think this contribution is fantastic, if only i could get it to work.

 

The customer end works like a dream. No problems there.

 

The problem is when i click into admin notes from tools i get this error.

 

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/globalda/public_html/test/admin/admin_notes.php on line 278

 

Warning: reset() [function.reset]: Passed variable is not an array or object in /home/globalda/public_html/test/admin/includes/classes/object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in /home/globalda/public_html/test/admin/includes/classes/object_info.php on line 18

 

I can add new notes but i can't delete them. Can anybody help with his as i am desperate for this to work.

 

I am using Milestone 2.2

 

Thanks in advance.

Edited by djmatrix
Link to comment
Share on other sites

Did you follow each and every line of instructions?

Did you add the SQL files and follow the instructions in them as well?

Do you have any other mods installed to conflict with this?

L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Link to comment
Share on other sites

Did you follow each and every line of instructions?

Did you add the SQL files and follow the instructions in them as well?

Do you have any other mods installed to conflict with this?

 

 

I have checked that the code was installed properly but i will check again t make sure. As for other mods installed, i will have to make a list. Is there any in particular that do not work with the admin mod.

Link to comment
Share on other sites

I really can not tell you. There are just way too many out there. I ask because you know your own modified code better than I do. This is such an easy mod to install, hardly anyone has a problem with it. And when they do, it is usually the way it was installed.

L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Link to comment
Share on other sites

  • 1 month later...

Scott thanks again for this great contrib! I'm using it almost daily now :)

 

I made one little change so that the default status is "Important", I just like it a little better that way (= red light = '0').

 

In admin/admin_notes.php

changed:

    case 'insert':
     if ($HTTP_POST_VARS['category_new'] != '') { tep_db_query("insert into " . TABLE_ADMIN_NOTES_TYPE . " (type_id, type_name, status) values ('1', '" . $HTTP_POST_VARS['category_new'] . "','1')"); }
     tep_db_query("insert into " . TABLE_ADMIN_NOTES . " (contr_id, category, admin_note, config_comments, note_created, status, last_update) values ('','" . $HTTP_POST_VARS['file_type_id'] . "','" . $HTTP_POST_VARS['admin_note_new'] . "','" . $HTTP_POST_VARS['config_comments'] . "', now(), '2', '" . $HTTP_POST_VARS['last_update'] . "' )");
     tep_redirect(tep_href_link(FILENAME_ADMIN_NOTES, '&sID=' . $contr_id));
     break;

to:

    case 'insert':
     if ($HTTP_POST_VARS['category_new'] != '') { tep_db_query("insert into " . TABLE_ADMIN_NOTES_TYPE . " (type_id, type_name, status) values ('1', '" . $HTTP_POST_VARS['category_new'] . "','0')"); }
     tep_db_query("insert into " . TABLE_ADMIN_NOTES . " (contr_id, category, admin_note, config_comments, note_created, status, last_update) values ('','" . $HTTP_POST_VARS['file_type_id'] . "','" . $HTTP_POST_VARS['admin_note_new'] . "','" . $HTTP_POST_VARS['config_comments'] . "', now(), '0', '" . $HTTP_POST_VARS['last_update'] . "' )");
     tep_redirect(tep_href_link(FILENAME_ADMIN_NOTES, '&sID=' . $contr_id));
     break;

 

edit: wow that looks like a lot more code than in the editor ;)

this is the changed line:

      tep_db_query("insert into " . TABLE_ADMIN_NOTES . " (contr_id, category, admin_note, config_comments, note_created, status, last_update) values ('','" . $HTTP_POST_VARS['file_type_id'] . "','" . $HTTP_POST_VARS['admin_note_new'] . "','" . $HTTP_POST_VARS['config_comments'] . "', now(), '0', '" . $HTTP_POST_VARS['last_update'] . "' )");

(only one '2' changed to '0')

Edited by PandA.nl
Link to comment
Share on other sites

Great, I made the change and love it. I never got around to doing that on my site. I changed it to #2 so that it would default to green.

L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Link to comment
Share on other sites

I got tired of having to open the customers file by clicking on EDIT when I needed to see the admin notes that I added on that customer. So...

 

I just added the Admin Customer Notes to display in the RIGHT side box where it shows the country, review count and account dates. It works for me and my needs...

 

 

Open admin/customer.php

Search for...

      $search = "where c.customers_lastname like '%" . $keywords . "%' or c.customers_firstname like '%" . $keywords . "%' or c.customers_email_address like '%" . $keywords . "%'";
   }
   $customers_query_raw = "select c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_email_address, a.entry_country_id from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id " . $search . " order by $order";

 

 

Change to...

      $search = "where c.customers_lastname like '%" . $keywords . "%' or c.customers_firstname like '%" . $keywords . "%' or c.customers_email_address like '%" . $keywords . "%'";
   }
// START Admin Notes
   $customers_query_raw = "select c.customers_notes, c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_email_address, a.entry_country_id from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id " . $search . " order by $order";
// END Admin Notes

 

 

Search for...

        $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=confirm') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS, 'cID=' . $cInfo->customers_id) . '">' . tep_image_button('button_orders.gif', IMAGE_ORDERS) . '</a> <a href="' . tep_href_link(FILENAME_MAIL, 'selected_box=tools&customer=' . $cInfo->customers_email_address) . '">' . tep_image_button('button_email.gif', IMAGE_EMAIL) . '</a>');
       $contents[] = array('text' => '<br>' . TEXT_DATE_ACCOUNT_CREATED . ' ' . tep_date_short($cInfo->date_account_created));
       $contents[] = array('text' => '<br>' . TEXT_DATE_ACCOUNT_LAST_MODIFIED . ' ' . tep_date_short($cInfo->date_account_last_modified));
       $contents[] = array('text' => '<br>' . TEXT_INFO_DATE_LAST_LOGON . ' '  . tep_date_short($cInfo->date_last_logon));
       $contents[] = array('text' => '<br>' . TEXT_INFO_NUMBER_OF_LOGONS . ' ' . $cInfo->number_of_logons);
       $contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY . ' ' . $cInfo->countries_name);
       $contents[] = array('text' => '<br>' . TEXT_INFO_NUMBER_OF_REVIEWS . ' ' . $cInfo->number_of_reviews);

 

 

Change to...

// START Admin Notes
       $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=confirm') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS, 'cID=' . $cInfo->customers_id) . '">' . tep_image_button('button_orders.gif', IMAGE_ORDERS) . '</a> <a href="' . tep_href_link(FILENAME_MAIL, 'selected_box=tools&customer=' . $cInfo->customers_email_address) . '">' . tep_image_button('button_email.gif', IMAGE_EMAIL) . '</a>');
       $contents[] = array('text' => '<br>' . TEXT_DATE_ACCOUNT_CREATED . ' ' . tep_date_short($cInfo->date_account_created));
       $contents[] = array('text' => TEXT_DATE_ACCOUNT_LAST_MODIFIED . ' ' . tep_date_short($cInfo->date_account_last_modified));
       $contents[] = array('text' => TEXT_INFO_DATE_LAST_LOGON . ' '  . tep_date_short($cInfo->date_last_logon));
       $contents[] = array('text' => '<br>' . TEXT_INFO_NUMBER_OF_LOGONS . ' ' . $cInfo->number_of_logons);
       $contents[] = array('text' => TEXT_INFO_NUMBER_OF_REVIEWS . ' ' . $cInfo->number_of_reviews);
       $contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY . ' ' . $cInfo->countries_name);
       $contents[] = array('text' => '<hr width="100%" size="1" color="#000000" noshade>');
       $contents[] = array('text' => '<strong>Customer Notes:</strong><br><br>' . $cInfo->customers_notes);
// END Admin Notes

 

 

To see a screenshot, go to http://www.cardhost.com/customer_notes.jpg

L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Link to comment
Share on other sites

I made one more change...

 

If there are no admin customer notes, it prints nothing as the stock code does. If they do have admin customer notes, then it prints the notes like you see in the screenshot above.

 

 

Change this...

// START Admin Notes
      $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=confirm') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS, 'cID=' . $cInfo->customers_id) . '">' . tep_image_button('button_orders.gif', IMAGE_ORDERS) . '</a> <a href="' . tep_href_link(FILENAME_MAIL, 'selected_box=tools&customer=' . $cInfo->customers_email_address) . '">' . tep_image_button('button_email.gif', IMAGE_EMAIL) . '</a>');
      $contents[] = array('text' => '<br>' . TEXT_DATE_ACCOUNT_CREATED . ' ' . tep_date_short($cInfo->date_account_created));
      $contents[] = array('text' => TEXT_DATE_ACCOUNT_LAST_MODIFIED . ' ' . tep_date_short($cInfo->date_account_last_modified));
      $contents[] = array('text' => TEXT_INFO_DATE_LAST_LOGON . ' '  . tep_date_short($cInfo->date_last_logon));
      $contents[] = array('text' => '<br>' . TEXT_INFO_NUMBER_OF_LOGONS . ' ' . $cInfo->number_of_logons);
      $contents[] = array('text' => TEXT_INFO_NUMBER_OF_REVIEWS . ' ' . $cInfo->number_of_reviews);
      $contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY . ' ' . $cInfo->countries_name);
      $contents[] = array('text' => '<hr width="100%" size="1" color="#000000" noshade>');
      $contents[] = array('text' => '<strong>Customer Notes:</strong><br><br>' . $cInfo->customers_notes);
// END Admin Notes

 

 

To this...

// START Admin Notes
       $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=confirm') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS, 'cID=' . $cInfo->customers_id) . '">' . tep_image_button('button_orders.gif', IMAGE_ORDERS) . '</a> <a href="' . tep_href_link(FILENAME_MAIL, 'selected_box=tools&customer=' . $cInfo->customers_email_address) . '">' . tep_image_button('button_email.gif', IMAGE_EMAIL) . '</a>');
       $contents[] = array('text' => '<br>' . TEXT_DATE_ACCOUNT_CREATED . ' ' . tep_date_short($cInfo->date_account_created));
       $contents[] = array('text' => TEXT_DATE_ACCOUNT_LAST_MODIFIED . ' ' . tep_date_short($cInfo->date_account_last_modified));
       $contents[] = array('text' => TEXT_INFO_DATE_LAST_LOGON . ' '  . tep_date_short($cInfo->date_last_logon));
       $contents[] = array('text' => '<br>' . TEXT_INFO_NUMBER_OF_LOGONS . ' ' . $cInfo->number_of_logons);
       $contents[] = array('text' => TEXT_INFO_NUMBER_OF_REVIEWS . ' ' . $cInfo->number_of_reviews);
       $contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY . ' ' . $cInfo->countries_name);
   if (tep_not_null($cInfo->customers_notes)) {
         $contents[] = array('text' => '<hr width="100%" size="1" color="#000000" noshade>');
         $contents[] = array('text' => '<strong>Customer Notes:</strong><br><br>' . $cInfo->customers_notes);
   } else {
   // Print nothing
   }
// END Admin Notes

L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Link to comment
Share on other sites

  • 2 weeks later...

Yes, and I LOVE IT! I even made 2 more pull-down menus just for myself that hooks me right into phpMyAdmin, my catalog, osC Contributions and so many more with sub menus.

 

Here is the MOD info...

 

Name & Version:

Admin DHTML Menus V2.0

 

Contribution:

http://www.oscommerce.com/community/contributions,1140

 

Forum Thread:

http://www.oscommerce.com/forums/index.php?showtopic=77472

 

Comments: This one replaces the Standard navigation bar (left side navigation) with horizontal dhtml menu in admin.

 

----------------------

 

If you want to use DHTML menu together with Multi admin with levels (Contribnr: 2037). You'll need to replace the original: header_navigation.php with this one: http://www.oscommerce.com/community/contributions,1140

L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Link to comment
Share on other sites

I just updated this contribution to version 2.1

 

03/15/2005 by PopTheTop

 

- Added German language files (thanks to Ingo Hoffmann)

 

- Cleaned up some code and fine-tuned it a bit

 

- New easier to follow install file in HTML format

 

- Customer Admin Notes now displayed in the customer info box on the right side of the page in Admin / Customers so that you no longer have to open the Customer Edit screen to read the notes. When you highlight a customer in your Customers List, if they have any Admin Notes, they will be displayed. If there are no notes, then nothing will be displayed.

L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...