Antworten auf deine Fragen:
Neues Thema erstellen

xtc commerce Kategorien sind weg

DennyLee

Nicht mehr ganz neu hier

Hey Leute,

ich hoffe ich bin hier richtig. Und zwar hab ich vor einem halben Jahr ein xtc Onlineshop begonnen und hatte da Probleme mit mehrfarbigen Kategorien. Ein bekannter von mir hab mit Template Dateinen zugeschickt, die ich einfach ersetzen sollte. Nun sind meine Kategorien verschwunden :(

Siehe hier:

Ich mache gleich mal die codes rein, von den neuen Dateien.
Das hier hab ich an mein css angehangen:

Code:
/* Zelle ebene 1 */

TD.l1_i1  { font-family: Verdana; text-decoration: none; background: #f0f0f0 no-repeat; text-indent: 5px; height: 25px;  }
TD.l1_i2 { font-family: Verdana; text-decoration: none; background: navy no-repeat; text-indent: 5px; height: 25px }
TD.l1_i3 { font-family: Verdana; text-decoration: none; background: gray no-repeat; text-indent: 5px; height: 25px; }
TD.l1_i4 { font-family: Verdana; text-decoration: none; background: silver no-repeat; text-indent: 5px; height: 25px; }
TD.l1_i5 { font-family: Verdana; text-decoration: none; background: silver no-repeat; text-indent: 5px; height: 25px; }
TD.l1_i6 { font-family: Verdana; text-decoration: none; background: silver no-repeat; text-indent: 5px; height: 25px; }
TD.l1_i7 { font-family: Verdana; text-decoration: none; background: silver no-repeat; text-indent: 5px; height: 25px; }
TD.l1_i8 { font-family: Verdana; text-decoration: none; background: silver no-repeat; text-indent: 5px; height: 25px; }
TD.l1_i9 { font-family: Verdana; text-decoration: none; background: silver no-repeat; text-indent: 5px; height: 25px; }

/* Zelle ebene 2 */

TD.l2_i1  { font-family: Verdana; text-decoration: none; background: #ce5b71 no-repeat; text-indent: 5px; height: 25px  }
TD.l2_i2 { font-family: Verdana; text-decoration: none; background: #7b7be8 no-repeat; text-indent: 5px; height: 25px }
TD.l2_i3 { font-family: Verdana; text-decoration: none; background: #c1c1c1 no-repeat; text-indent: 5px; height: 25px; }
TD.l2_i4 { font-family: Verdana; text-decoration: none; background: #390 no-repeat; text-indent: 5px; height: 25px; }
TD.l2_i5 { font-family: Verdana; text-decoration: none; background: #390 no-repeat; text-indent: 5px; height: 25px; }
TD.l2_i6 { font-family: Verdana; text-decoration: none; background: #390 no-repeat; text-indent: 5px; height: 25px; }
TD.l2_i7 { font-family: Verdana; text-decoration: none; background: #390 no-repeat; text-indent: 5px; height: 25px; }
TD.l2_i8 { font-family: Verdana; text-decoration: none; background: #390 no-repeat; text-indent: 5px; height: 25px; }
TD.l2_i9 { font-family: Verdana; text-decoration: none; background: #390 no-repeat; text-indent: 5px; height: 25px; }

/* Zelle ebene 3 */

TD.l3_i1  { font-family: Verdana; text-decoration: none; background: #e0a68e no-repeat; text-indent: 5px; height: 25px }
TD.l3_i2 { font-family: Verdana; text-decoration: none; background: #ccf no-repeat; text-indent: 5px; height: 25px }
TD.l3_i3 { font-family: Verdana; text-decoration: none; background: #393 no-repeat; text-indent: 5px; height: 25px; }
TD.l3_i4 { font-family: Verdana; text-decoration: none; background: #393 no-repeat; text-indent: 5px; height: 25px; }
TD.l3_i5 { font-family: Verdana; text-decoration: none; background: #393 no-repeat; text-indent: 5px; height: 25px; }
TD.l3_i6 { font-family: Verdana; text-decoration: none; background: #393 no-repeat; text-indent: 5px; height: 25px; }
TD.l3_i7 { font-family: Verdana; text-decoration: none; background: #393 no-repeat; text-indent: 5px; height: 25px; }
TD.l3_i8 { font-family: Verdana; text-decoration: none; background: #393 no-repeat; text-indent: 5px; height: 25px; }
TD.l3_i9 { font-family: Verdana; text-decoration: none; background: #393 no-repeat; text-indent: 5px; height: 25px; }

/* Link ebene 1 */

a.l1_i1 { color: white; font-size: 9pt; font-family: Verdana; text-decoration: none; background-repeat: no-repeat; height: 25px }
a.l1_i2 { color: white; font-size: 9pt; font-family: Verdana; text-decoration: none; background-repeat: no-repeat; height: 25px; }
a.l1_i3 { color: white; font-size: 9pt; font-family: Verdana; text-decoration: none; background-repeat: no-repeat; height: 25px; }
a.l1_i4 { color: white; font-size: 9pt; font-family: Verdana; text-decoration: none; background-repeat: no-repeat; height: 25px; }
a.l1_i5 { color: white; font-size: 9pt; font-family: Verdana; text-decoration: none; background-repeat: no-repeat; height: 25px; }
a.l1_i6 { color: white; font-size: 9pt; font-family: Verdana; text-decoration: none; background-repeat: no-repeat; height: 25px; }
a.l1_i7 { color: white; font-size: 9pt; font-family: Verdana; text-decoration: none; background-repeat: no-repeat; height: 25px; }
a.l1_i8 { color: white; font-size: 9pt; font-family: Verdana; text-decoration: none; background-repeat: no-repeat; height: 25px; }
a.l1_i9 { color: white; font-size: 9pt; font-family: Verdana; text-decoration: none; background-repeat: no-repeat; height: 25px; }

/* Link ebene 2 */

a.l2_i1 { color: white; font-size: 9pt; font-family: Verdana; text-decoration: none; background-repeat: no-repeat; height: 25px }
a.l2_i2 { color: white; font-size: 9pt; font-family: Verdana; text-decoration: none; background-repeat: no-repeat; height: 25px; }
a.l2_i3 { color: white; font-size: 9pt; font-family: Verdana; text-decoration: none; background-repeat: no-repeat; height: 25px; }
a.l2_i4 { color: white; font-size: 9pt; font-family: Verdana; text-decoration: none; background-repeat: no-repeat; height: 25px; }
a.l2_i5 { color: white; font-size: 9pt; font-family: Verdana; text-decoration: none; background-repeat: no-repeat; height: 25px; }
a.l2_i6 { color: white; font-size: 9pt; font-family: Verdana; text-decoration: none; background-repeat: no-repeat; height: 25px; }
a.l2_i7 { color: white; font-size: 9pt; font-family: Verdana; text-decoration: none; background-repeat: no-repeat; height: 25px; }
a.l2_i8 { color: white; font-size: 9pt; font-family: Verdana; text-decoration: none; background-repeat: no-repeat; height: 25px; }
a.l2_i9 { color: white; font-size: 9pt; font-family: Verdana; text-decoration: none; background-repeat: no-repeat; height: 25px; }

/* Link ebene 3 */

a.l3_i1 { color: white; font-size: 9pt; font-family: Verdana; text-decoration: none; background-repeat: no-repeat; height: 25px }
a.l3_i2 { color: white; font-size: 9pt; font-family: Verdana; text-decoration: none; background-repeat: no-repeat; height: 25px; }
a.l3_i3 { color: white; font-size: 9pt; font-family: Verdana; text-decoration: none; background-repeat: no-repeat; height: 25px; }
a.l3_i4 { color: white; font-size: 9pt; font-family: Verdana; text-decoration: none; background-repeat: no-repeat; height: 25px; }
a.l3_i5 { color: white; font-size: 9pt; font-family: Verdana; text-decoration: none; background-repeat: no-repeat; height: 25px; }
a.l3_i6 { color: white; font-size: 9pt; font-family: Verdana; text-decoration: none; background-repeat: no-repeat; height: 25px; }
a.l3_i7 { color: white; font-size: 9pt; font-family: Verdana; text-decoration: none; background-repeat: no-repeat; height: 25px; }
a.l3_i8 { color: white; font-size: 9pt; font-family: Verdana; text-decoration: none; background-repeat: no-repeat; height: 25px; }
a.l3_i9 { color: white; font-size: 9pt; font-family: Verdana; text-decoration: none; background-repeat: no-repeat; height: 25px; }

hier ist noch die Datei categories.php aus sorce/boxes
Code:
<?php

/* -----------------------------------------------------------------------------------------
   $Id: categories.php 1302 2005-10-12 16:21:29Z 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 (categories.php,v 1.10 2003/08/17); www.nextcommerce.org

   Released under the GNU General Public License
   -----------------------------------------------------------------------------------------
   Third Party contributions:
   Enable_Disable_Categories 1.3                Autor: Mikel Williams | mikel@ladykatcostumes.com

   Released under the GNU General Public License
   ---------------------------------------------------------------------------------------*/
// reset var
$start = microtime();
$box_smarty = new smarty;
$box_content = '';

$box_smarty->assign('language', $_SESSION['language']);
// set cache ID
if (!CacheCheck()) {
        $cache=false;
        $box_smarty->caching = 0;
} else {
        $cache=true;
        $box_smarty->caching = 1;
        $box_smarty->cache_lifetime = CACHE_LIFETIME;
        $box_smarty->cache_modified_check = CACHE_CHECK;
        $cache_id = $_SESSION['language'].$_SESSION['customers_status']['customers_status_id'].$cPath;
}

if(!$box_smarty->is_cached(CURRENT_TEMPLATE.'/boxes/box_categories.html', $cache_id) || !$cache){

$box_smarty->assign('tpl_path', 'templates/'.CURRENT_TEMPLATE.'/');

// include needed functions
require_once (DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/source/inc/xtc_show_category.inc.php');
require_once (DIR_FS_INC.'xtc_has_category_subcategories.inc.php');
require_once (DIR_FS_INC.'xtc_count_products_in_category.inc.php');


$categories_string = '';
if (GROUP_CHECK == 'true') {
        $group_check = "and c.group_permission_".$_SESSION['customers_status']['customers_status_id']."=1 ";
}
$categories_query = "select c.categories_id,
                                           cd.categories_name,
                                           c.parent_id from ".TABLE_CATEGORIES." c, ".TABLE_CATEGORIES_DESCRIPTION." cd
                                           where c.categories_status = '1'
                                           and c.parent_id = '152'
                                           ".$group_check."
                                           and c.categories_id = cd.categories_id
                                           and cd.language_id='".(int) $_SESSION['languages_id']."'
                                           order by sort_order, cd.categories_name";
$categories_query = xtDBquery($categories_query);

while ($categories = xtc_db_fetch_array($categories_query, true)) {
        $foo[$categories['categories_id']] = array ('name' => $categories['categories_name'], 'parent' => $categories['parent_id'], 'level' => 0, 'path' => $categories['categories_id'], 'next_id' => false);

        if (isset ($prev_id)) {
                $foo[$prev_id]['next_id'] = $categories['categories_id'];
        }

        $prev_id = $categories['categories_id'];

        if (!isset ($first_element)) {
                $first_element = $categories['categories_id'];
        }
}

//------------------------
if ($cPath) {
        $new_path = '';
        $id = split('_', $cPath);
        reset($id);
        while (list ($key, $value) = each($id)) {
                unset ($prev_id);
                unset ($first_id);

                $categories_query = "select c.categories_id, cd.categories_name, c.parent_id from ".TABLE_CATEGORIES." c, ".TABLE_CATEGORIES_DESCRIPTION." cd where c.categories_status = '1' and c.parent_id = '".$value."' ".$group_check." and c.categories_id = cd.categories_id and cd.language_id='".$_SESSION['languages_id']."' order by sort_order, cd.categories_name";
                $categories_query = xtDBquery($categories_query);
                $category_check = xtc_db_num_rows($categories_query, true);
                if ($category_check > 0) {
                        $new_path .= $value;
                        while ($row = xtc_db_fetch_array($categories_query, true)) {
                                $foo[$row['categories_id']] = array ('name' => $row['categories_name'], 'parent' => $row['parent_id'], 'level' => $key, 'path' => $new_path.'_'.$row['categories_id'], 'next_id' => false);

                                if (isset ($prev_id)) {
                                        $foo[$prev_id]['next_id'] = $row['categories_id'];
                                }

                                $prev_id = $row['categories_id'];

                                if (!isset ($first_id)) {
                                        $first_id = $row['categories_id'];
                                }

                                $last_id = $row['categories_id'];

                        }
                        $foo[$last_id]['next_id'] = $foo[$value]['next_id'];
                        $foo[$value]['next_id'] = $first_id;
                        $new_path .= '_';
                } else {
                        break;
                }
        }
}

xtc_show_category($first_element,0);

$box_smarty->assign('BOX_CONTENT', $categories_string);

}

// set cache ID
if (!$cache) {
        $box_categories = $box_smarty->fetch(CURRENT_TEMPLATE.'/boxes/box_categories.html');
} else {
        $box_categories = $box_smarty->fetch(CURRENT_TEMPLATE.'/boxes/box_categories.html', $cache_id);
}

$smarty->assign('box_CATEGORIES', $box_categories);
?>

hier ist noch die Datei xtc_show_category.inc.php aus sorce/inc
Code:
<?php
/* -----------------------------------------------------------------------------------------
   $Id: xtc_show_category.inc.php,v 1.1 2004/04/26 20:26:42 fanta2k Exp $

   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, $item_counter) {
    global $foo, $categories_string, $id;

    //$img_1='<img src="templates/'.CURRENT_TEMPLATE.'/img/icon_arrow.jpg" alt="" />&nbsp;';
    $img_1='';

    if ($foo[$counter]['level']=='') {
    if (strlen($categories_string)=='0') {
    $categories_string .='<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td>&nbsp;</td></tr>';
    } else {
    //ebene1
    $categories_string .='';
    }
    //ebene2
    $item_counter = $item_counter + 1;
    $categories_string .= '<tr><td class="l1_i'.$item_counter.'"><a href="';
    } else {
    //ebene3
    if ($foo[$counter]['level']=='1')
    {
    $categories_string .= '<tr><td class="l2_i'.$item_counter.'"><a href="';
    }
    else
    {
    $categories_string .= '<tr><td class="l3_i'.$item_counter.'"><a href="';
    }
    }
    if ($foo[$counter]['parent'] == 0) {
      $cPath_new = 'cPath=' . $counter;
    } else {
      $cPath_new = 'cPath=' . $foo[$counter]['path'];
    }

    if (SEARCH_ENGINE_FRIENDLY_URLS == 'true') $cPath_new.='&category='.xtc_cleanName($foo[$counter]['name']);
    $categories_string .= xtc_href_link(FILENAME_DEFAULT, $cPath_new);

    if ($foo[$counter]['level']=='0')
    {
    $categories_string .= '" class="l1_i'.$item_counter.'">';
    }
    if ($foo[$counter]['level']=='1')
    {
    $categories_string .= '" class="l2_i'.$item_counter.'">';
    }
    if ($foo[$counter]['level']=='2')
    {
    $categories_string .= '" class="l3_i'.$item_counter.'">';
    }

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

    // display category name
    if (strlen($foo[$counter]['path'])==7)
    {
    $categories_string .= $foo[$counter]['name'];
    }
    else
    {
    $categories_string .= $img_1.$foo[$counter]['name'];
    }

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

    if (xtc_has_category_subcategories($counter)) {
      $categories_string .= '';
    }

    $categories_string .= '</a>';

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

    $categories_string .= '</td></tr>';

    if ($foo[$counter]['next_id']) {

        xtc_show_category($foo[$counter]['next_id'], $item_counter);

    } else {
        $categories_string .= '</td></tr><tr><td>&nbsp;</td></tr></table>';
    }
  }

?>

ich hab das jetzt schon vier Stunden lang versucht hinzubekommen, vielleicht bin ich ja auch bloß blind. Sorry für den ganzen Quellcode aber ich hoffe ihr könnt mir weiter helfen.

Liebe Grüße
 

MyBad

localhorst

AW: xtc commerce Kategorien sind weg

Zeig mal den Quelltext von deiner index.html vom Template. Ist da denn auch die {$box_CATEGORIES} eingebunden?
 

DennyLee

Nicht mehr ganz neu hier

AW: xtc commerce Kategorien sind weg

ja eig schon.

Code:
{config_load file="$language/lang_$language.conf" section="index"}
<div id="wrap">
    <div id="header">
        <div id="logo"><img src="{$tpl_path}img/bg_header_03.jpg" alt="" /></div>
        <div id="search"></div>
  </div>
    
    <div id="topmenuwrap">
        <ul id="topmenu">
    <table width="1200" height="203" border="0">
      <tr>
        <td width="238"> </td>
        <td width="458" valign="top"><li><a href="index.php">Home</a></li>
            <li><a href="shop_content.php?coID=7">Kontakt</a></li>
        <li><a href="shop_content.php?coID=4">Impressum</a></li></td>
        <td width="420" valign="top"> <li><a href="{$logoff}">{#link_logoff#}</a></li> <li><a href="{$cart}">{#link_cart#}</a></li>
            {if $account}
            <li><a href="{$account}">{#link_account#}</a></li>
            {/if}
            <li><a href="{$checkout}">{#link_checkout#}</a></li>
            {if $account}{php} if (isset($_SESSION['customer_id'])) { {/php}
            {php} } {/php}{/if}
        <td width="66" valign="top">        
      <tr>
      </ul>
<tr><td colspan="2"></td>
      <tr>      </tr>
    </table>
     <div id="languages"></div>
  </div>
    <div id="breadcrumb"></div>
  <div id="contentwrap">
    <div id="topmenuwrap2">
      <div id="languages2"></div>
    </div>
    <div id="contentwrap2"> {if !strstr ($smarty.server.PHP_SELF, 'checkout')}
      <div id="leftcol">{$box_CATEGORIES}</div>
      {/if}
      <div
		{if !strstr ($smarty.server.PHP_SELF, 'checkout')}
			id="content"
		{else}
			id="contentfull"
		{/if}
		 >
      {$main_content}</div>
    {if !strstr ($smarty.server.PHP_SELF, 'checkout')}
    <div id="rightcol">{$box_LOGIN}{$box_ADMIN}{$box_CONTENT}</div>
  {/if} </div>
    </div>
<p class="footer">Copyright &copy; {php}echo TITLE;{/php}</p>
</div>
 

MyBad

localhorst

AW: xtc commerce Kategorien sind weg

Was macht denn diese if-Abfrage?
Code:
{if !strstr ($smarty.server.PHP_SELF, 'checkout')}
<div id="leftcol">{$box_CATEGORIES}</div>
{/if}

Denn wenn der Fall nicht zutrifft wird die {$box_CATEGORIES} nicht ausgegeben.
 

DennyLee

Nicht mehr ganz neu hier

AW: xtc commerce Kategorien sind weg

aber auch wenn man das if rausnimmt geht es nicht. Es klappte ja vorher alles super, bis ich das neue css und die zwei anderen php seiten eingefügt hab
 

Mosh

Nemesis-ARTgroup.de

AW: xtc commerce Kategorien sind weg

Die XTC Dateien müssen schon zum Template passen.
Ansonsten sieht das genau so aus, wie bei Dir.

Du hast Schrott hochgeladen.


Ein funktionierender XTC:

Oder Bannerklick
 
Bilder bitte hier hochladen und danach über das Bild-Icon (Direktlink vorher kopieren) platzieren.
Antworten auf deine Fragen:
Neues Thema erstellen

Willkommen auf PSD-Tutorials.de

In unseren Foren vernetzt du dich mit anderen Personen, um dich rund um die Themen Fotografie, Grafik, Gestaltung, Bildbearbeitung und 3D auszutauschen. Außerdem schalten wir für dich regelmäßig kostenlose Inhalte frei. Liebe Grüße senden dir die PSD-Gründer Stefan und Matthias Petri aus Waren an der Müritz. Hier erfährst du mehr über uns.

Stefan und Matthias Petri von PSD-Tutorials.de

Nächster neuer Gratisinhalt

03
Stunden
:
:
25
Minuten
:
:
19
Sekunden

Neueste Themen & Antworten

Flatrate für Tutorials, Assets, Vorlagen

Zurzeit aktive Besucher

Statistik des Forums

Themen
118.616
Beiträge
1.538.358
Mitglieder
67.536
Neuestes Mitglied
QuestionMark
Oben