Hi
I`m sure this is an easy fix, but I cant seem to find it.
I have several categories which do not have products in them - but I would like the category description to load when the category is selected.
right now if i click on a category which has no products from the categories browse page the category page url loads, but there is no description for the category.
As soon as I add a product the description loads.
Any help getting the description to load without active products would be greatly appreciated.
standard template?
try removing the
if(!empty($this->category)) {
line 56 components\com_virtuemart\views\category\tmpl\default.php
- Make a template override for com_virtuemart (never edit core files as you will loose any changes on next update)
- Edit .../htdocs/templates/[yourtemplate]/html/com_virtuemart/category/default.php
- Look for if (!empty($this->products)) around line 167
- Look for the corresponding line } elseif ($this->keyword !== false) { around line 182
- Before or after the following line echo vmText::_ ('COM_VIRTUEMART_NO_RESULT') . ($this->keyword ? ' : (' . $this->keyword . ')' : '');
add
echo '<div class"category-description no-products">' . $this->category->category_description . '</div>';
(Use $this->category->category_name if you want that too)
- In your template's CSS file use .category-description.no-products { [your css declarations] } if required
thank you!!!