Contributions
Customer Notes (Anmerkungen zu Kunden)
Diese Contrib erlaubt es, zu einem Kunden meherere Anmerkungen zu speichern.
Die ist z. B. sinnvoll, wenn dieser ein Spaßbesteller ist oder etc.
Support-Thread: http://forums.oscommerce.de/index.php?showtopic=49480
Expand All / Collapse All
Full package with a minor change still to be done on orders.php. Only one text file explaining the changes on this file has been updated. Rest of the contribution remains the same.
If you also want to show the customers comments in the customer info-box on the right side of the page in Admin/Customers and Admin/Orders, you have to do the following:
Open catalog/admin/customers.php
On line 794 find:
$contents[] = array('text' => '<br>' . TEXT_INFO_NUMBER_OF_REVIEWS . ' ' . $cInfo->number_of_reviews);
add below:
$ias_notes["result"] = tep_db_query("SELECT * FROM customers_notes WHERE customers_id = ". $cInfo->customers_id);
if(!tep_db_num_rows($ias_notes["result"])) {
} else {
while($ias_notes["row"] = tep_db_fetch_array($ias_notes["result"])){
$contents[] = array('text' => '<hr width="100%" size="1" color="#000000" noshade>');
$contents[] = array('text' => '<strong>Customer Comments:</strong><br><br>' . $ias_notes["row"]["customers_notes_message"]);
}
}
Open catalog/admin/orders.php
On line 415 find:
$contents[] = array('text' => '<br>' . TEXT_INFO_PAYMENT_METHOD . ' ' . $oInfo->payment_method);
add below:
$ias_notes["result"] = tep_db_query("SELECT * FROM customers_notes WHERE customers_id = ". $oInfo->customers_id);
if(!tep_db_num_rows($ias_notes["result"])) {
} else {
while($ias_notes["row"] = tep_db_fetch_array($ias_notes["result"])){
$contents[] = array('text' => '<hr width="100%" size="1" color="#000000" noshade>');
$contents[] = array('text' => '<strong>Customer Comments:</strong><br><br>' . $ias_notes["row"]["customers_notes_message"]);
}
}
Thats it! Now, customers comments will be displayed in the customer info-box on the right side of the page in Admin/Customers and Admin/Orders, so that you no longer have to open the Customer Edit screen to read the notes. When you highlight a customer/order in your Customers/Orders List, if they have any customers comments saved, those notes will be displayed. If there are no saved notes, then nothing will be displayed.
All credit goes to the author of the contribution.
This is a full package, contains all files from v2.1 plus text file with the installation above.
If you want to highlight the customers name in red also in the orders overview,
in all orders made by a customer with comments, you have to do the following:
Open catalog/admin/orders.php
On line 376 change:
<td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $orders['orders_id'] . '&action=edit') . '">' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a> ' . $orders['customers_name']; ?></td>
to the following:
### begin customer notes by tabsl v2.1|2008 ###
<td class="dataTableContent"><?php if($ias_notes_marker == true) echo "<font color='red'>"; ?><?php echo '<a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $orders['orders_id'] . '&action=edit') . '">' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a> ' . $orders['customers_name']; ?><?php if($ias_notes_marker == true) echo "</font>"; ?></td>
### end customer notes by tabsl v2.1|2008 ###
On line 375 change:
?>
to the following:
### begin customer notes ###
$ias_notes_marker = false;
$ias_notes_mark = tep_db_query("SELECT customers_notes_id FROM customers_notes WHERE customers_id = ".$orders['customers_id']);
if(tep_db_num_rows($ias_notes_mark)) $ias_notes_marker = true;
### end customer notes ###
?>
Thats it, now all orders made by a customer with comments will highlight the customers name in red.
All credit goes to the author of the contribution.
This is a full package, contains all files from v2.0 plus text file with the installation above.
This contribution allows you to save notes for each customer, then highlights the customer name in red.
I updated some code; works great on PHP5/MySQL5. All credit goes to the original contributors.
Please start a support thread if you have questions or problems.
Other than the word translations from German into English, no other mods or changes were made to the original contrib.
Diese Contrib erlaubt es, zu einem Kunden meherere Anmerkungen zu speichern.
Die ist z. B. sinnvoll, wenn dieser ein Spaßbesteller ist oder etc.
Support-Thread: http://forums.oscommerce.de/index.php?showtopic=49480
Note: Contributions are used at own risk.