I have a similar goal in the Orders view: I would like to add the Customer's company name above the customer name (see 1st screenshot) , and have the column sortable by the Company name (or by customer name if the there is no company name). Looking at order > listing.php, it seems I would need top add the company name somewhere around line 140:
<td class="hikashop_order_customer_value">
ECHO COMPANY NAME HERE?
<?php
echo $row->hikashop_name;
if(!empty($row->username)){
echo ' ( '.$row->username.' )';
}
echo '<br/>';
if(!empty($row->user_id)){
$url = hikashop_completeLink('user&task=edit&cid[]='.$row->user_id);
$config =& hikashop_config();
if(hikashop_isAllowed($config->get('acl_user_manage','all'))) echo $row->user_email.'<a href="'.$url.$target.'"><img src="'.HIKASHOP_IMAGES.'edit.png" alt="edit"/></a>';
}elseif(!empty($row->user_email)){
echo $row->user_email;
}
?>
</td>
I tried adding a line for the custom field parameter
address_company (see 2nd screenshot) but nothing appeared.
If that's too difficult, how can I override the layout for order/listing.php to simply include a separate column for the company name. That is, can you say what the correct parameter/syntax is for for this value?