Category description in category listing
14 years 7 months ago #41560
by jansuhr
Jan Suhr
www.colorconsult.se www.jansuhr.se
Category description in category listing was created by jansuhr
In a subcategory listing I would like to include the category description for those subcategories that are displayed in the list.
This is a code snippet from category/listing_list.php
I would like to have the description after the H3 tag.
Can you give me a hint on what code I should copy and paste in there.
Thanks
Jan
This is a code snippet from category/listing_list.php
Code:
<h3 class="hikashop_category_list_item<?php echo $class; ?>" <?php echo $width; ?>>
<a href="<?php echo $link; ?>" >
<?php
echo $row->category_name;
if($this->params->get('number_of_products',0)){
echo ' ('.$row->number_of_products.')';
}
?>
</a>
</h3>
I would like to have the description after the H3 tag.
Can you give me a hint on what code I should copy and paste in there.
Thanks
Jan
Jan Suhr
www.colorconsult.se www.jansuhr.se
Please Log in or Create an account to join the conversation.
14 years 7 months ago #41687
by nicolas
Replied by nicolas on topic Re: Category description in category listing
It's quite simple:
<?php echo $row->category_description; ?>
<?php echo $row->category_description; ?>
Please Log in or Create an account to join the conversation.
14 years 7 months ago #41698
by jansuhr
Jan Suhr
www.colorconsult.se www.jansuhr.se
Replied by jansuhr on topic Re: Category description in category listing
Thanks for the clue, it made me make a custom field called "Short Description" since the main description for my categories in some case are too long for this view.
So my code is instead: <?php echo $row->short_description; ?>
Since this field falls in the "Additional Information" department I now have that line of text (Additional information) on the page under the main category name.
How can I get rid of that? Can't find any reference to it in the listing_list.php
Jan
So my code is instead: <?php echo $row->short_description; ?>
Since this field falls in the "Additional Information" department I now have that line of text (Additional information) on the page under the main category name.
How can I get rid of that? Can't find any reference to it in the listing_list.php
Jan
Jan Suhr
www.colorconsult.se www.jansuhr.se
Please Log in or Create an account to join the conversation.
14 years 7 months ago #41756
by jansuhr
Jan Suhr
www.colorconsult.se www.jansuhr.se
Replied by jansuhr on topic Re: Category description in category listing
I did remove the "Additional Information" with CSS, not so clean solution but it solved my problem.
Jan
Code:
.hikashop_category_custom_info_main {display: none;}
Jan
Jan Suhr
www.colorconsult.se www.jansuhr.se
Please Log in or Create an account to join the conversation.
14 years 7 months ago #41879
by nicolas
Replied by nicolas on topic Re: Category description in category listing
You could turn off the front end display option of the custom field. Then you wouldn't have that "Additional Information" text displayed.
But CSS is fine too.
But CSS is fine too.
Please Log in or Create an account to join the conversation.
Time to create page: 0.154 seconds