Guest Gerdi Posted March 11, 2008 Report Share Posted March 11, 2008 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 Link to comment Share on other sites More sharing options...
Ralf-Peter Posted March 11, 2008 Report Share Posted March 11, 2008 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 Link to comment Share on other sites More sharing options...
Ralf-Peter Posted March 11, 2008 Report Share Posted March 11, 2008 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; } Link to comment Share on other sites More sharing options...
Guest Gerdi Posted March 11, 2008 Report Share Posted March 11, 2008 hallo, @ralf-Peter leider ruckt es immer noch,nachdem ich den code geändert habe . Link to comment Share on other sites More sharing options...
Ralf-Peter Posted March 11, 2008 Report Share Posted March 11, 2008 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 Link to comment Share on other sites More sharing options...
Guest Gerdi Posted March 11, 2008 Report Share Posted March 11, 2008 hier der 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); } ?> Link to comment Share on other sites More sharing options...
Ralf-Peter Posted March 11, 2008 Report Share Posted March 11, 2008 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 Link to comment Share on other sites More sharing options...
Guest Gerdi Posted March 11, 2008 Report Share Posted March 11, 2008 trotzdem Vielen Dank für die Mühe Gerdi Link to comment Share on other sites More sharing options...
Düssi Posted March 13, 2008 Report Share Posted March 13, 2008 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) Link to comment Share on other sites More sharing options...
Guest Gerdi Posted March 13, 2008 Report Share Posted March 13, 2008 leider habe ich die Einstellung nicht hinbekommen. Es ruckelt nicht auf der Index. Aber in den Kategorien bleibt das ding dauernd hängen. Gruß Gerdi Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.