javascript - Vertical menu magento site -


i want ask can do? problem following. site made on magento platform. when go main menu , open 1 tab menu, left sidebar menu opened "modern" category -> /accordion sumb menus/. want according menu not loading automatically, mechanically when click +.

i made changes js file on theme, no result:

function accordionprocess() { var $ = jquery; var accordionlist = $('.accordion-format'); var plusicon = '+'; var minusicon = '&ndash;';  var etopener = '<div class="open-this">' + plusicon + '</div>'; accordionlist.find('li:has(ul)',this).each(function() {     $(this).find('>a').prepend(etopener); }); if (jquery('.active-parent').length > 0) {     jquery('.active-parent').find('>a .open-this').html(minusicon).closest('.active-parent').addclass('opened').find('>ul.children').show(); } else {     if(!accordionlist.hasclass('home-sidebar-accordion'))         accordionlist.find('>li').first().find('> .open-this').html(minusicon).closest('li').addclass('opened').find('>ul.children').show(); }  accordionlist.find('.open-this').click(function(event){     event.preventdefault();     if ($(this).closest('li').hasclass('opened')) {         $(this).html(plusicon).closest('li').removeclass('opened').find('>ul').slideup(200);     }else{         $(this).closest('li').parent().find('>li.opened>a>.open-this').html(plusicon);         $(this).closest('li').parent().find('>li.opened').removeclass('opened').find('>ul').slideup(200);         $(this).html(minusicon).closest('li').addclass('opened').find('>ul').slidedown(200);     } }); 

i tried make change on html code navigation menu ->category_list _nav.phtml, unable stop automatic loading of first category - "modern". advise me, how can stopped automatic loading on category "modern" vertical accord menu. i'm asking help! Тhanks! site address:http://designcorner.bg/

<div class="block block-main-categories"> <div class="block-title">     <strong><?php echo $this->__('categories') ?></strong> </div> <div class="block-content">     <?php     $storeid = mage::app()->getstore()->getid();     //get category model     $_category = mage::getmodel('catalog/category')->setstoreid($storeid);     $_cat = $_category->load(mage::app()->getstore()->getrootcategoryid());     ?>      <?php     if(!function_exists('haschildrencategory')){         function haschildrencategory($_cat){             $storeid    = mage::app()->getstore()->getid();             $return_val = false;             if($_cat->haschildren()){                 $_children = $_cat->getchildren();                 $children_ids = explode(",", $_children);                 foreach ($children_ids $child_id){                     $_child = mage::getmodel('catalog/category')->setstoreid($storeid)->load($child_id);                     if($_child->getincludeinmenu()){                         $return_val = true;                     }                 }             }             return $return_val;         }     }     if(!function_exists('cmpcategoryposition')){         function cmpcategoryposition($a, $b) {             if ($a->position == $b->position)                 return 0;             return ($a->position > $b->position) ? 1 : -1;         }     }     if(!function_exists('showcategories')){         function showcategories($_category, $level, $level_limit){             $storeid = mage::app()->getstore()->getid();             $currentid = mage::registry('current_category')->getid();             $html = '';             if($level == 0){                 $html .= '';             } else {                 $html .= '<ul class="children level-'.$level.'">';             }             $_children = $_category->getchildren();             $children_ids = explode(",", $_children);             $categorychildren = array();             if ($children_ids) {                 foreach ($children_ids $categoryid){                     $category = mage::getmodel('catalog/category')->load($categoryid);                     $categorychildren[] = $category;                 }             }              usort($categorychildren, 'cmpcategoryposition');             $numitems = count($categorychildren);             $i = 0;             foreach ($categorychildren $_child){                 if($_child->getincludeinmenu()){                     $class = '';                     if ($currentid == $_child->getid()) {                         $class = 'active-item';                     }                     if ($i === 0) {                         $class .= ' first';                     }                     if (++$i === $numitems) {                         $class .= ' last';                     }                     $html .= '<li class="accord-item '.$class.'">';                     $html .= '<a href ="'.$_child->geturl().'">';                     $html .= $_child->getname();                     $html .= '</a>';                     if( haschildrencategory($_child) && $level < $level_limit ){                         $html .= showcategories($_child, $level+1, $level_limit);                     }                     $html .= '</li>';                 }             }             if($level == 0){                 $html .= '';             } else {                 $html .= '</ul>';             }             return $html;         }     }     ?>     <ul class="product-categories accordion-format">         <?php         echo showcategories($_cat, 0, 5);         ?>     </ul> </div> 

enter image description here

[enter image description here][1] 


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -