How can i get category description after product list in product listing page?
4 Answers
The category description is already displayed in the category view page.
You just need to move elements around.
The template you need to modify is this:
app/design/frontend/{package}/{theme}/template/catalog/category/view.phtml
.
take this code:
<?php if($_description=$this->getCurrentCategory()->getDescription()): ?>
<div class="category-description std">
<?php echo $_helper->categoryAttribute($_category, $_description, 'description') ?>
</div>
<?php endif; ?>
and move it at the bottom of the file. That's it.
hi you can description of category at any position of product by using registry variable
if(Mage::registry('current_category')){
<?php
$_helper=Mage::helper('catalog/output');
$_category = Mage::registry('current_category');
if($_description=(Mage::registry('current_category')->getDescription()): ?>
<div class="category-description std">
<?php echo $_helper->categoryAttribute($_category, $_description, 'description') ?>
</div>
<?php endif; ?>
}
You can use this code in your app/design/frontend/YOURTHEME/default/template/catalog/product/list.phtml
at the bottom
echo Mage::getModel('catalog/layer')->getCurrentCategory()->getDescription();
What do you expect exactly...Please be clear in your question.
Go to admin system->configuration->developer and change currentcofigurationscopre option and then in Debug tag Template Path Hints
,Add Block Names to Hints' to
yes` and save it.
Then see the block and template location of your layout and do what ever you want in the file.(by this way you can find the file location)
-
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. Commented Oct 16, 2014 at 13:27
-
I am just putting the comment to find location of the template file then he can change or add he needs. Commented Oct 16, 2014 at 13:38
this did not work for magento 1.9 when you put the code at the bottom of the page at base/default/template/category/vieuw.html and your theme/theme/category/vieuw.html than it stil shows up on your page so does anybody have the good clear solution??
behalf of BG media