I was confused, because product_manufacturer_id is numeric value.
At first create override of file listing_table.php in product view
http://hikashop.com/support/documentation/153-customize-the-display.html#layout
At the start of the file, right after
defined('_JEXEC') or die('Restricted access');
insert this code
if (!function_exists('get_manufacturer')) {
function get_manufacturer ($product)
{
static $manufacturers = array();
if (empty($product->product_manufacturer_id)) {
return false;
}
if (isset($manufacturers[$product->product_manufacturer_id])) {
return $manufacturers[$product->product_manufacturer_id];
}
$catclass = hikashop_get('class.category');
$manufacturer = $catclass->get($product->product_manufacturer_id);
if ($manufacturer->category_published) {
$menuclass = hikashop_get("class.menus");
$manufacturer_itemid = $menuclass->loadAmenuItemId('manufacturer', 'listing');
if (empty($manufacturer_itemid)) {
$manufacturer_itemid = $menuclass->loaddAmenuItemId('', '');
}
$catclass->AddAlias($manufacturer);
$manufacturer->url = hikashop_contentLink('category&task=listing&cid='.$manufacturer->category_id.'&name='
.$manufacturer->alias.'&Itemid='.$manufacturer_itemid, $manufacturer);
$manufacturers[$product->product_manufacturer_id] = $manufacturer;
return $manufacturer;
}
return false;
}
}
On the line cca 81 before
<?php if($this->params->get('show_vote_product')){ ?>
insert this code (header of the table)
<th class="hikashop_product_manufacturer">Artist</th>
On the line cca 200 before
<?php if($this->params->get('show_vote_product')){ ?>
insert this
<?php
$artist = get_manufacturer($row);
echo '<td class="hikashop_product_manufacturer" >';
if ($artist) {
//echo $artist->category_name;
echo '<a href="'.$artist->url.'">'.$artist->category_name.'</a>';
}
echo '</td>'; ?>
It will display link to brand/artist page.
If you want to display only brand name, move // one line down.
Here is
link to modified file
(
changes
).