News:

Support the VirtueMart project and become a member

Main Menu

Show description in category without products

Started by giofranz, October 19, 2018, 17:04:07 PM

Previous topic - Next topic

giofranz

Hi guys, i'm using vm 3.4.2 on joomla 3.8.13.
My problem is simple, i want to show the category description even when there are no products in it.

For example, i have a main category A that has two child category B1 B2, I would like to have a menu that displays A with the description of A and the image preview of B1 and B2.
If A has products in it, then it shows in order: B1 and B2 images; the A description; and the products of B1 and B2. But when A has no products in it, the menu just shows image preview of B1 and B2.

Have you any idea?

Thank you in advance!

GJC Web Design

totally template dependent

most cat templates have something like

if (!empty($this->showcategory_desc) and empty($this->keyword)){
if(!empty($this->category)) {
?>
<div class="category_description">
<?php echo $this->category->category_description?>
</div>
<?php }
if(!empty($this->manu_descr)) {
?>

        <div class="manufacturer-description">
<?php echo $this->manu_descr?>
        </div>
<?php }
}


play around with the ifs to get what u want
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

giofranz

Thank you GJC Web Design, I'll see what I can get!