Community Add-Ons
| Maintainers: | tabsl |
Customer Notes (Anmerkungen zu Kunden)
for osCommerce Online Merchant v2.2
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
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.
