#1 (permalink)  
Alt 19.08.2008, 14:31
Neuer Benutzer
 
Registriert seit: 17.10.2005
Beiträge: 12
Standard Sonderangebote anzeigen

Hallo XT-Commerce-Freunde,

ich suche die Möglichkeit meine Sonderangebote per Zufall anzeigen zu lassen.
Hier ein Beispiel in meinem neuen Shop:

www.derluke.de/shop

Oben links sollten später per Zufall Sonderangebote angezeigt werden. Idealerweise immer 3 Stück im Turnus.

Hierfür würde ich die Box Sonderangebote verwenden.
Gibt es eine einfache Möglichkeit in dieser Box drei-vier Angebote welche bei jedem Seitenaufruf zufällig angezeigt werden anzuzeigen?

Der Code (in der specials.php im Source Ordner) ist ja schon so angelegt, dass er ein Zufallsprodukt anzeigt. Man müsste es quasi nur auf drei Angebote erweitern.

Hier der Code der Specials.php:
PHP-Code:
$box_smarty = new smarty;
$box_smarty->assign('tpl_path''templates/'.CURRENT_TEMPLATE.'/');
$box_content '';
// include needed functions
require_once (DIR_FS_INC.'xtc_random_select.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 (
$random_product xtc_random_select("select
                                           p.products_id,
                                           pd.products_name,
                                           p.products_price,
                                           p.products_tax_class_id,
                                           p.products_image,
                                           s.expires_date,
                                           s.specials_new_products_price
                                           from "
.TABLE_PRODUCTS." p,
                                           "
.TABLE_PRODUCTS_DESCRIPTION." pd,
                                           "
.TABLE_SPECIALS." s where p.products_status = '1'
                                           and p.products_id = s.products_id
                                           and pd.products_id = s.products_id
                                           and pd.language_id = '"
.$_SESSION['languages_id']."'
                                           and s.status = '1'
                                           "
.$group_check."
                                           "
.$fsk_lock."                                             
                                           order by s.specials_date_added
                                           desc limit "
.MAX_RANDOM_SELECT_SPECIALS)) {


$image '';
if (
$random_product['products_image'] != '')
    
$image DIR_WS_THUMBNAIL_IMAGES.$random_product['products_image'];

$box_smarty->assign('LINK'xtc_href_link(FILENAME_PRODUCT_INFOxtc_product_link($random_product['products_id'], $random_product['products_name'])));
$box_smarty->assign('IMAGE'$image);
$box_smarty->assign('NAME'$random_product['products_name']);
$box_smarty->assign('PRICE'$xtPrice->xtcGetPrice($random_product['products_id'], $format true1$random_product['products_tax_class_id'], $random_product['products_price']));
$box_smarty->assign('EXPIRES'$random_product['expires_date']);
$box_smarty->assign('SPECIALS_LINK'xtc_href_link(FILENAME_SPECIALS));

$box_smarty->assign('language'$_SESSION['language']);
if (
$random_product["products_id"] != '') {
    
// set cache ID
     
if (!CacheCheck()) {
        
$box_smarty->caching 0;
        
$box_specials $box_smarty->fetch(CURRENT_TEMPLATE.'/boxes/box_specials.html');
    } else {
        
$box_smarty->caching 1;
        
$box_smarty->cache_lifetime CACHE_LIFETIME;
        
$box_smarty->cache_modified_check CACHE_CHECK;
        
$cache_id $_SESSION['language'].$random_product["products_id"].$_SESSION['customers_status']['customers_status_name'];
        
$box_specials $box_smarty->fetch(CURRENT_TEMPLATE.'/boxes/box_specials.html'$cache_id);
    }
    
$smarty->assign('box_SPECIALS'$box_specials);
}

Ich weiß zwar, dass ich via SQL mit order by rand() einen Zufallsdatensatz angezeigt bekomme... aber sonst nicht weiter..

Wäre um jede Hilfe sehr dankbar.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
Antwort

Lesezeichen

Stichworte
anzeigen, sonderangebote

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


Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
Brutto anzeigen, Steuer ausweisen Mocraf Installation und Konfiguration 4 04.08.2008 18:44
Sonderangebote Im Body-bereich Anzeigen JayJayS Template System 4 22.04.2004 06:00


Alle Zeitangaben in WEZ +1. Es ist jetzt 15:26 Uhr.

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

xt:Commerce is a SafeCharge brand