<?php
$currentCatIds = $_product->getCategoryIds();
$categoryCollection = Mage::getResourceModel('catalog/category_collection')
->addAttributeToSelect('name')
->addAttributeToSelect('url')
->addAttributeToFilter('entity_id', $currentCatIds)
->addIsActiveFilter();
?>
<div class="other-category" style="display:none;">
<span class="text-title">Other areas:</span>
<ul class="cate-brad">
<?php $count = sizeof($categoryCollection);
$i = 1;
foreach($categoryCollection as $cat){?>
<li><a href="<?php echo $cat->getUrl(); ?>"><?php echo $cat->getName(); ?></a></li>
<?php if($count==$i){}else{?>
<span class="diveder">|</span>
<?php } $i++; } ?>
</ul>
</div>
=========================================================================
<?php $_helper = $this->helper('catalog/output'); ?>
<?php $_product = $this->getProduct(); ?>
<?php
$currentCatIds = $_product->getCategoryIds();
$categoryCollection = Mage::getResourceModel('catalog/category_collection')
->addAttributeToSelect('name')
->addAttributeToSelect('url')
->addAttributeToFilter('entity_id', $currentCatIds)
->addIsActiveFilter();
?>
<div class="other-category" style="display:none;">
<span class="text-title">Other areas:</span>
<ul class="cate-brad">
<?php $count = sizeof($categoryCollection);
$i = 1;
foreach($categoryCollection as $cat){?>
<li><a href="<?php echo $cat->getUrl(); ?>"><?php echo $cat->getName(); ?></a></li>
<?php if($count==$i){}else{?>
<span class="diveder">|</span>
<?php } $i++; } ?>
</ul>
</div>
$currentCatIds = $_product->getCategoryIds();
$categoryCollection = Mage::getResourceModel('catalog/category_collection')
->addAttributeToSelect('name')
->addAttributeToSelect('url')
->addAttributeToFilter('entity_id', $currentCatIds)
->addIsActiveFilter();
?>
<div class="other-category" style="display:none;">
<span class="text-title">Other areas:</span>
<ul class="cate-brad">
<?php $count = sizeof($categoryCollection);
$i = 1;
foreach($categoryCollection as $cat){?>
<li><a href="<?php echo $cat->getUrl(); ?>"><?php echo $cat->getName(); ?></a></li>
<?php if($count==$i){}else{?>
<span class="diveder">|</span>
<?php } $i++; } ?>
</ul>
</div>
=========================================================================
<?php $_helper = $this->helper('catalog/output'); ?>
<?php $_product = $this->getProduct(); ?>
<?php
$currentCatIds = $_product->getCategoryIds();
$categoryCollection = Mage::getResourceModel('catalog/category_collection')
->addAttributeToSelect('name')
->addAttributeToSelect('url')
->addAttributeToFilter('entity_id', $currentCatIds)
->addIsActiveFilter();
?>
<div class="other-category" style="display:none;">
<span class="text-title">Other areas:</span>
<ul class="cate-brad">
<?php $count = sizeof($categoryCollection);
$i = 1;
foreach($categoryCollection as $cat){?>
<li><a href="<?php echo $cat->getUrl(); ?>"><?php echo $cat->getName(); ?></a></li>
<?php if($count==$i){}else{?>
<span class="diveder">|</span>
<?php } $i++; } ?>
</ul>
</div>
No comments:
Post a Comment