#1 (permalink)  
Alt 03.07.2005, 13:32
 
Registriert seit: 03.07.2005
Beiträge: 10
Standard

Hallo,

ich habe den Counter wie unten beschrieben eingebaut. Funktioniert eigentlich auch alles, nur bekomme ich in der ?bersicht nur die Produkt Seiten richtig Alle anderen Seiten werden als kompletter Link angezeiget. d.h. es efolgt keine Umwandlung nach "Kategorie xxxx"

Woran kann das nur leigen, hat das jemand wie unten beschrieben zum laufen bekommen?

Zitat:
QUOTE (xxxChristophxxx @ Feb 14 2005, 00:08 AM)
Du kannst den Code auch in die index.php einbauen. Kopier einfach nach

QUOTE
include( 'includes/application_top.php');


den Code, der dir die Einbindunghilfe des Counters ausgibt.



Wir haben den chCounter jetzt auch eingebaut, der gibt ja eine Menge an Informationen.

Allerdings erscheint es uns einigerma?en sinnlos (obwohl am bequemsten), den einfach in die "header.php" oder "application_top.php" einzubauen, da man damit nur die Aufrufe z?hlt, und keine weitergehende Information erh?lt.

Da uns aber mehr interessiert, welche Kategorien und Produkte angesehen werden, haben wir die Stellen in xtCommerce gesucht, an denen man den Counter einbauen muss, um das zu erreichen.

Damit erh?lt man dann einen sehr guten und detaillierten ?berblick ?ber die Aufrufe der Kategorien und Produkte. Vor allem auch mit einem sinnvollen Titel der Seite im Klartext angezeigt (in der Form 'Kategorie-Seite Meine Kategorie xxx' oder 'Produktseite Mein Produkt xxx'), und nicht nur mit kryptischen Seitenverweisen (wie z.B. "index.php/cPath=5" oder ?hnlichem).

Folgende ?nderungen sind notwendig:

Anmerkung:

Diese ?nderungen gehen davon aus, dass die Counter-Software im Verzeichnis "chCounter" im xtCommerce-Verzeichnis liegt (wie z.B. auch das "admin"-Verzeichnis"!

Ist das nicht der Fall, dann m?ssen die folgenden "include('.....chCounter/counter.php')"-Anweisungen entsprechend angepasst werden!

================================================== ==============================
===============================================
In Modul index.php


CODE

// the following cPath references come from application_top.php
$category_depth = 'top';
if (isset($cPath) && xtc_not_null($cPath)) {
$categories_products_query = xtc_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . $current_category_id . "'");
$categories_products = xtc_db_fetch_array($categories_products_query);
if ($categories_products['total'] > 0) {
$category_depth = 'products'; // display products
} else {
$category_parent_query = xtc_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . $current_category_id . "'");
$category_parent = xtc_db_fetch_array($category_parent_query);
if ($category_parent['total'] > 0) {
$category_depth = 'nested'; // navigate through the categories
} else {
$category_depth = 'products'; // category has no products, but display the 'no products' message
}
}
}





ersetzen durch


CODE

// the following cPath references come from application_top.php
// W. Kaiser chCounter inclusion
$chCounter_page_title = '';
$SQLWhere = " where categories_id = '" . $current_category_id . "'";
$SQLSelect_Category = "select categories_name from ". TABLE_CATEGORIES_DESCRIPTION . $SQLWhere;
// W. Kaiser chCounter inclusion
$category_depth = 'top';
if (isset($cPath) && xtc_not_null($cPath)) {
$categories_products_query = xtc_db_query("select count(*) as total from ".
TABLE_PRODUCTS_TO_CATEGORIES . $SQLWhere);
$categories_products = xtc_db_fetch_array($categories_products_query);
if ($categories_products['total'] > 0) {
$category_depth = 'products'; // display products

// W. Kaiser chCounter inclusion
// Count category-listing page for category w i t h products
$categories_query = xtc_db_query($SQLSelect_Category);
$categories = xtc_db_fetch_array($categories_query);
$chCounter_page_title = 'Kategorie-Seite ' . $categories['categories_name'];
// W. Kaiser chCounter inclusion

} else {
$category_parent_query = xtc_db_query("select count(*) as total from " . TABLE_CATEGORIES .
" where parent_id = '" . $current_category_id . "'");
$category_parent = xtc_db_fetch_array($category_parent_query);
if ($category_parent['total'] > 0) {
$category_depth = 'nested'; // navigate through the categories

/*
// W. Kaiser chCounter inclusion
// If you want to count the category-listing pages for categories w i t h o u t products too.
// then remove the comments before and after this text!
$categories_query = xtc_db_query($SQLSelect_Category );
$categories = xtc_db_fetch_array($categories_query);
$chCounter_page_title = 'Kategorie-Seite ' . $categories['categories_name'];
*/

} else {
$category_depth = 'products'; // category has no products, but display the 'no products' message
}
}
}
else
{
if (!isset($_SESSION['chCounter_start']))
{
// Count start-page (only count once!)
$_SESSION['chCounter_start'] = true;
$chCounter_page_title = 'Shop Start-Seite';
}
}
if ($chCounter_page_title != '')
{
$chCounter_visible = 0;
include('chCounter/counter.php');
}
// W. Kaiser chCounter inclusion





================================================== ==============================
===============================================
In Modul includes\modules\product_info.php

Vor


CODE

$info_smarty->assign('FORM_ACTION',xtc_href_link(FILENAME_PRODU CT_INFO, xtc_get_all_get_params(array('action')) . 'action=add_product'));





einf?gen


CODE

// W. Kaiser chCounter inclusion
// Count product page selected
$chCounter_visible = 0;
$chCounter_page_title = 'Produkt-Seite ' . $product_info['products_name'];
include('../../chCounter/counter.php');
// W. Kaiser chCounter inclusion






================================================== ==============================
===============================================

Die Verwendung erfolgt auf eigene Gefahr, wir ?bernehmen keinerlei Gew?hrleistung f?r die Fehlerfreiheit dieser ?nderungen.

Vor allen ?nderungen unbedingt den Originalzustand sichern!.


Nach zwei Hinweise zum Einbau des "chCounter"

=================================================

Im Code von "includes\modules\product_info.php" gab es einen Fehler:

In Modul includes\modules\product_info.php

include('../../chCounter/counter.php');

ersetzen durch

include('chCounter/counter.php');

=================================================

In den chCounter-Einstellungen sollte folgende ?nderung gemacht werden:

In Admin->Einstellungen->Allgemein an des Ende der Query-String-Variablen anf?gen: ; XTCsid; page. (Insbsondere "page" ist wichtig, da sonst jede Seite einer Kategorie einzeln gez?hlt wird.)



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
Antwort

Lesezeichen

Stichworte
counter, einbindung, probleme

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 04:26 Uhr.

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

xt:Commerce is a SafeCharge brand