|
|||
|
hallo,
ich habe die bestseller-box eingebaut. Funktioniert soweit ganz gut, aber nur auf der index. Wenn ich in eine Kategorie gehe, bleibt die Box am 1. Bild hängen. Woran kann das liegen? http://www.fachliteratur-buecher.de Gruß Gerdi |
|
|||
|
Der Bestseller ist abhaegig von der Kategorie.
Z.B. auf Index sucht der Box die Bestseller von allen Produkten und in einer Kategorie sucht der Box die Besteller von zur Kategorie gehoerenden Produkten. So was kann man in Admin einstellen. Wo kann ich nicht sicher sagen. Viele Gruesse |
|
|||
|
Ach, keine Einstellung in Admin.
schauen Sie bitte root/templates/xtc/source/boxes/best_sellers.php an. Die Rote ist die von Kategorie abhaengigen Besteller und die Blau ist dagegen. Viele Gruesse if (isset($current_category_id) && ($current_category_id > 0)) { $best_sellers_query = "select distinct p.products_id, p.products_price, p.products_tax_class_id, p.products_image, p.products_vpe, p.products_vpe_status, p.products_vpe_value, p.products_ean, p.products_date_added, pd.products_name from ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_DESCRIPTION." pd, ".TABLE_PRODUCTS_TO_CATEGORIES." p2c, ".TABLE_CATEGORIES." c where p.products_status = '1' and c.categories_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '".(int) $_SESSION['languages_id']."' and p.products_id = p2c.products_id ".$group_check." ".$fsk_lock." and p2c.categories_id = c.categories_id and '".$current_category_id."' in (c.categories_id, c.parent_id) order by p.products_ordered desc limit ".MAX_DISPLAY_BESTSELLERS; } else { $best_sellers_query = "select distinct p.products_id, p.products_image, p.products_price, p.products_vpe, p.products_vpe_status, p.products_vpe_value, p.products_ean, p.products_date_added, p.products_tax_class_id, pd.products_name from ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_DESCRIPTION." pd where p.products_status = '1' ".$group_check." and p.products_ordered > 0 and p.products_id = pd.products_id ".$fsk_lock." and pd.language_id = '".(int) $_SESSION['languages_id']."' order by p.products_ordered desc limit ".MAX_DISPLAY_BESTSELLERS; } |
|
|||
|
Vielleicht habe ich falsch verstanden.
Erst versuchen Sie bitte, die Besteller ohne MARQUE darzustellen, damit man erkennen kann, woran das Problem liegt. Wenn das Query von Besteller tatsaechlich problematisch ist, posten Sie bitte die best_seller.php datei. Viele Gruesse Geändert von Ralf-Peter (11.03.2008 um 18:35 Uhr) |
|
|||
|
hier der code:
Code:
// reset var
$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'].$current_category_id;
}
if (!$box_smarty->is_cached(CURRENT_TEMPLATE.'/boxes/box_best_sellers.html', $cache_id) || !$cache) {
$box_smarty->assign('tpl_path', 'templates/'.CURRENT_TEMPLATE.'/');
// include needed functions
require_once (DIR_FS_INC.'xtc_row_number_format.inc.php');
//fsk18 lock
$fsk_lock = '';
if ($_SESSION['customers_status']['customers_fsk18_display'] == '0') {
$fsk_lock = ' and p.products_fsk18!=1';
}
if (GROUP_CHECK == 'true') {
$group_check = " and p.group_permission_".$_SESSION['customers_status']['customers_status_id']."=1 ";
}
if (isset($current_category_id) && ($current_category_id > 0)) {
$best_sellers_query = "select distinct
p.products_id,
p.products_price,
p.products_tax_class_id,
p.products_image,
p.products_vpe,
p.products_vpe_status,
p.products_vpe_value,
p.products_ean,
p.products_date_added,
pd.products_name from ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_DESCRIPTION." pd, ".TABLE_PRODUCTS_TO_CATEGORIES." p2c, ".TABLE_CATEGORIES." c
where p.products_status = '1'
and c.categories_status = '1'
and p.products_ordered > 0
and p.products_id = pd.products_id
and pd.language_id = '".(int) $_SESSION['languages_id']."'
and p.products_id = p2c.products_id
".$group_check."
".$fsk_lock."
and p2c.categories_id = c.categories_id and '".$current_category_id."'
in (c.categories_id, c.parent_id)
order by p.products_ordered desc limit ".MAX_DISPLAY_BESTSELLERS;
}
else
{
$best_sellers_query = "select distinct
p.products_id,
p.products_image,
p.products_price,
p.products_vpe,
p.products_vpe_status,
p.products_vpe_value,
p.products_tax_class_id,
pd.products_name from ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_DESCRIPTION." pd
where p.products_status = '1'
".$group_check."
and p.products_ordered > 0
and p.products_id = pd.products_id ".$fsk_lock."
and pd.language_id = '".(int) $_SESSION['languages_id']."'
order by p.products_ordered desc limit ".MAX_DISPLAY_BESTSELLERS;
}
$best_sellers_query = xtDBquery($best_sellers_query);
if (xtc_db_num_rows($best_sellers_query, true) >= MIN_DISPLAY_BESTSELLERS) {
$rows = 0;
$box_content = array ();
while ($best_sellers = xtc_db_fetch_array($best_sellers_query, true)) {
$rows ++;
$image = '';
$best_sellers = array_merge($best_sellers, array ('ID' => xtc_row_number_format($rows)));
$box_content[] = $product->buildDataArray($best_sellers);
}
$box_smarty->assign('box_content', $box_content);
}
// set cache ID
if (!$cache) {
if ($box_content!='') {
$box_best_sellers = $box_smarty->fetch(CURRENT_TEMPLATE.'/boxes/box_best_sellers.html');
}
} else {
$box_best_sellers = $box_smarty->fetch(CURRENT_TEMPLATE.'/boxes/box_best_sellers.html', $cache_id);
}
$smarty->assign('box_BESTSELLERS', $box_best_sellers);
}
?>
|
|
|||
|
Naja, ich finde keinen Fehler.
Ich vermute, dass nur 1 Buch in einigen Kategorien verkauft wurde und daher nur 1 Bestseller angezeigt wird. Viele Gruesse Geändert von Ralf-Peter (11.03.2008 um 18:55 Uhr) |
|
|||
|
Ich habe die Erfahrung gemacht, dass die Bestsellerbox , wenn sie scrollen soll, in verschiedenen Browsern eine unterschiedliche Funktion hat.
im FireFox läuft der scroll von z.B. 1-5 , dann ruckt es und beginnt sofort wieder bei ein. Hingegen im Internet Explorer läuft es geschmeidig durch und beginnt von unten wieder mit 1 hochlaufend. Bei Gerdi läuft der Bestseller schön von unten nach oben durch. Ansicht halt via IE (oder Gerdi hat es mittlerweile mit der Einstellung hinbekommen) |
![]() |
| Lesezeichen |
| Stichworte |
| bestsellerbox, ruckt |
| Themen-Optionen | |
| Ansicht | |
|
|
Ähnliche Themen
|
||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| Box Bestseller wird nicht Angezeigt | climbo | Installation und Konfiguration | 3 | 12.05.2008 19:45 |