I'm very new for magento. I hire a company to create my magento website. however, there are some features that i 'd like to improve.
For displaying categories and subcategories in cms page, i found code that some kindly shared to others. But i don't know where or which file in ftp i should paste the code.
now : the page of subcategory shows only its name on left navigator. Expectation : the page shows both parent category and all subcategories, so the customers can link to other subcategories by clicking on side menu.
This is both for products page and other pages, for example, menu "about us" has 2 subcategories : history, our vision. when the user click subcategories "our vision", it will show "about us" , "history", and "our vision" on the left side bar.
I have captured my website as belows: parent category page ------> subcategory page
Thank you in advance.
Code i think it may be work. (in the fact, i would like it to appear only subcategories in current category)
<?php
$_helper = Mage::helper('catalog/category');
$categories = $_helper->getStoreCategories();
foreach ($categories as $_category) {
$category = Mage::getModel('catalog/category')->load($_category->getId());
$subcategories = $category->getChildrenCategories();
?>
<dl>
<dt><?php echo $this->htmlEscape($_category->getName()); ?></dt>
<dd>
<ol>
<?php
foreach ($subcategories as $_subcategory) {
echo '<li><a href="' . $_subcategory->getURL() . '">' . $_subcategory->getName() . '</a></li>';
}
?>
</ol>
</dd>
</dl>
<?php
}
?>