3
3
// -----------------------------------------------------------------------------------
4
4
GUNNART "SHOW_CATEGORY ADVANCED"
5
5
6
- erweiterte Kategorien-Navigation f?r xt:Commerce 3.04 SP1 / SP2.1
6
+ erweiterte Kategorien-Navigation für xt:Commerce 3.04 SP1 / SP2.1
7
7
8
8
Proudly togetherfummeled by Gunnar Tillmann
9
9
http://www.gunnart.de
17
17
// -----------------------------------------------------------------------------------
18
18
$ CatConfig = array (
19
19
20
- // Bis zu welcher Ebene soll der Kategorien-Baum standardm䟩g
20
+ // Bis zu welcher Ebene soll der Kategorien-Baum standardmäßig
21
21
// aufgeklappt sein?
22
22
// false, wenn er komplett ausgeklappt sein soll.
23
23
'MaxLevel ' => SUPERFISHMENU_MAXLEVEL ,
24
24
25
25
// Leere Kategorien verstecken? true: ja, false: nein
26
26
'HideEmpty ' => false ,
27
27
28
- // D?rfen aktive Kategorien weitere Unterkategorien aufklappen lassen?
28
+ // Dürfen aktive Kategorien weitere Unterkategorien aufklappen lassen?
29
29
'ShowAktSub ' => false ,
30
30
31
31
// Kategorien-Tiefe: Wie soll die CSS-Klasse benannt werden?
45
45
'MarkSubMenue ' => true ,
46
46
'SubMenueCss ' => 'haschild ' ,
47
47
48
- // Automatische Zuteilung einer CSS-ID (f?r den Listenpunkt)
48
+ // Automatische Zuteilung einer CSS-ID (für den Listenpunkt)
49
49
'ShowCssIdList ' => true ,
50
50
'CssPrefixList ' => 'Cat ' ,
51
51
52
- // Automatische Zuteilung einer CSS-ID (f?r den Link)
52
+ // Automatische Zuteilung einer CSS-ID (für den Link)
53
53
'ShowCssIdLink ' => true ,
54
54
'CssPrefixLink ' => 'CatLi ' ,
55
55
56
- // Darstellung Produktz䨬ung , falls eingeschaltet
56
+ // Darstellung Produktzählung , falls eingeschaltet
57
57
'CountPre ' => ' <span class="badge"> ' ,
58
58
'CountAfter ' => '</span> ' ,
59
59
60
- // Tags auߥrhalb des Links?
60
+ // Tags außerhalb des Links?
61
61
'LinkPre ' => false , // z.B. '<div>',
62
62
'LinkAfter ' => false , // z.B. '</div>',
63
63
64
64
// Tags innerhalb des Links?
65
65
'NamePre ' => false , // z.B. '<span>',
66
66
'NameAfter ' => false , // z.B. '</span>',
67
67
68
- // Soll die ܢerschrift nach Css-Markern ࠬa {#class:EinName#}
68
+ // Soll die Überschrift nach Css-Markern à la {#class:EinName#}
69
69
// durchsucht werden? So kann man z.B. einzelne
70
70
// Links speziell gestalten.
71
71
'CssMarkersToList ' => false , // Gefundene Marker zur Liste?
78
78
79
79
80
80
// -----------------------------------------------------------------------------------
81
- // Findet heraus, ob Kategorie $category_id aktive (und f?r die Kundengruppe
82
- // zugelassene) Artikel enth䬴 .
81
+ // Findet heraus, ob Kategorie $category_id aktive (und für die Kundengruppe
82
+ // zugelassene) Artikel enthält .
83
83
// -----------------------------------------------------------------------------------
84
84
// Im Gegensatz zu xtc_count_products_in_category()
85
- // werden hierbei die Berechtigungen und der FSK-Status gepr?ft .
85
+ // werden hierbei die Berechtigungen und der FSK-Status geprüft .
86
86
// -----------------------------------------------------------------------------------
87
87
function countProductsInCat ($ category_id ) {
88
88
@@ -166,11 +166,11 @@ function xtc_show_category_superfish($cid, $level, $foo, $cpath, $megacats) {
166
166
167
167
$ CatConfig ['MaxLevel ' ] = intval ($ CatConfig ['MaxLevel ' ]);
168
168
169
- // 1) Z䨬en ist nicht immer n?
169
+ // 1) Zählen ist nicht immer nötig
170
170
if ($ CatConfig ['HideEmpty ' ] || SHOW_COUNTS == 'true ' )
171
171
$ pInCat = countProductsInCat ($ cid );
172
172
173
- // 2) ܢerpr?fen , ob Kategorie Produkte enth䬴
173
+ // 2) Überprüfen , ob Kategorie Produkte enthält
174
174
if ($ CatConfig ['HideEmpty ' ]) {
175
175
$ Empty = true ;
176
176
if ($ pInCat > 0 )
@@ -179,7 +179,7 @@ function xtc_show_category_superfish($cid, $level, $foo, $cpath, $megacats) {
179
179
$ Empty = false ;
180
180
}
181
181
182
- // 3) ܢerpr?fen , ob Kategorie gezeigt werden soll
182
+ // 3) Überprüfen , ob Kategorie gezeigt werden soll
183
183
$ Show = false ;
184
184
if ($ CatConfig ['HideEmpty ' ]) {
185
185
if (!$ Empty )
@@ -188,7 +188,7 @@ function xtc_show_category_superfish($cid, $level, $foo, $cpath, $megacats) {
188
188
$ Show = true ;
189
189
}
190
190
191
- // 3) ܢerpr?fen , ob Unterkategorien gezeigt werden sollen
191
+ // 3) Überprüfen , ob Unterkategorien gezeigt werden sollen
192
192
$ ShowSub = false ;
193
193
if ($ CatConfig ['MaxLevel ' ]) {
194
194
if ($ level < $ CatConfig ['MaxLevel ' ])
@@ -274,7 +274,7 @@ function xtc_show_category_superfish($cid, $level, $foo, $cpath, $megacats) {
274
274
$ ListClass [] = $ CatConfig ['SubMenueCss ' ];
275
275
}
276
276
277
- // Quelltext einr?cken
277
+ // Quelltext einrücken
278
278
$ Tabulator = str_repeat ("\t" ,$ level +1 );
279
279
280
280
if ($ CatConfig ['ShowCssIdList ' ]) {
@@ -285,7 +285,7 @@ function xtc_show_category_superfish($cid, $level, $foo, $cpath, $megacats) {
285
285
$ LinkID [] = $ CatConfig ['CssPrefixLink ' ].$ cid ;
286
286
}
287
287
288
- // Karl MegaKlasse und Pr?fung , ob Link in Megacats
288
+ // Karl MegaKlasse und Prüfung , ob Link in Megacats
289
289
$ MegaClass = '' ;
290
290
if (is_array ($ megacats ) && in_array ($ cid , $ megacats )) {
291
291
$ MegaClass = $ ListClass [] = ' mega ' ;
@@ -310,8 +310,8 @@ function xtc_show_category_superfish($cid, $level, $foo, $cpath, $megacats) {
310
310
$ Pre2 = "</li> \n" ;
311
311
$ Pre3 = "</li> \n" ;
312
312
if ($ old_level > $ level ) {
313
- // Listenpunkte schlieߥn
314
- // Quelltext einr?cken
313
+ // Listenpunkte schließen
314
+ // Quelltext einrücken
315
315
for ($ counter = 0 ; $ counter < $ old_level - $ level ; $ counter ++) {
316
316
$ Pre .= str_repeat ("\t" , $ old_level - $ counter +1 )."</ul> \n" .str_repeat ("\t" , $ old_level - $ counter )."</li> \n" ;
317
317
$ Pre2 .= str_repeat ("\t" , $ old_level - $ counter +1 )."</ul> \n" .str_repeat ("\t" , $ old_level - $ counter )."</li> \n" ;
@@ -336,20 +336,20 @@ function xtc_show_category_superfish($cid, $level, $foo, $cpath, $megacats) {
336
336
337
337
// Karl Anpassung an Bootstrap
338
338
if ($ foo [$ cid ]['subcats ' ] && $ level < 2 && (empty ($ CatConfig ['MaxLevel ' ]) || (!empty ($ CatConfig ['MaxLevel ' ]) && $ level < $ CatConfig ['MaxLevel ' ]))) {
339
- $ caret = '<span class="caret"></span> ' ; // Karl Caret hinzuf?gen
339
+ $ caret = '<span class="caret"></span> ' ; // Karl Caret hinzufügen
340
340
} elseif ($ foo [$ cid ]['subcats ' ] && $ level > 1 && !$ MegaClass && (empty ($ CatConfig ['MaxLevel ' ]) || (!empty ($ CatConfig ['MaxLevel ' ]) && $ level < $ CatConfig ['MaxLevel ' ]))) {
341
- $ caret = '<span class="caret-right"></span> ' ; // Karl Caret ab Level 2 hinzuf?gen
341
+ $ caret = '<span class="caret-right"></span> ' ; // Karl Caret ab Level 2 hinzufügen
342
342
} else {
343
- $ caret = '' ; // Karl Caret hinzuf?gen
343
+ $ caret = '' ; // Karl Caret hinzufügen
344
344
}
345
345
346
346
if ($ foo [$ cid ]['subcats ' ] && (empty ($ CatConfig ['MaxLevel ' ]) || (!empty ($ CatConfig ['MaxLevel ' ]) && $ level < $ CatConfig ['MaxLevel ' ]))){
347
- $ ListClass = $ level < 2 ? str_replace ('class=" ' ,'class="dropdown ' ,$ ListClass ) : str_replace ('class=" ' ,'class="dropdown dropdown-submenu ' ,$ ListClass ); // Karl Dropdownklasse einf?gen
347
+ $ ListClass = $ level < 2 ? str_replace ('class=" ' ,'class="dropdown ' ,$ ListClass ) : str_replace ('class=" ' ,'class="dropdown dropdown-submenu ' ,$ ListClass ); // Karl Dropdownklasse einfügen
348
348
}
349
349
// Karl Ende
350
350
// Listenpunkte zusammensetzen
351
351
352
- // $categories_string2 wird nur f?r Responsivemen? gebraucht
352
+ // $categories_string2 wird nur für Responsivemenü gebraucht
353
353
if (RESPONSIVEMENU === true && MMENU === false ) $ categories_string2 .= $ Pre2 .
354
354
$ Tabulator .
355
355
'<li id="li ' .$ cid .'" ' .$ ListClass2 .'> ' .$ CatConfig ['LinkPre ' ].
@@ -360,7 +360,7 @@ function xtc_show_category_superfish($cid, $level, $foo, $cpath, $megacats) {
360
360
str_replace ('pull-right ' ,'' , $ ProductsCount ).'</a> ' .
361
361
$ CatConfig ['LinkAfter ' ];
362
362
363
- // $categories_string3 wird nur f?r Mmen? gebraucht
363
+ // $categories_string3 wird nur für Mmenü gebraucht
364
364
if (MMENU === true ) $ categories_string3 .= $ Pre3 .
365
365
$ Tabulator .
366
366
'<li ' .$ ListClass2 .'> ' .$ CatConfig ['LinkPre ' ].
@@ -474,7 +474,7 @@ function xtc_show_category_superfish($cid, $level, $foo, $cpath, $megacats) {
474
474
475
475
}
476
476
477
- // f?r den n䣨sten Durchgang ...
477
+ // für den nächsten Durchgang ...
478
478
$ old_level = $ level ;
479
479
480
480
// Unterkategorien durchsteppen
@@ -506,7 +506,7 @@ function xtc_show_category_superfish($cid, $level, $foo, $cpath, $megacats) {
506
506
$ CatNaviEnd .= "</li> \n" ;
507
507
if ($ old_level - $ counter > 0 )
508
508
$ CatNaviEnd .= str_repeat ("\t" , ($ old_level +2 - $ counter )-1 );
509
- // ?bernommen in Templatedatei damit die Links Angebote und neue Artikel eingef?gt werden k?n
509
+ // übernommen in Templatedatei damit die Links Angebote und neue Artikel eingefügt werden können
510
510
// $CatNaviEnd .= str_repeat("\t", $old_level+2 - $counter)."</ul>\n";
511
511
$ categories_string = $ CatNaviStart .$ categories_string .$ CatNaviEnd ;
512
512
$ categories_string2 = $ categories_string2 .$ CatNaviEnd ;
0 commit comments