Hi,
Would anyone know how to make a modification that would allow me to make a search for any orders placed by a particular User Group? I have read this thread, which has a similar modification [url]http://forum.cs-cart.com/showthread.php?t=14597[/url]. This is the code that was suggested to display orders by ‘Shipping Method’ :
Open the “controllers/admin/orders.php” file and find the following code:
PHP Code:
elseif ($mode == ‘manage’) {
list($orders, $search, $totals) = fn_get_orders($params, Registry::get(‘settings.Appearance.admin_orders_per_page’), true);
add this code below:
PHP Code:
if (!empty($orders)){
foreach ($orders as $k => $v) {
$order_info = fn_get_order_info($v[‘order_id’]);
$o_id = $v[‘order_id’];
if (!empty($order_info)){
foreach ($order_info as $a => $b){
if ($a==‘shipping’){
foreach ($b as $ship => $shipping){
$ship_order[] = array (
‘o_id’ => $o_id,
‘shipping’ => $shipping[‘shipping’],
‘carrier’ => (isset($shipping[‘carrier’])? $shipping[‘carrier’] : “No carrier”)
);
}
}
}
}
}
if (isset($ship_order)){
$view->assign(‘ship_order’, $ship_order);
}
}
Open the “skins/basic/admin/views/orders/manage.tpl” file.
Find the following code:
PHP Code:
#{$o.order_id}
and add the following code below, you can change it to appear how you like:
PHP Code:
{foreach from=$ship_order item="ship"}
{if $ship.o_id eq $o.order_id}
{if $ship.shipping}
{$lang.shipping}:{$ship.shipping}
{/if}
{if $ship.carrier }
{$lang.carrier}:{$ship.carrier}
{/if}
{/if}
{/foreach}
Any help would be much appreciated.
Thanks
Mike