cancel
Showing results for 
Search instead for 
Did you mean: 

related Items hide tab when no related products

related Items hide tab when no related products

Hello,

 

On the product page someone has created a set of tabs for product description, delivery and other related information to the product, on this part of the code , I'd like to hide the related products tab when there are no related products can anyone help me? 

<li><a href="#tab3"><?php echo $this->__('Related Products') ?></a></li>

Full tabs abs Code:

<ul class="nav nav-tabs hidden-phone" id="myTab">
            <li class="active"><a href="#tab1"><?php echo $this->__('Description') ?></a></li>
            <li><a href="#tab2"><?php echo $this->__('Delivery Information') ?></a></li>
			<li><a href="#tab3"><?php echo $this->__('Related Products') ?></a></li> 
			<li class="pull-right"><a href="#tab4" style="background-color:#90bd54;color:#fff;"><?php echo $this->__('Quantity Calculator') ?></a></li>
            <?php if(!$modules_enable['Mage_Review']):?>
			<li><a href="#tab5"><?php echo $this->__('Reviews') ?></a></li>
		<?php endif;?>   
			<li><a href="#tab6"><?php echo $this->__('3 Day Forecast') ?></a></li>		
            <?php if ($_customtab && Mage::getStoreConfig('buyshoplayout/product_info/custom_tab')): ?>
            <li><a href="#tab7"><?php if(!empty($_customtabtitle)) echo html_entity_decode($this->helper('catalog/output')->productAttribute($this->getProduct(), $_customtabtitle, 'customtabtitle'));else echo 'Custom tab title' ?></a></li>
            <?php endif;?>
        </ul>

Regards

 

Mal

Tags (2)