$_helper = $this->helper('catalog/output');
$_category = $this->getCurrentCategory();
$cat = Mage::getModel('catalog/category')->load($_category->getId());
$subcats = $cat->getChildren();
$subcat= explode(',',$subcats);
$_columnCount=3;
$_collectionSize = count($subcat);
$catlevel=$_category->getLevel();
// $_category->setDisplayMode('PAGE');
if($subcats!="" && $catlevel<4){>
getImageUrl()):?> " title="getName(); ?>">getImageUrl()?>" width="193" height="129"> " title="getName(); ?>">/skin/frontend/base/default/images/catalog/product/placeholder/small_image.jpg"> $subcats1 = $_subcategory->getChildren(); $subcat1= explode(',',$subcats1); if($subcats1!=""){ foreach($subcat1 as $subCatid1) { $_subcategory1 = Mage::getModel('catalog/category')->load($subCatid1); ?> getURL()?>">getName()?> |
}
else
{ //product display
$cat = Mage::getModel('catalog/category')->load($_category->getId());
$subcats = $cat->getChildren();
$subcat= explode(',',$subcats);
foreach($subcat as $subCatid){
$_subcategory = Mage::getModel('catalog/category')->load($subCatid);
if($_subcategory->getIsActive())
{
//Mage::register('current_category', $_subcategory);
echo '
'. $_subcategory->getName().'
';$collection = $_subcategory->getProductCollection();
$products = Mage::getResourceModel('catalog/product_collection')->addCategoryFilter($_subcategory)->addAttributeToFilter('visibility', 4)->addAttributeToSelect('*');
$products->getSelect()->order(new Zend_Db_Expr('RAND()'))->limit(3);
$products->load();
$_product = null;
////////////////////////////////////////////////
?>
count()): ?>
__('There are no products matching the selection.') ?>
getId()?>);" onmouseover="show_sp_button(getId()?>);" class="depttitle dept_box"> getProductUrl() ?>">productAttribute($_product, $_product->getName(), 'name') ?> getProductUrl() ?>">getPriceHtml($_product, true) ?> getReviewsSummaryHtml($_product, 'short') ?> getId()?>);" onmouseover="show_sp_button(getId()?>);" class="dept_list_sp_div" name="SP_getId()?>" id="SP_getId()?>" style="visibility: hidden;">
|
$script='
////////////////////////////////////////////////
}
}
?>
$script.="";
echo $script;
?>
}
?>
No comments:
Post a Comment