I tried getting the brand name to display on the Product Contact page (product / contact.php) by using the codes below and others, but have no luck. Why does none of these work?
<?php
if($this->config->get('manufacturer_display', 0) && !empty($this->element->product_manufacturer_id)){
$class = hikashop_get('class.category');
$manufacturer = $class->get($this->element->product_manufacturer_id, true);
global $Itemid;
$categoryClass = hikashop_get('class.category');
$categoryClass->addAlias($manufacturer);
echo $this->image->display($manufacturer->file_path,false,$manufacturer->file_name, '', '', $this->image->main_thumbnail_x, $this->image->main_thumbnail_y);
}
?>
<?php
$db = JFactory::getDBO();
$db->setQuery('SELECT category_name FROM '.hikashop_table('category').' WHERE category_id='.(int)$this->row->product_manufacturer_id);
$brandName = $db->loadResult();
echo $brandName;
}
?>
<p class="hikashop_cart_brand_name">
<?php $class = hikashop_get('class.category');
$manufacturer = $class->get($product->product_manufacturer_id);
echo $manufacturer->category_name; ?>
</p>
Thanks!