Community Add-Ons
| Maintainers: | jsruok |
Search Orders by Customer Info
for osCommerce Online Merchant v2.2
In original osC orders can be "searched" by their ID's only. This very simple mod makes it possible to search and list orders in admin/orders.php according to customer's name or company. If order id is used as a search term, that order is then shown in more detail (which is the original behaviour).
Attached is a text file with below info. For those who have added mods to their admin/orders.php, the sql update should go after "else", which is on line 361 in original osC 2.2. See below ( ... = some omitted code):
<?php
if (isset($HTTP_GET_VARS['cID'])) { ...
$orders_query_raw = "select ... ot.class = 'ot_total' order by orders_id DESC";
} elseif (isset($HTTP_GET_VARS['status']) && is_numeric($HTTP_GET_VARS['status']) && ($HTTP_GET_VARS['status'] > 0)) { ...
$orders_query_raw = "select ... 'ot_total' order by o.orders_id DESC";
} else { ...
$orders_query_raw = "select ... 'ot_total' " . (!is_null($search_query)?$search_query:''). " order by o.orders_id DESC";
}
