Product compare: Brand / manufacturer

  • Posts: 3
  • Thank you received: 0
  • Hikashop Business
8 months 1 week ago #359805

-- HikaShop version -- : 5.0.3
-- Joomla version -- : 5.0.3
-- PHP version -- : 8

Is it possible to show the brand / manufacturer in product compare?

Please Log in or Create an account to join the conversation.

  • Posts: 82823
  • Thank you received: 13370
  • MODERATOR
8 months 1 week ago #359809

Hi,

There is no option for that.
However, it's possible if you customize the product / compare view file via the menu Display>Views.
The code should be fairly simple:

<!-- BRAND -->
	<tr id="hikashop_compare_tr_brand">
		<td class="hikashop_compare_brand_first_column"><?php echo JText::_('MANUFACTURER'); ?></td>
<?php
$categoryClass = hikashop_get('class.category');
foreach($this->elements as $element) {
?>
		<td class="hikashop_compare_brand_prod_column">
<?php
	if(!empty($element->product_manufacturer_id)) {
		$brand = $categoryClass->get($element->product_manufacturer_id);
		echo $brand->category_name;
	}
?>
		</td>
<?php
}
?>
		</td>
	</tr>
<!-- EO BRAND -->

Please Log in or Create an account to join the conversation.

Time to create page: 0.054 seconds
Powered by Kunena Forum