#1 (permalink)  
Alt 25.03.2004, 03:46
 
Registriert seit: 22.03.2004
Beiträge: 6
Standard

Moin,

also ich habe die Suche ja schon benutzt, aber nichts gefunden. Bei OSC kenne ich es das ich durch ein MOD mir die Bestseller mit Bild und Preis anzeigen lassen kann. Wie sieht das bei XT aus, hat es das irgendwie shon drin oder muss hier auch Hand angelegt werden ??

THX
Ralf
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #2 (permalink)  
Alt 25.03.2004, 07:17
Benutzerbild von mzanier
xt:Commerce GmbH, Geschäftsführung
 
Registriert seit: 18.04.2003
Beiträge: 27.414
Rotes Gesicht

Code:
<?php
/* -----------------------------------------------------------------------------------------
  $Id: best_sellers.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(best_sellers.php,v 1.20 2003/02/10); www.oscommerce.com 
  (c) 2003 nextcommerce (best_sellers.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

  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_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_ids LIKE '%c_".$_SESSION['customers_status']['customers_status_id']."_group%'";
 }
 if (isset($current_category_id) && ($current_category_id > 0)) {
  $best_sellers_query = xtc_db_query("select distinct
                    p.products_id,
                    p.products_image,
                    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 ".$fsk_lock."
                    ".$group_check."
                    and p2c.categories_id = c.categories_id and '" . $current_category_id . "'
                    in (c.categories_id, c.parent_id)
                    order by p.products_ordered desc, pd.products_name limit " . MAX_DISPLAY_BESTSELLERS);
 } else {
  $best_sellers_query = xtc_db_query("select distinct
                    p.products_id,
                    p.products_image,
                    pd.products_name from " .
                    TABLE_PRODUCTS . " p, " .
                    TABLE_PRODUCTS_DESCRIPTION . " pd, " .
                    TABLE_CATEGORIES . " c
                    where p.products_status = '1'
                    and c.categories_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,
                    pd.products_name limit " . MAX_DISPLAY_BESTSELLERS);
 }
 if (xtc_db_num_rows($best_sellers_query) >= MIN_DISPLAY_BESTSELLERS) {


  $rows = 0;
  $box_content=array();
  while ($best_sellers = xtc_db_fetch_array($best_sellers_query)) {
   $rows++;
   $image='';
   if ($best_sellers['products_image']) $image=DIR_WS_INFO_IMAGES . $best_sellers['products_image'];
   $box_content[]=array(
              'ID'=> xtc_row_number_format($rows),
              'NAME'=> $best_sellers['products_name'],
              'IMAGE' => $image,
              'LINK'=> xtc_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $best_sellers['products_id']));

  }



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

  $smarty->assign('box_BESTSELLERS',$box_best_sellers);


 }
?>
und im dazugeh?rigen html templarte halt das bild dorthinsetzen wo du willst.
__________________
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 25.03.2004, 07:27
 
Registriert seit: 22.03.2004
Beiträge: 6
Standard

Big THX, war mir vollst?ndig unsicher wo da im Code Ver?nderungen stattfinden m?ssen. Habe es mal im OSC eingebaut gehabt, aber dort h?ng der Smarty nicht mit drin.

Vielen Dank nochmal
Cu Ralf
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #4 (permalink)  
Alt 07.05.2007, 21:25
Benutzer
 
Registriert seit: 09.02.2007
Beiträge: 37
Standard

in welche seite muss man denn diesen code einbauen?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #5 (permalink)  
Alt 05.07.2007, 00:43
Neuer Benutzer
 
Registriert seit: 15.01.2005
Beiträge: 21
Standard

in welcher Template Datei (box_best_sellers.html ???) muss ich das Bild einfügen und an welcher Stelle ?

Danke
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #6 (permalink)  
Alt 31.12.2007, 21:27
Neuer Benutzer
 
Registriert seit: 11.11.2007
Beiträge: 5
Standard

?
in welche datei muss der code nun?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #7 (permalink)  
Alt 31.01.2008, 16:13
Benutzer
 
Registriert seit: 04.01.2008
Beiträge: 45
Standard

kann hier niemand helfen, stehe immoment auch vor diesem problme
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
Antwort

Lesezeichen

Stichworte
bestseller

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 22:40 Uhr.

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

xt:Commerce is a SafeCharge brand