j'ai un gros pepin avec flash selling 2.9 dans ma page d'accueil j'ai d'abitute dans chaque boxe au moin 3 produit mais depuis que je l'ai installer je n'est qu'un produit qui apparait dans ma boxe
comment fair pour le modifier
De plus le compteur qui aparait m'affiche n'inposte quelle temp et il ne deconpte pas
Code : Tout sélectionner
<?php
/*
$Id: specials.php,v 1.31 2003/06/09 22:21:03 hpdl Exp $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2003 osCommerce
Released under the GNU General Public License
*/
if ($random_product = tep_random_select("select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_price_flash_selling 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 = '" . (int)$languages_id . "' and s.status_flash_selling = '1' and now() > s.flash_selling_beginning_date and now() < s.flash_selling_end_date order by s.specials_date_added desc limit " . MAX_RANDOM_SELECT_SPECIALS)) {
//::::::::::::::::::::::::::: Modif by Fenris : ajout délai restant avant fin vente flash EOF :::::::::::::::::::::::::
// Flash discount end Date
$special_flash_selling_end_date = tep_get_products_special_flash_selling_end_date($random_product['products_id']);
$jend_days_box = (int)substr($special_flash_selling_end_date,8,2); // le jour
$jend_month_box = (int)substr($special_flash_selling_end_date,5,2); // puis le mois
$jend_year_box = (int)substr($special_flash_selling_end_date,0,4); // et l\'annee
$jend_hour_box = (int)substr($special_flash_selling_end_date,11,2); // et l\'heure
$jend_minute_box = (int)substr($special_flash_selling_end_date,14,2); // et la minute
$jend_second_box = (int)substr($special_flash_selling_end_date,17,2); // et la seconde
?>
<!-- flash_selling //-->
<script type="text/javascript">
function decompteur(jour,mois,annee,heure,minute,seconde) {
Resultat = "";
now = new Date();
goal = new Date(annee,mois-1,jour,heure,minute,seconde);
ts = Math.abs((now.getTime()/1000)-(goal.getTime()/1000));
if((goal.getTime()/1000) < (now.getTime()/1000)){
location.reload();
}
fjour = Math.floor(ts/(3600*24));
if(fjour<=1) {
Resultat = fjour + " jour ";
} else {
Resultat = fjour + " jours ";
}
ts = ts - (fjour*24*3600);
fheure = Math.floor((ts/3600));
if(fheure<10) {
Resultat += " 0" + fheure + "h ";
} else {
Resultat += " " + fheure + "h ";
}
ts = ts - (fheure*3600);
minutes = Math.floor((ts/60));
if(minutes<10) {
Resultat += "0" + minutes + "m ";
} else {
Resultat += minutes + "m ";
}
ts = ts - (minutes*60);
fseconde = Math.floor(ts);
if(fseconde<10) {
Resultat += "0" + fseconde + "s"
} else {
Resultat += fseconde + "s"
}
return Resultat
}
function startXbox() {
document.getElementById("ctpbox").innerHTML=decompteur(<?php echo $jend_days_box.','.$jend_month_box.','.$jend_year_box.','.$jend_hour_box.','.$jend_minute_box.','.$jend_second_box; ?>);
setTimeout("startXbox()",1000);
}
window.onload = startXbox;
</script>
<tr>
<td>
<?php
$info_box_contents = array();
$info_box_contents[] = array('align' => 'left', 'text' => sprintf(TABLE_HEADING_DEFAULT_SPECIALS, strftime('%B')));
new contentBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_FLASH_SELLING));
$new = tep_db_query("select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and s.status = '1' order by s.specials_date_added DESC limit " . MAX_DISPLAY_SPECIAL_PRODUCTS);
$info_box_contents = array();
$info_box_contents[] = array('align' => 'center',
'text' => BOX_FLASH_SELLING . '<br>' . $jend_days_box .' Jours'. ' ' . $jend_hour_box.' H'. ' ' . $jend_minute_box . ' Min '. $jend_second_box .' Sec'. '<br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product["products_id"]) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a><br><s>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</s><br><span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_price_flash_selling'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>'); //::::::::::::::::::::::::::: Modif by Fenris : ajout délai restant avant fin vente flash EOF :::::::::::::::::::::::::
new infoBox($info_box_contents, infoBoxContentsShoppingCartBoxe, infoBoxShoppingCartBoxe);
?>
</td>
</tr>
<!-- specials_eof //-->
<?php
}
?>Merci de votre aide