<?php
$brandCollection = $this->getBrandCollection();
$data = $this->helper('Rokanthemes\Brand\Helper\Data');
$show_brand_text = $data->getConfig("product_view_page/show_brand_text");
$brand_text = $data->getConfig("product_view_page/brand_text");
$brand_text = $brand_text?$brand_text:__('Brands: ');
$show_brand_image = $data->getConfig("product_view_page/show_brand_image");
$show_brand_name = $data->getConfig("product_view_page/show_brand_name");
?>
<?php if($brandCollection && $brandCollection->count()){ ?>
	<div class="product-page-brand-common-view">
	<?php
	$i = 0;
	$total = $brandCollection->count();
	if($show_brand_text){
		echo '<span class="brand-label">'.$brand_text.' </span>';
	}
	?>
	<?php 
		echo '<ul class="product-brands">';
		foreach ($brandCollection as $_brand) {
			?>
			<li class="brand-item">
				<?php if($show_brand_image): ?>
				<a href="<?php echo $_brand->getUrl(); ?>" title="<?php echo $_brand->getName(); ?>">
				<img src="<?php echo $_brand->getThumbnailUrl(); ?>" alt="<?php echo $_brand->getName(); ?>"/></a>
				<?php endif; ?>
				<?php if($show_brand_name): ?>
				<a href="<?php echo $_brand->getUrl(); ?>" title="<?php echo $_brand->getName(); ?>"><?php echo $_brand->getName(); ?></a>
				<?php endif; ?>
			</li>
			<?php
		}
		echo '</ul>';
	?>
	</div>
<?php } ?>