2017-12-04 6 views
0

こんにちは私はこの2つの列のドロップダウンだけを1つの列にしようとしています。私はこれを行うためにコードを修正する方法を特定できません。これはオープンカート用のカスタムです。単一の列2列のドロップダウンの代わりにドロップダウン

public function drawMenuItem($children, $level = 0, $columChunk = 0, $lang_id = 1,$setting) { 
     $lang_id = (int)$this->config->get('config_language_id'); 
     $this->load->model('catalog/category'); 

     $html = '<div class="itemMenu level' . $level . '">'; 

     $countChildren = 0; 
     $ClassNoChildren = ''; 

     foreach ($children as $child) { 
      $activeChildCat = $this->model_catalog_category->getCategories($child['category_id']);  
      $activeChildCat = $this->getCategoryByLevelMax($activeChildCat,$setting); 
      if ($activeChildCat) { 
       $countChildren++; 
      } 
     } 
     if ($countChildren == 0 && $columChunk == 1) { 
      $ClassNoChildren = ' nochild'; 
     } 

     foreach ($children as $child) { 
      $info = $this->model_catalog_category->getCategory($child['category_id']); 
      $level = (int) $this->getCategoryLevelByCateId($child['category_id']); 
      $active = ''; 
      //$currentCate = $this->getCurrentCategoriesId($lang_id); 
      $cate_id = (int) $child['category_id']; 
      // if (in_array($cate_id, $currentCate)) { 
       if ($this->haveCateChildren($cate_id, $lang_id)) { 
        $active = ' actParent'; 
       } else { 
        $active = ' act'; 
       } 
      //} 
      // --- format category name --- 
      $name = strip_tags($child['name']); 
      if (count($child) > 0) { 
       $parameters = null; 
       $link = $this->url->link('product/category', "path=".$child['category_id']); 

       $html.= '<a class="itemMenuName level' . $level . $active . $ClassNoChildren . '" href="' . $link . '"><span>' . $name .'</span></a>'; 

       if($setting['hlevel'] > 2 && $level <= $setting['hlevel']) { 
        $activeChildren = $this->model_catalog_category->getCategories($child['category_id']);  
        $activeChildren = $this->getCategoryByLevelMax($activeChildren,$setting); 
        if (count($activeChildren) > 0) { 
         $html.= '<div class="itemSubMenu level' . $level . '">'; 
         //$html.= $this->drawMenuItem($activeChildren, $level + 1); 
         $html.= $this->drawMenuItem($activeChildren, $level ,$columChunk, $lang_id,$setting); 
         $html.= '</div>'; 
        } 
       } 

      } 
     } 
     $html.= '</div>'; 
     return $html; 
    } 
+0

これは表示されているページへのリンクがありますか? –

+0

http://dev.glutenfreepizzelles.com –

答えて

0

列は、隣り合わせに表示されるCSSで左に浮動表示されます(浮動小数点:左;)。

「float:left;」を削除すると、 75行目のcustommenu.cssに、あなたが望むように表示されます。

enter image description here

関連する問題