Author Topic: sub-categories possible?  (Read 2193 times)

stevennestler

  • Beginner
  • *
  • Posts: 19
sub-categories possible?
« on: November 18, 2011, 13:49:57 pm »
Is it possible to have sub-categories?
Thanks,
Steven

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10412
  • VirtueMart Version: 3+
Re: sub-categories possible?
« Reply #1 on: November 18, 2011, 14:18:55 pm »
ofcourse
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

rooney

  • Guest
Re: sub-categories possible?
« Reply #2 on: December 30, 2011, 09:43:42 am »
How to get more levels of sub-categories??
By default we get only 2 category levels in VM2.
I m using Joomla!1.7.3 and VM2.

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27798
  • Always on vacation
    • Jenkin Hill Internet
Re: sub-categories possible?
« Reply #3 on: December 30, 2011, 10:56:12 am »
When entering your new category under Details / Category Ordering  select the second (third or fourth) category below which the new one should sit.
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM 3.8.4.10335 on Joomla 3.9.19 PHP 7.3.18

rooney

  • Guest
Re: sub-categories possible?
« Reply #4 on: December 30, 2011, 11:38:55 am »
Ya i have inserted all the categories and sub-categories.
I have the 3rd level sub-categories but cant see it. :(
I am using "mod_virtuemart_category" module which was included in VM all in one installer and code for default.php is shown below:
Quote
<?php foreach ($categories as $category) {
   $active_menu = '';
   $caturl = JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id='.$category->virtuemart_category_id);
   $cattext = $category->category_name;
   //if ($active_category_id == $category->virtuemart_category_id) $active_menu = 'class="active"';
   if (in_array( $category->virtuemart_category_id, $parentCategories)) $active_menu = 'class="active"'; ?>
   <li <?php echo $active_menu ?>>
      <?php echo JHTML::link($caturl, $cattext); ?>
      <?php if ($category->childs ) { ?>
      <ul class="menu<?php echo $class_sfx; ?>">
         <?php
         foreach ($category->childs as $child) {
            $caturl = JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id='.$child->virtuemart_category_id);
            $cattext = $child->category_name; ?>
            <li>
               <?php echo JHTML::link($caturl, $cattext); ?>
            </li>
         <?php } ?>
      </ul>
   <?php } ?>
   </li>
<?php } ?>