#1 (permalink)  
Alt 26.12.2008, 21:52
Neuer Benutzer
 
Registriert seit: 14.06.2007
Beiträge: 5
Standard Navigation mit Kategorie Icons -- Fehler

Hallo zusammen
Kann mir mal ein php Profi etwas nachhelfen. Ich habe vor längerer Zeit mal eine Kategorie-Navigation eingebaut, bei der jeder Kategorie ein individuelles Bild vorangestellt wird. (Die Codeschnipsel waren aus dem Internet, weiss aber nicht mehr woher). Klappt eigentlich auch alles, nur im Code wird die Tabelle durch eine Schleife mehrmals geschlossen. Schaut Euch doch mal den Quellcode auf meinem Shop www.nicishop.ch an. Den Code der Datei xtc_show_category.inc.php findet Ihr nachstehend. Danke für Eure Hilfe.


Zitat:
<?php
/* -----------------------------------------------------------------------------------------
$Id: xtc_show_category.inc.php 1262 2005-09-30 10:00:32Z mz $

XT-Commerce - community made shopping
http://www.xt-commerce.com

Copyright (c) 2003 XT-Commerce
-----------------------------------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(categories.php,v 1.23 2002/11/12); www.oscommerce.com
(c) 2003 nextcommerce (xtc_show_category.inc.php,v 1.4 2003/08/13); www.nextcommerce.org

Released under the GNU General Public License
---------------------------------------------------------------------------------------*/

function xtc_show_category($counter) {
global $foo, $categories_string, $id;

// image for first level
//$img_1='<img src="templates/'.CURRENT_TEMPLATE.'/img/icon_arrow.jpg" alt="" />&nbsp;';
$img_1='<img src="templates/'.CURRENT_TEMPLATE.'/img/p/'.$counter.'.jpg" alt="" />';


if ($foo[$counter]['level']=='') {
if (strlen($categories_string)=='0') {
$categories_string .='<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)">';
} else {
$categories_string .='</td></tr></table><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)">';
}
$categories_string .= '<td class="symbol0" width="30" valign="middle">'.$img_1;
$categories_string .= '</td>';
$categories_string .= '<td class="level0"><a href="';
} else {
$categories_string .= '<tr><td class="symbol1">&nbsp;</td><td class="level1">';
$categories_string .= '<a href="';
}

$cPath_new=xtc_category_link($counter,$foo[$counter]['name']);

$categories_string .= xtc_href_link(FILENAME_DEFAULT, $cPath_new);
$categories_string .= '">';

// Anzeigen der Kategoriebezeichnung
if ($foo[$counter]['level']=='1') {
$categories_string .= '';
}

$categories_string .= $foo[$counter]['name'];

if ( ($id) && (in_array($counter, $id)) ) {
//$categories_string .= '</b>';
}

if (SHOW_COUNTS == 'true') {
$products_in_category = xtc_count_products_in_category($counter);
if ($products_in_category > 0) {
$categories_string .= '&nbsp;(' . $products_in_category . ')';
}
}

if ($foo[$counter]['level']=='') {
$categories_string .= '</a>';
} else {
$categories_string .= '</a>';
$categories_string .= '</td></tr>';
if ($foo[$counter]['level']=='1') {
$categories_string .='';
}
}

if ($foo[$counter]['next_id']) {
xtc_show_category($foo[$counter]['next_id']);
} else {
$categories_string .= '';
}
$categories_string .= '</table>';
}
?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
Antwort

Lesezeichen

Stichworte
fehler, icons, kategorie, navigation

Themen-Optionen
Ansicht

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are aus
Pingbacks are aus
Refbacks are aus


Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
neues Design für die Kategorie Navigation TomsShop Installation und Konfiguration 0 22.07.2008 23:40
KELKOO - EILT Stefan_w Allgemeine Diskussionen 0 09.12.2005 17:10
Fehler Beim L?schen Einer Kategorie anka13 Installation und Konfiguration 3 31.12.2003 17:32


Alle Zeitangaben in WEZ +1. Es ist jetzt 09:50 Uhr.

Copyright © 2011 xt:Commerce GmbH / xt:Commerce International Ltd. - All Rights Reserved

xt:Commerce is a SafeCharge brand