-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.5.1
-- PHP version -- : 5.5.34
I would like to add the Customer's company name to the Orders view, either by:
- Adding it above the customer name in the customer column
- Or adding the company name as a separate column
Whichever is easier. I tried adding the company name above the customer name (see 1st screenshot)by going to order > listing.php 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>
Using the custom field parameter
address_company (see 2nd screenshot) but I don't think I had the correct syntax. Also I don't know if this would make the column sortable by the company name.
If that's too complicated to do, how can I override the layout for
order/listing.php to simply include a separate column for the company name? Is there a similar example I can refer to (I've searched but haven't found one yet) and is address_company the correct parameter to call?
Thank you for your assistance!