VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: saviB on June 08, 2015, 21:15:12 PM

Title: Virtuemart Category Menu Module
Post by: saviB on June 08, 2015, 21:15:12 PM
Joomla! 3.3.6
VirtueMart 3.0.9

Using VirtueMart Category module. Top level categories have the category title and a down arrow on the right side. The down arrow slides open the children. The category title loads the category view. I'd like the down arrow accordion action to be called from the category title - eliminating the loading of the category view on title click.

Can someone point out the necessary code change? I assume it needs to take place in Assuming an override of mod_virtuemart_category/default.php - I just don't know which part to change.

Thanks -
Title: Re: Virtuemart Category Menu Module
Post by: GJC Web Design on June 08, 2015, 23:42:36 PM
something like

jQuery(document).ready(function() {
      jQuery('#VMmenu".$ID." li.VmClose ul').hide();
      jQuery('#VMmenu".$ID." li a').click(
      function(e) {

         if (jQuery(this).parent().next('ul').is(':hidden')) {
            jQuery('#VMmenu".$ID." ul:visible').delay(500).slideUp(500,'linear').parents('li').addClass('VmClose').removeClass('VmOpen');
            jQuery(this).parent().next('ul').slideDown(500,'linear');
            jQuery(this).parents('li').addClass('VmOpen').removeClass('VmClose');
                                 e.preventDefault();
         }
      });
   });

might work  ...
Title: Re: Virtuemart Category Menu Module
Post by: balai on June 09, 2015, 13:14:54 PM
Take a look also in Custom Filters
http://breakdesigns.net/extensions/custom-filters

It's in the free version