Anasayfa | Ürünlerimiz | Referanslar | iletişim sayfalarım var ürünlerimiz kısmında aşağı açılır şekilde kategori yapmam lazım. Oluşturduğum ürün kategorileri aşağı doğru açtırmam lazım ama Resimdeki hatayı alıyorum. Sürüm Sürüm 1.5.3

catalog/view/theme/tema/template/common/header.tpl içerisindeki kod'lar
<?php if (isset($_SERVER['HTTP_USER_AGENT']) && !strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6')) echo '<?xml version="1.0" encoding="UTF-8"?>'. "\n"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>" xml:lang="<?php echo $lang; ?>">
<head>
<title><?php echo $title; ?></title>
<base href="<?php echo $base; ?>" />
<?php if ($description) { ?>
<meta name="description" content="<?php echo $description; ?>" />
<?php } ?>
<?php if ($keywords) { ?>
<meta name="keywords" content="<?php echo $keywords; ?>" />
<?php } ?>
<?php if ($icon) { ?>
<link href="<?php echo $icon; ?>" rel="icon" />
<?php } ?>
<?php foreach ($links as $link) { ?>
<link href="<?php echo $link['href']; ?>" rel="<?php echo $link['rel']; ?>" />
<?php } ?>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/tema/stylesheet/stylesheet.css" />
<?php foreach ($styles as $style) { ?>
<link rel="<?php echo $style['rel']; ?>" type="text/css" href="<?php echo $style['href']; ?>" media="<?php echo $style['media']; ?>" />
<?php } ?>
<script type="text/javascript" src="catalog/view/javascript/jquery/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-1.8.16.custom.min.js"></script>
<link rel="stylesheet" type="text/css" href="catalog/view/javascript/jquery/ui/themes/ui-lightness/jquery-ui-1.8.16.custom.css" />
<script type="text/javascript" src="catalog/view/javascript/jquery/ui/external/jquery.cookie.js"></script>
<script type="text/javascript" src="catalog/view/javascript/jquery/colorbox/jquery.colorbox.js"></script>
<link rel="stylesheet" type="text/css" href="catalog/view/javascript/jquery/colorbox/colorbox.css" media="screen" />
<script type="text/javascript" src="catalog/view/javascript/jquery/tabs.js"></script>
<script type="text/javascript" src="catalog/view/javascript/common.js"></script>
<?php foreach ($scripts as $script) { ?>
<script type="text/javascript" src="<?php echo $script; ?>"></script>
<?php } ?>
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/tema/stylesheet/ie7.css" />
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/tema/stylesheet/ie6.css" />
<script type="text/javascript" src="catalog/view/javascript/DD_belatedPNG_0.0.8a-min.js"></script>
<script type="text/javascript">
DD_belatedPNG.fix('#logo img');
</script>
<![endif]-->
<?php echo $google_analytics; ?>
</head>
<body>
<div id="container">
<div id="header">
<div class="ust">
<div id="logo"><a href="<?php echo $home; ?>"><img src="<?php echo $logo; ?>" title="<?php echo $name; ?>" alt="<?php echo $name; ?>" /></a></div>
<div class="sm" style="width:200px;">
<a href="https://www.facebook.com/" target="_blank"><img src="/catalog/view/theme/tema/image/sm_f.png" width="18px" height="19px"></a>
<a href="#twitter" target="_blank"><img src="/catalog/view/theme/tema/image/sm_t.png" width="19px" height="19px"></a>
<a href="#linkedin" target="_blank"><img src="/catalog/view/theme/tema/image/sm_l.png" width="19px" height="19px"></a>
<a href="#googleplus" target="_blank"><img src="/catalog/view/theme/tema/image/sm_g.png" width="19px" height="19px"></a>
<a href="#pinterest" target="_blank"><img src="/catalog/view/theme/tema/image/sm-pi.png" width="19px" height="19px"></a>
</div>
<div class="telefon"><img src="/catalog/view/theme/tema/image/telefon.png"></div>
<div class="unvan">
Hoşgeldiniz, <a href="index.php?route=account/login">giriş yapın</a> ya da <a href="index.php?route=account/register">kayıt olun</a>. - <a href="index.php?route=checkout/cart">Alışveriş Sepetim</a>
</div>
<div class="menu">
<ul>
<li class="ciz"><a href="index.php?route=common/home">ANASAYFA <span>HOME</span></a></li>
<li class="ciz">
<a href="index.php?route=product/category&path=59" class="acilir">ÜRÜNLERİMİZ <span>PRODUCTS</span></a>
<ul style="width:600px; margin-left:-100px;">
<li><a href="<?php echo $category['children'][$i]['href']; ?>"><?php echo $category['children'][$i]['name']; ?></a></li>
</ul>
</li>
<li class="ciz"><a href="index.php?route=information/information&information_id=7">HİZMETLERİMİZ <span>SERVICES</span></a></li>
<li class="ciz"><a href="index.php?route=information/information&information_id=4">KURUMSAL <span>CORPORATE</span></a></li>
<li class="ciz"><a href="index.php?route=information/information&information_id=9">REFERANSLAR <span>REFERENCES</span></a></li>
<li><a href="index.php?route=information/contact">İLETİŞİM <span>CONTACT</span></a>
<ul style="width:150px; margin-left:-80px;">
<li><a href="index.php?route=information/contact">Adres ve Telefonlarımız</a></li>
</ul>
</li>
</ul>
</div>
<div id="cart">
<div class="heading">
<a href="index.php?route=checkout/cart"><h4>Sepetim</h4></a>
<a><span id="cart_total">0 ürün - 0.00TL</span></a>
</div>
<div class="content"></div>
</div>
</div>
<div id="notification"></div>
<script type="text/javascript">
function openSubMenu(id){
//
$('.submenu').hide();
document.getElementById("id_menu_"+id).style.display="block";
}
</script>
<style>
.submenu{
background: url('catalog/view/theme/default/image/menu.png') repeat scroll 0 0 transparent;
border: 1px solid #000000;
border-radius: 0px 5px 5px 0px;
margin-top:-23px;
left:140px;
position:absolute;
min-width:140px;
display:none;
}
</style>
<!--[if IE 7]>
<style>
#menu > ul > li > div {
width:140px!important;
}
.submenu{
left:145px;
}
</style>
<![endif]-->
<!--[if IE 8]>
<style>
#menu > ul > li > div {
width:140px!important;
}
.submenu{
left:150px;
}
</style>
<![endif]-->/public_html/catalog/controller/common/header.php içerisindeki kod'lar<?php
class ControllerCommonHeader extends Controller {
protected function index() {
$this->data['title'] = $this->document->getTitle();
if (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1'))) {
$this->data['base'] = $this->config->get('config_ssl');
} else {
$this->data['base'] = $this->config->get('config_url');
}
$this->data['description'] = $this->document->getDescription();
$this->data['keywords'] = $this->document->getKeywords();
$this->data['links'] = $this->document->getLinks();
$this->data['styles'] = $this->document->getStyles();
$this->data['scripts'] = $this->document->getScripts();
$this->data['lang'] = $this->language->get('code');
$this->data['direction'] = $this->language->get('direction');
$this->data['google_analytics'] = html_entity_decode($this->config->get('config_google_analytics'), ENT_QUOTES, 'UTF-8');
$this->language->load('common/header');
if (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1'))) {
$server = HTTPS_IMAGE;
} else {
$server = HTTP_IMAGE;
}
if ($this->config->get('config_icon') && file_exists(DIR_IMAGE . $this->config->get('config_icon'))) {
$this->data['icon'] = $server . $this->config->get('config_icon');
} else {
$this->data['icon'] = '';
}
$this->data['name'] = $this->config->get('config_name');
if ($this->config->get('config_logo') && file_exists(DIR_IMAGE . $this->config->get('config_logo'))) {
$this->data['logo'] = $server . $this->config->get('config_logo');
} else {
$this->data['logo'] = '';
}
$this->data['text_home'] = $this->language->get('text_home');
$this->data['text_wishlist'] = sprintf($this->language->get('text_wishlist'), (isset($this->session->data['wishlist']) ? count($this->session->data['wishlist']) : 0));
$this->data['text_shopping_cart'] = $this->language->get('text_shopping_cart');
$this->data['text_search'] = $this->language->get('text_search');
$this->data['text_welcome'] = sprintf($this->language->get('text_welcome'), $this->url->link('account/login', '', 'SSL'), $this->url->link('account/register', '', 'SSL'));
$this->data['text_logged'] = sprintf($this->language->get('text_logged'), $this->url->link('account/account', '', 'SSL'), $this->customer->getFirstName(), $this->url->link('account/logout', '', 'SSL'));
$this->data['text_account'] = $this->language->get('text_account');
$this->data['text_checkout'] = $this->language->get('text_checkout');
$this->data['home'] = $this->url->link('common/home');
$this->data['wishlist'] = $this->url->link('account/wishlist');
$this->data['logged'] = $this->customer->isLogged();
$this->data['account'] = $this->url->link('account/account', '', 'SSL');
$this->data['shopping_cart'] = $this->url->link('checkout/cart');
$this->data['checkout'] = $this->url->link('checkout/checkout', '', 'SSL');
if (isset($this->request->get['filter_name'])) {
$this->data['filter_name'] = $this->request->get['filter_name'];
} else {
$this->data['filter_name'] = '';
}
// Menu
$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) {
if ($category['top']) {
$children_data = array();
$children = $this->model_catalog_category->getCategories($category['category_id']);
foreach ($children as $child) {
$data = array(
'filter_category_id' => $child['category_id'],
'filter_sub_category' => true
);
if ($this->config->get('config_product_count')) {
$product_total = $this->model_catalog_product->getTotalProducts($data);
$child['name'] .= ' (' . $product_total . ')';
}
// Level 2
//modified
$children_level2 = $this->model_catalog_category->getCategories($child['category_id']);
$children_data_level2 = array();
foreach ($children_level2 as $child_level2) {
$data_level2 = array(
'filter_category_id' => $child_level2['category_id'],
'filter_sub_category' => true
);
$product_total_level2 = '';
if ($this->config->get('config_product_count')) {
$product_total_level2 = ' (' . $this->model_catalog_product->getTotalProducts($data_level2) . ')';
}
$children_data_level2[] = array(
'name' => $child_level2['name'] . $product_total_level2,
'href' => $this->url->link('product/category', 'path=' . $child['category_id'] . '_' . $child_level2['category_id']),
'id' => $category['category_id']. '_' . $child['category_id']. '_' . $child_level2['category_id']
);
}
$children_data[] = array(
'name' => $child['name'],
'href' => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id']),
'id' => $category['category_id']. '_' . $child['category_id'],
'children_level2' => $children_data_level2,
);
//end modified
}
// Level 1
$this->data['categories'][] = array(
'name' => $category['name'],
'children' => $children_data,
'column' => $category['column'] ? $category['column'] : 1,
'href' => $this->url->link('product/category', 'path=' . $category['category_id'])
);
}
}
$this->children = array(
'module/language',
'module/currency',
'module/cart'
);
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/common/header.tpl')) {
$this->template = $this->config->get('config_template') . '/template/common/header.tpl';
} else {
$this->template = 'default/template/common/header.tpl';
}
$this->render();
}
}
?>
