seoseo
tr-opencart

     
avatar Şuanki Zaman: 12-10-2016, 04:05 AMHoşgeldin Misafir !
  Şifremi Hatırlat   kayıt ol
opencart temaları

accordion kategori modifikasyonu

Konuyu görüntüleyenler: 1 Misafir
 
Değerlendir:
  • 0 Oy - 0 Yüzde
  • 1
  • 2
  • 3
  • 4
  • 5
%
Cevapla  Gönder 
v  v
Yazar  eno-7 - Görüntüleme - Okunma  729 - Yorum  2

eno-7v
Çırak
****
Üye user avatar
Çevrimdışı

Mesajlar: 292
Konular: 148
Katılma Tarihi: Nov 2012
Rep Puanı: 0
Teşekkürler: 14
10 Mesajına, 14 Teşekkür edildi.



Kişisel Bilgileri: v
Konu Tarihi: 11-07-2014 12:32 AM
arkadaşlar merhana aşağıdaki linkten indirdiğim accordion menüyü kullanıyorum fakat 4 level kategorileri de göstermem gerekiyor bu konuda yardımcı olur musunuz.

http://www.opencart.com/index.php?route=...ory%20menu
Alıntı Yaparak Cevapla
Paylaş!
opencart temaları
eno-7v
Çırak
****
Üye user avatar
Çevrimdışı

Mesajlar: 292
Konular: 148
Katılma Tarihi: Nov 2012
Rep Puanı: 0
Teşekkürler: 14
10 Mesajına, 14 Teşekkür edildi.



Kişisel Bilgileri: v
Konu Tarihi: 11-07-2014 02:29 AM
indirdiğim dosyadaki kdo_category.php dosyasını aşağıdaki gibi düzenledim ama bir yerde kontrolü kaybediyorum sanki hata veriyor şu an birde siz bakar mısınız benim editlediğim kısım aşağıdaki gibi son hali
Kod:
<?php  
class ControllerModuleKDOCategory extends Controller {
    protected function index($setting) {
        $this->language->load('module/category');
        
        $this->data['heading_title'] = $this->language->get('heading_title');
        
        if (isset($this->request->get['path'])) {
            $parts = explode('_', (string)$this->request->get['path']);
        } else {
            $parts = array();
        }
        
        if (isset($parts[0])) {
            $this->data['category_id'] = $parts[0];
        } else {
            $this->data['category_id'] = 0;
        }
        
        if (isset($parts[1])) {
            $this->data['child_id'] = $parts[1];
        } else {
            $this->data['child_id'] = 0;
        }
        
        if (isset($parts[2])) {
            $this->data['sisters_id'] = $parts[2];
        } else {
            $this->data['sisters_id'] = 0;
        }
        
        if (isset($parts[3])) {
            $this->data['sisters2_id'] = $parts[2];
        } else {
            $this->data['sisters2_id'] = 0;
        }
        
        $this->load->model('catalog/category');

        $this->load->model('catalog/product');

        $this->data['categories'] = array();

        $categories = $this->model_catalog_category->getCategories(0);

        foreach ($categories as $category) {
            $total = $this->model_catalog_product->getTotalProducts(array('filter_category_id' => $category['category_id']));

            $children_data = array();
            
            $sister_data = array();
            
            $sister2_data = array();

            $children = $this->model_catalog_category->getCategories($category['category_id']);

            foreach ($children as $child) {          
                $sister_data = array();
                $sisters = $this->model_catalog_category->getCategories($child['category_id']);
                if($sisters)
                {
                    foreach ($sisters as $sisterMember) {
                            ////////////////
                                $sister2_data = array();
                                $sisters2 = $this->model_catalog_category->getCategories($sisterMember['category_id']);
                                if($sisters2)
                                {
                                    foreach ($sisters2 as $sisterMember2) {
                                        $sister2_data[] = array(
                                        'category_id' =>$sisterMember2['category_id'],
                                        'name'        => $sisterMember2['name'],
                                        'href'        => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id']. '_' . $sisterMember['category_id'])  
                                        );
                                    }
                                    $children_data[] = array(
                                    'category_id' => $child['category_id'],
                                    'sister_id'   => $sister_data,
                                    'sister2_id'   => $sister2_data,
                                    'name'        => $child['name'],
                                    'href'        => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id'])  
                                    );
                                }
                                else
                                {                    
                                    $children_data[] = array(
                                        'category_id' => $child['category_id'],
                                        'sister_id'    =>$sister_data,
                                        'sister2_id'    =>'',
                                        'name'        => $child['name'],
                                        'href'        => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id'])  
                                        );  
                                }
                            /////////////////////
                        
                        $sister_data[] = array(
                            'category_id' =>$sisterMember['category_id'],
                            'name'        => $sisterMember['name'],
                            'href'        => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id']. '_' . $sisterMember['category_id'])  
                            );                    
                        
                    }
                    $children_data[] = array(
                        'category_id' => $child['category_id'],
                        'sister_id'   => $sister_data,
                        'name'        => $child['name'],
                        'href'        => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id'])  
                        );  
                }
                else
                {                    
                    $children_data[] = array(
                        'category_id' => $child['category_id'],
                        'sister_id'    =>'',
                        'name'        => $child['name'],
                        'href'        => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id'])  
                        );  
                }
            }

            $this->data['categories'][] = array(
                'category_id' => $category['category_id'],
                'name'        => $category['name'] . ($this->config->get('config_product_count') ? ' (' . $total . ')' : ''),
                'children'    => $children_data,
                'sister'    => $sister_data,
                'sister2'    => $sister2_data,
                'href'        => $this->url->link('product/category', 'path=' . $category['category_id'])
                );    
        }
        
        if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/kdo_category.tpl')) {
            $this->template = $this->config->get('config_template') . '/template/module/kdo_category.tpl';
        } else {
            $this->template = 'default/template/module/kdo_category.tpl';
        }
        
        $this->render();
    }
}
?>
Alıntı Yaparak Cevapla
Paylaş!
eno-7v
Çırak
****
Üye user avatar
Çevrimdışı

Mesajlar: 292
Konular: 148
Katılma Tarihi: Nov 2012
Rep Puanı: 0
Teşekkürler: 14
10 Mesajına, 14 Teşekkür edildi.



Kişisel Bilgileri: v
Konu Tarihi: 11-07-2014 12:23 PM
Son düzenleme ile şu hale geldi ama yine çalışmadı eklediğim alanları işaretledim
Kod:
<?php  
class ControllerModuleKDOCategory extends Controller {
    protected function index($setting) {
        $this->language->load('module/category');
        
        $this->data['heading_title'] = $this->language->get('heading_title');
        
        if (isset($this->request->get['path'])) {
            $parts = explode('_', (string)$this->request->get['path']);
        } else {
            $parts = array();
        }
        
        if (isset($parts[0])) {
            $this->data['category_id'] = $parts[0];
        } else {
            $this->data['category_id'] = 0;
        }
        
        if (isset($parts[1])) {
            $this->data['child_id'] = $parts[1];
        } else {
            $this->data['child_id'] = 0;
        }
        
        if (isset($parts[2])) {
            $this->data['sisters_id'] = $parts[2];
        } else {
            $this->data['sisters_id'] = 0;
        }
        //yeni eklenen        
        if (isset($parts[3])) {
            $this->data['sisters2_id'] = $parts[3];
        } else {
            $this->data['sisters2_id'] = 0;
        }
        //
        $this->load->model('catalog/category');

        $this->load->model('catalog/product');

        $this->data['categories'] = array();

        $categories = $this->model_catalog_category->getCategories(0);

        foreach ($categories as $category) {
            $total = $this->model_catalog_product->getTotalProducts(array('filter_category_id' => $category['category_id']));

            $children_data = array();
            
            $sister_data = array();
            //yeni eklenen
            $sister2_data = array();
            /////////
            $children = $this->model_catalog_category->getCategories($category['category_id']);

            foreach ($children as $child) {          
                $sister_data = array();
                $sisters = $this->model_catalog_category->getCategories($child['category_id']);
                if($sisters)
                {
                    foreach ($sisters as $sisterMember) {
                        //yeni eklenen
                            $sister2_data = array();
                            $sisters2 = $this->model_catalog_category->getCategories($sisterMember['category_id']);
                            if($sisters2)
                            {
                                foreach ($sisters2 as $sisterMember2) {
                                    $sister2_data[] = array(
                                    'category_id' =>$sisterMember2['category_id'],
                                    'name'        => $sisterMember2['name'],
                                    'href'        => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id']. '_' . $sisterMember['category_id']. '_' . $sisterMember2['category_id'])  
                                    );
                                }
                            }
                        //////////
                        $sister_data[] = array(
                            'category_id' =>$sisterMember['category_id'],
                            'name'        => $sisterMember['name'],
                            //yeni eklenen
                            'sister2_id'   => $sister2_data,
                            ///////////
                            'href'        => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id']. '_' . $sisterMember['category_id'])  
                            );                    
                        
                    }
                    $children_data[] = array(
                        'category_id' => $child['category_id'],
                        'sister_id'   => $sister_data,
                        'name'        => $child['name'],
                        'href'        => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id'])  
                        );  
                }
                else
                {                    
                    $children_data[] = array(
                        'category_id' => $child['category_id'],
                        'sister_id'    =>'',
                        'name'        => $child['name'],
                        'href'        => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id'])  
                        );  
                }
            }

            $this->data['categories'][] = array(
                'category_id' => $category['category_id'],
                'name'        => $category['name'] . ($this->config->get('config_product_count') ? ' (' . $total . ')' : ''),
                'children'    => $children_data,
                'sister'    => $sister_data,
                'href'        => $this->url->link('product/category', 'path=' . $category['category_id'])
                );    
        }
        
        if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/kdo_category.tpl')) {
            $this->template = $this->config->get('config_template') . '/template/module/kdo_category.tpl';
        } else {
            $this->template = 'default/template/module/kdo_category.tpl';
        }
        
        $this->render();
    }
}
?>
Alıntı Yaparak Cevapla
Paylaş!

« Önceki | Sonraki »
Cevapla  Gönder 

accordion kategori modifikasyonu Konusunun Linki Direk Link
accordion kategori modifikasyonu Konusunun HTML Kodu HTML Link
accordion kategori modifikasyonu Konusu BBCode Linki BBCode Link
accordion kategori modifikasyonu Konusunu Paylaş Sosyal Paylaş

Benzeyen Konular
Konu: Yazar Cevaplar: Gösterim: Son Mesaj
  3 ve 4 seviye accordion Alt Kategori Göstermek eno-7 2 1,050 09-11-2015 03:21 AM
Son Mesaj: mastike

accordion kategori modifikasyonu indir, accordion kategori modifikasyonu Videosu, accordion kategori modifikasyonu online izle, accordion kategori modifikasyonu Bedava indir, accordion kategori modifikasyonu Yükle, accordion kategori modifikasyonu Hakkında, accordion kategori modifikasyonu nedir, accordion kategori modifikasyonu Free indir, accordion kategori modifikasyonu oyunu, accordion kategori modifikasyonu download


Forum Atla: