Neuigkeiten
  • Die modified eCommerce Shopsoftware ist kostenlos, aber nicht umsonst.
    Spenden
  • Damit wir die modified eCommerce Shopsoftware auch zukünftig kostenlos anbieten können:
    Spenden
  • Thema: Aktive Kategorie hervorheben

    Adrian

    • Neu im Forum
    • Beiträge: 18
    Aktive Kategorie hervorheben
    am: 07. Dezember 2008, 21:09:26
    Hi,

    ich wollte gerne die aktiven Kategorien hervorheben (z.B. andere Schriftfarbe usw.).
    Einen passenden Selektor in der CSS habe ich bereits erstellet - aber wie muss ich jetzt xtc_show_category.inc.php anpassen?

    Danke im Voraus.



    Linkback: https://www.modified-shop.org/forum/index.php?topic=120.0

    Anonym

    • Gast
    Aktive Kategorie hervorheben
    Antwort #1 am: 07. Dezember 2008, 21:48:16
    Ja dann poste doch mal den Code den Du Dir angelegt hast und vorallem was genau willst Du anders machen? Verändern kann man alles aber ich muss wissen was genau Du vor hast.

    Adrian

    • Neu im Forum
    • Beiträge: 18
    Aktive Kategorie hervorheben
    Antwort #2 am: 07. Dezember 2008, 22:15:13
    Hmm.. also als Beispiel der WerkzeugProfi-24.

    Hier werden die aktiven Kategorien nach dem "anklicken" orange markiert - so eine Lösung versuche ich zu konstruieren.

    Also habe ich in der xtc_show_category.inc.php  (wo auch die <li class="level usw. angegeben wird) es versucht anzupassen.

    Anonym

    • Gast
    Aktive Kategorie hervorheben
    Antwort #3 am: 07. Dezember 2008, 22:20:45
    Hi..

    Mach folgendes:

    Am Ende der CSS fügst Du

    Code: CSS  [Auswählen]
    .level1 a { color:#fff; text-decoration:none; }
    .level2 a { color:#fff; text-decoration:none; }
    .level3 a { color:#fff; text-decoration:none; }
    .level1 a.current  { font-weight:bold; color:#000 }
    .level2 a.current  { font-weight:bold; color:#000 }
    .level3 a.current  { font-weight:bold; color:#000 }

    hinzu.

    Die "xtc_show_category.inc.php" komplett mit diesem Code ersetzten

    Code: PHP  [Auswählen]
    <?php
    /* -----------------------------------------------------------------------------------------
       $Id: xtc_show_category.inc.php 1262 2005-09-30 10:00:32Z mz $

       XT-Commerce - community made shopping
       <a href="http://www.(( Wir dulden keine kommerziellen Werbelinks - Bitte Forenregeln beachten! ))" rel="nofollow">http://www.(( Wir dulden keine kommerziellen Werbelinks - Bitte Forenregeln beachten! ))</a>

       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); <a href="http://www.oscommerce.com" rel="nofollow">www.oscommerce.com</a>
       (c) 2003      nextcommerce (xtc_show_category.inc.php,v 1.4 2003/08/13); <a href="http://www.nextcommerce.org" rel="nofollow">www.nextcommerce.org</a>

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


    function xtc_show_category($counter) {

    global $foo, $categories_string, $id;

    //start the loop
    for ($a=0; $a<$foo[$counter]['level']; $a++)
            {}

    if ($foo[$counter]['level']=='') //maincat
            {
            if (strlen($categories_string)=='0')
                    {
                    //$categories_string .='<ul class="navilist">';
                    }
            $categories_string .='
                    <li class="level1'
    ;
            if (xtc_has_category_subcategories($counter))
                    {
                    $categories_string .= '';
                    }
            $categories_string .= '"><a class="';
            if ( ($id) && (in_array($counter, $id)) )
                    {
                    $categories_string .= 'current';
            }
            $categories_string .= '" href="';
            }

    else //subcat
            {
            $categories_string .= '
                    <li class="level'
    .($foo[$counter]['level']+1).'"><a class="';
            if ( ($id) && (in_array($counter, $id)) )
                    {
                    $categories_string .= 'current';
            }
            $categories_string .= '" href="';
            }

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

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

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

    if (SHOW_COUNTS == 'true')
            {
            $products_in_category = xtc_count_products_in_category($counter);
            if ($products_in_category> 0)
                    {
                    $categories_string .= ' <span class="catcount">(' . $products_in_category . ')</span>';
                    }
            }

    $categories_string .= '';

    if ($foo[$counter]['next_id'])
            {
            xtc_show_category($foo[$counter]['next_id']);
            }
    else
            {
            $categories_string .= '</a></li>';
            }
    }
    ?>

    ABER!

    Du musst in Deiner CSS die Klassen /* 1st TIER */ /* 2st TIER */ usw. abändern.

    Du musst

    Code: CSS  [Auswählen]
    font-weight:bold;

    löschen und die /* 1st TIER */ /* 2st TIER */ usw li <b>a</b> müssen ganz weg

    Anonym

    • Gast
    Aktive Kategorie hervorheben
    Antwort #4 am: 07. Dezember 2008, 22:25:13
    Code: CSS  [Auswählen]
    /* 1st TIER */
    ul#categorymenu li.level1 {
            list-style-type:none;
            background-color:#DA9401;
            padding:4px 0px 4px 6px;
            border: solid #fff;
            border-width:1px 0px 0px 0px;
    }

    /* 2nd TIER */
    ul#categorymenu li.level2 {
            list-style-type:none;
            background-color:#EEA003;
            padding:4px 0px 4px 24px;
            border: solid #fff;
            border-width:1px 0px 0px 0px;
    }
    /* 3rd TIER */
    ul#categorymenu li.level3 {
            list-style-type:none;
            background-color:#EEA003;
            padding:4px 0px 4px 40px;
            border: solid #fff;
            border-width:1px 0px 0px 0px;
    }

    So sollten die dann aussehen!
    Der Effekt der jetzt eintritt ist, das du über a.current alles bestimmen kannst-
    Jedes Level1, 2, 3 kannst du anders gestalten.

    Adrian

    • Neu im Forum
    • Beiträge: 18
    Aktive Kategorie hervorheben
    Antwort #5 am: 07. Dezember 2008, 23:45:00
    Du bist ein Schatz!!! 10000x THX

    Tomcraft

    • modified Team
    • Gravatar
    • Beiträge: 46.369
    • Geschlecht:
    Aktive Kategorie hervorheben
    Antwort #6 am: 08. Dezember 2008, 11:12:06
    Na das werd ich mir auch mal anschauen... schöner Effekt!

    Marktplatz - Eine große Auswahl an neuen und hilfreichen Modulen sowie modernen Templates für die modified eCommerce Shopsoftware
    15 Antworten
    12798 Aufrufe
    17. Dezember 2013, 00:09:51 von peter_lang
    47 Antworten
    32955 Aufrufe
    07. Juli 2013, 11:39:43 von emin
    12 Antworten
    6862 Aufrufe
    15. Oktober 2011, 11:35:10 von miheha
    8 Antworten
    5736 Aufrufe
    04. April 2011, 18:54:30 von Tomcraft
               
    anything