Guest Posted February 2, 2003 Share Posted February 2, 2003 I need an extra comments box in the admin section of my catalog that will only be seen by admin personell, is there a mod out there already? The reason for this is, I would like to have various employees entering comments about what they are doing to handle a particular order without it being echoed in the e-mail invoices or status seen by the customer. I have searched the contribs section and features, but have found nothing close. thaks in advance for any help :shock: Link to comment Share on other sites More sharing options...
Christian Lescuyer Posted February 2, 2003 Share Posted February 2, 2003 This would not be too difficult to add: - add an admin_comments field to orders table. - modify admin/orders.php to display the field. This last point needs to be done carefully, but it's easy: 1) Search for all occurences of 'comments' in the file. 2) Add a similar line for admin comments. Thus $comments = tep_db_prepare_input($HTTP_POST_VARS['comments']); becomes: $comments = tep_db_prepare_input($HTTP_POST_VARS['comments']); $admin_comments = tep_db_prepare_input($HTTP_POST_VARS['admin_comments']); Christian Lescuyer Link to comment Share on other sites More sharing options...
Guest Posted February 2, 2003 Share Posted February 2, 2003 Thank you for the prompt reply and the code as well, I have not tried it yet but I will try by the end of the day. This was a specific request by a client and we have a go-live in less than three weeks and I am sure there will be a lot of "oh by the way we would like this", Your help is greatly appriciated. :D Link to comment Share on other sites More sharing options...
Guest Posted February 2, 2003 Share Posted February 2, 2003 I have performed all mods that you mentioned, I now have an extra comments box that does not show comments entered by admin personnell to the customer, however; it does not show the comments in the admin section either. I looked into the new database field and it is adding the data there but on the admin side, the comments enteredinto the new text area dissapear as soon as you hit the update button. Any Ideas? Thanks again, Dale :? Link to comment Share on other sites More sharing options...
Christian Lescuyer Posted February 2, 2003 Share Posted February 2, 2003 Is that on the same page? I mean orders.php? Christian Lescuyer Link to comment Share on other sites More sharing options...
Guest Posted February 3, 2003 Share Posted February 3, 2003 Yes, all modifications were done to the admin/orders.php page. for some reason I am unable to figure out why it doesnt echo the comments inside my new comments box. Here are the lines that I have duplicated and changed "comments" "to admin_comments" . $admin_comments = tep_db_prepare_input($HTTP_POST_VARS['admin_comments']); /////// if (tep_not_null($admin_comments)) { tep_db_query("update " . TABLE_ORDERS . " set admin_comments = '" . tep_db_input($admin_comments) . "' where orders_id = '" . tep_db_input($oID) . "'"); $order_updated = true; ////// <tr> <td class="main"><br><b><?php echo TABLE_HEADING_COMMENTS; ?></b></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '5'); ?></td> </tr> <tr><?php echo tep_draw_form('status', FILENAME_ORDERS, tep_get_all_get_params(array('action')) . 'action=update_order'); ?> <td class="main"><?php echo tep_draw_textarea_field('admin_comments', 'soft', '60', '5', $order->info['admin_comments']); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> Have I missed something here or somewhere else? an interesting part of this is if I replace this last admin_comments statement with comments, then I get the standard comments duplicated in my new box. my guess is that it may have something to do with the "tep_get_all_get_params(array('action')) But I am afraid this part is beyond my ability. Thanks for any help you can give me. Dale :oops: Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.