尝试以下代码以显示特定类别的产品 -
$_category = Mage::getModel('catalog/category')->load($catId);
$_productCollection =Mage::getResourceModel('catalog/product_collection')->addCategoryFilter($_category)->setOrder('updated_at', 'DESC');
foreach ($_productCollection AS $_product)
{
$cur_product = Mage::getModel('catalog/product')->load($_product->getId());
echo '<li><span>» </span><a href="'.$cur_product->getUrl_key().'" title="'.$cur_product->getExtName().'"> '.$cur_product->getExtName().'</a></li>';
}
$catId - 你需要在这里传递类别 ID