Zurück   xt:Commerce Webshop Shop Support > xt:Commerce Shopsoftware Community Area > Template System

Antwort
 
LinkBack Themen-Optionen Ansicht
  #1 (permalink)  
Alt 13.04.2004, 16:34
xt:Commerce Support Kunde
 
Registriert seit: 08.09.2003
Beiträge: 645
Standard

hallo,

kann mir jemand einen hinweis oder l?sungsansatz daf?r geben, wie ich das template so anpassen kann, dass IMMER alle Kategorien in der box sichtbar sind?

sch?ne gr??e p3e
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #2 (permalink)  
Alt 13.04.2004, 16:35
Benutzerbild von mzanier
xt:Commerce GmbH, Geschäftsführung
 
Registriert seit: 18.04.2003
Beiträge: 27.414
Standard

da musst du schon die funktion selbst umprogrammieren.
__________________
xt:Commerce Helpdesk
xt:Commerce Blog

xt:Commerce Warenwirtschaft

###

Offene Stellen bei xt:Commerce!
xt:Commerce stellt ein
###
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #3 (permalink)  
Alt 13.04.2004, 16:51
xt:Commerce Support Kunde
 
Registriert seit: 08.09.2003
Beiträge: 645
Standard

ist das die: xtc_show_category.inc.php ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #4 (permalink)  
Alt 13.04.2004, 16:56
Benutzerbild von mzanier
xt:Commerce GmbH, Geschäftsführung
 
Registriert seit: 18.04.2003
Beiträge: 27.414
Standard

jo.

schau einfach mal die funktion

xtc_get_category_tree()

an, die erzeugt einen kompletten baum.
__________________
xt:Commerce Helpdesk
xt:Commerce Blog

xt:Commerce Warenwirtschaft

###

Offene Stellen bei xt:Commerce!
xt:Commerce stellt ein
###
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #5 (permalink)  
Alt 15.04.2004, 00:19
xt:Commerce Support Kunde
 
Registriert seit: 08.09.2003
Beiträge: 645
Standard

so, jetzt hab ich es wie ich es wollte. :bounce:

sch?nen dank an mario f?r den hinweis, da war ja einiges zu ?ndern in xtc_show_category.inc.php und category.php

zur hilfe habe ich mir noch einige osc-contributions zu diesem thema angesehen und in einem auch noch "Bullet Images for Categories" integriert.

wenn interesse besteht, kann ich das gerne auch zum download zur verf?gung stellen. brauche dann aber noch ein wenig zeit um den code etwas zu s?ubern.

gute nacht p3e
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #6 (permalink)  
Alt 15.04.2004, 01:01
Benutzerbild von Elanor  
Registriert seit: 04.01.2004
Beiträge: 149
Ausrufezeichen

Hallo,

also an L?sungsvarianten besteht glaub ich immer Bedarf

Viele Gr?sse

Andi
:dafuer:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #7 (permalink)  
Alt 15.04.2004, 02:17
 
Registriert seit: 23.03.2004
Beiträge: 33
Standard

Jo, immer her damit,
das kann man immer gebrauchen. :bounce:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #8 (permalink)  
Alt 15.04.2004, 21:09
xt:Commerce Support Kunde
 
Registriert seit: 08.09.2003
Beiträge: 645
Standard

ist versprochen, mu? noch ne kleine verbesserung einbauen.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #9 (permalink)  
Alt 19.04.2004, 15:31
xt:Commerce Support Kunde
 
Registriert seit: 08.09.2003
Beiträge: 645
Standard

so, war die letzten tage nicht mehr dazu gekommen, aber versprochen ist versprochen.
f?r die anpassung habe ich mir die osc-contributions

Add Bullet Images for Categories Infobox v1.0 (12/09/2002)
by Toby Adams <toby@opticalfunk.co.uk

All Categories V1.7 (06/17/2003)
by Christian Lescuyer <cl@goelette.net>

und

hw_categories.php_v0.2 (22.06.2003)
FrankW <Daywalker@Hawkweb.de>

als vorlage genommen und das ganze f?r xtc rc1 angepasst.


es sind zwei dateien im templateordner zu ?ndern (achtung! erst neuen templateordner anlegen und template reinkopieren, damit bei nichtgefallen problemlos zur?ckgeschaltet werden kann!!):

1. categories.php

den code durch folgenden ersetzen:
Code:
<?php
/* -----------------------------------------------------------------------------------------
 ? $Id: categories.php,v 1.3 2004/03/16 14:59:01 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 (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
 ? Add Bullet Images for Categories Infobox v1.0 (12/09/2002) ?by Toby Adams <toby@opticalfunk.co.uk
 ? All Categories V1.7 (06/17/2003) ?	by Christian Lescuyer <cl@goelette.net>
 ? hw_categories.php_v0.2 (22.06.2003) ?FrankW <Daywalker@Hawkweb.de> 


 ? Released under the GNU General Public License
 ? ---------------------------------------------------------------------------------------*/
// reset var
$box_smarty = new smarty;
$box_content='';
$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_ids LIKE '%c_".$_SESSION['customers_status']['customers_status_id']."_group%'";
 ?}
 ?$categories_query = xtc_db_query("select c.categories_id,
 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cd.categories_name,
 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? c.parent_id from " .
 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? TABLE_CATEGORIES . " c, " .
 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? TABLE_CATEGORIES_DESCRIPTION . " cd
 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? where c.categories_status = '1'
 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ".$group_check."
 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? and c.categories_id = cd.categories_id
 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? and cd.language_id='" . (int)$_SESSION['languages_id'] ."'
 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? order by sort_order, cd.categories_name");

 ?while ($categories = xtc_db_fetch_array($categories_query)) ?{
 ? ?$foo[$categories['categories_id']] = array(
 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'name' => $categories['categories_name'],
 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'parent' => $categories['parent_id']);


 ?}


 ?xtc_show_category(0, 0, $foo, '');


 ? ?$box_smarty->assign('BOX_CONTENT', $categories_string);
 ?$box_smarty->assign('language', $_SESSION['language']);
 ? ? ? // set cache ID
 ?if (USE_CACHE=='false') {
 ?$box_smarty->caching = 0;
 ?$box_categories= $box_smarty->fetch(CURRENT_TEMPLATE.'/boxes/box_categories.html');
 ?} else {
 ?$box_smarty->caching = 1;
 ?$box_smarty->cache_lifetime=CACHE_LIFETIME;
 ?$box_smarty->cache_modified_check=CACHE_CHECK;
 ?$cache_id = $_SESSION['language'].$_GET['cPath'];
 ?$box_categories= $box_smarty->fetch(CURRENT_TEMPLATE.'/boxes/box_categories.html',$cache_id);
 ?}

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

?>
2. xtc_show_category.inc.php

Code:
<?php
/* -----------------------------------------------------------------------------------------
 ? $Id: xtc_show_category.inc.php,v 1.2 2004/02/22 16:15:30 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
 ? -----------------------------------------------------------------------------------------
 ? Third Party contributions:
 ? Add Bullet Images for Categories Infobox v1.0 (12/09/2002) ?by Toby Adams <toby@opticalfunk.co.uk
 ? All Categories V1.7 (06/17/2003) ?	by Christian Lescuyer <cl@goelette.net>
 ? hw_categories.php_v0.2 (22.06.2003) ?FrankW <Daywalker@Hawkweb.de> 

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


 ?function xtc_show_category($cid, $level, $foo, $cpath) {
 ? ?global ?$categories_string, $HTTP_GET_VARS;


	$tpl_path='templates/'.CURRENT_TEMPLATE;
	if ($cid != 0) {
	// 1.7 Get the current path info
 ?	$category_path = explode('_',$HTTP_GET_VARS['cPath']);
 ?	$in_path = in_array($cid, $category_path);
 ?	$this_category = array_pop($category_path);

 ? ?for ($a=0; $a<$level; $a++)
 ?	// 1.7 only indent subcategories (top level are flush left)
 ? ?if ($a>0) {
 ? ?	$categories_string .= ?'';
 ? ?}
 ? ?// 1.7 indicate the current category
 ? ?if ($this_category == $cid) {
 ? ? ?	// 1.6 Are we on the "path" to selected category? If yes, use <b>
 ? ? ?	if ($in_path) {
 ? ? ?$categories_string .= ?'<img src='.$tpl_path.'/img/cat_arrow_other.gif align="absmiddle"><font color="#006600"><b>';
 ? ? ?	} else {
 ? ? ?$categories_string .= ?'<img src='.$tpl_path.'/img/cat_arrow_down.gif align="absmiddle">';
 ? ?	}
 ? ? ?	$categories_string .= ?$foo[$cid]['name'];
 ? ? ?	if ($in_path)
 ? ? ? ?$categories_string .= ?'</b></font>';
 ? ? ?	// 1.7 ?don't link the current category
 ? ? ?	if ($this_category != $cid) {
 ? ? ? ?$categories_string .= '</a>';
 ? ? ?	}
 ? ?}

 ? ?// 1.7 ?don't link the current category
 ? ?if ($this_category != $cid) {
 ? ?	if (xtc_has_category_subcategories($cid)) {
 ? ? ? ? ?// 1.6 Are we on the "path" to selected category? If yes, use <b>
 ? ? ? ? ?if ($in_path) {
 ? ? ? ?	$categories_string .= ?'<a href="' . xtc_href_link(FILENAME_DEFAULT, 'cPath=' . $cpath . $cid) . '"><img src='.$tpl_path.'/img/cat_arrow_active.gif align="absmiddle" border=0><font color="#006600"><b>';
 ? ? ? ? ?} else {
 ? ? ? ?	$categories_string .= ?'<a href="' . xtc_href_link(FILENAME_DEFAULT, 'cPath=' . $cpath . $cid) . '"><img src='.$tpl_path.'/img/cat_arrow_down.gif align="absmiddle" border=0>';
 ? ? ? ?}
 ? ?	} else {
 ? ? ? ? ?// 1.6 Are we on the "path" to selected category? If yes, use <b>
 ? ? ? ? ?if ($in_path) {
 ? ? ? ?	$categories_string .= ?'<a href="' . xtc_href_link(FILENAME_DEFAULT, 'cPath=' . $cpath . $cid) . '"><img src='.$tpl_path.'/img/cat_arrow_active.gif align="absmiddle" border=0><font color="#006600"><b>';
 ? ? ? ? ?} else {
 ? ? ? ?	$categories_string .= ?'<a href="' . xtc_href_link(FILENAME_DEFAULT, 'cPath=' . $cpath . $cid) . '"><img src='.$tpl_path.'/img/cat_arrow_right.gif align="absmiddle" border=0>';
 ? ? ? ?}
 ? ?	}
 ? ? ?	$categories_string .= ?$foo[$cid]['name'];
 ? ? ?	if ($in_path)
 ? ? ? ?$categories_string .= ?'</b></font>';
 ? ? ?	// 1.7 ?don't link the current category
 ? ? ?	if ($this_category != $cid) {
 ? ? ? ?$categories_string .= '</a>';
 ? ? ?	}
 ? ?}
 ?// 1.4 SHOW_COUNTS is 'true' or 'false', not true or false
 ? ?	if (SHOW_COUNTS == 'true') {
 ? ? ?$products_in_category = xtc_count_products_in_category($cid);
 ? ? ?if ($products_in_category > 0) {
 ? ? ?	$categories_string .= '(' . $products_in_category . ')';
 ? ? ?}
 ? ?	}
 ? ?$categories_string .= '<br>' ."\n";
 ? ?	}

// Traverse category tree
 ?	foreach ($foo as $key => $value) {
 ? ?if ($foo[$key]['parent'] == $cid) {
 ? ?	xtc_show_category($key, $level+1, $foo, ($level != 0 ? $cpath . $cid . '_' : ''));
 ? ?}
 ?	}
 ?}
?>

dann noch geeignete gif's (cat_arrow_active.gif, cat_arrow_down.gif, cat_arrow_other.gif und cat_arrow_right.gif) in den img-ordner des templates legen und fertig :]

viel spass damit

p3e
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #10 (permalink)  
Alt 29.09.2004, 14:31
Benutzerbild von ahersch  
Registriert seit: 09.09.2004
Beiträge: 13
Standard

Ich muss den Thread leider nochmal rauskramen :i:

Ich habe die ?nderungen wie beschrieben durchgef?hrt, allerdings zerrei?t es mir dann das komplette Layout, besonder wenn ich auf eine der Unterkategorien klicke:
http://www.tweakingshop.de/xtc/

Der Header und der Navtrail werden hier quasi komplett ?ber die linke Navigationsleiste gequetscht. Kann mir jemand sagen, wo hier der Fehler liegt? Habe sonst keine Dateien ver?ndert

XTC Version 3.0.1

edit: Es zerschie?t nicht nur das Layout, ich kann generell nicht mehr mit dem Shop interagieren, sprich Kontakt, Login, Newsletter usw. f?hren zu einer Fehlermeldung:
Warning: Cannot modify header information - headers already sent by (output started at [...]/xtc/templates/xtc2/source/inc/xtc_show_category.inc.php:2) in [...]/xtc/inc/xtc_redirect.inc.php on line 28

Habs mal wieder rausgenommen, aber ich brauche noch eine L?sung f?r das Problem. Kann mir jemand sagen, wie ich das Skript an V3.0.1 anpassen kann?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
Antwort

Lesezeichen

Stichworte
kategorien, sichtbar, unterkategorien

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



Alle Zeitangaben in WEZ +1. Es ist jetzt 08:43 Uhr.

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

xt:Commerce is a SafeCharge brand