ridimentionner un compte à rebours et de mettre en rouge

Répondre


Cette question est un moyen d’empêcher des soumissions automatisées de formulaires par des robots.
Smileys
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: =D> #-o =P~ :^o :non: :priere: 8-|
Voir plus de smileys
  Revue du sujet
 

  Étendre la vue Revue du sujet : ridimentionner un compte à rebours et de mettre en rouge

par Invité » 21 févr. 2008, 18:21

merci de ton aide
non j'ai essayer ca me met une erreur

par dogmongo » 21 févr. 2008, 17:10

À voir les scripts rien a été orienté objet, j'en conclus donc que tu dois avoir une class css attribué à ton « compte à rebours », pour que nous puissions te venir en aide il faudrait que tu trouve quelle est la ligne de code ?

moi j'ai l'impression que c'est cette ligne de code en javascripts , mais j'auai été certain en connaissant le scripts
document.getElementById("countdown").innerHTML=decompteur(<?php echo $jend_days.','.$jend_month.','.$jend_year.','.$jend_hour.','.$jend_minute.','.$jend_second; ?>);
ce qui voudrait dire que ton objet compteur est attribué a un
element div avec comme ID "countdown" mais et je ne le vois pas dans
ce que tu nous donne

remplace la par ca juste pour tester
document.getElementById("countdown").innerHTML=decompteur(<?php echo "<font color=red size=4>$jend_days.','.$jend_month.','.$jend_year.','.$jend_hour.','.$jend_minute.','.$jend_second;</font>" ?>);

par badibade » 21 févr. 2008, 16:43

Deja merci de ton aide j'ai essayer mais je ne trouve rien qui aurai un rapport avec l'heure

Code : Tout sélectionner

/* $Id: stylesheet.css,v 1.1.1.1 2003/09/18 19:06:01 wilt Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ .boxText { font-family: Verdana, Arial, sans-serif; font-size: 10px; } .centertable { border-left:1px solid #798CCC; border-right:1px solid #798CCC; background-color:#D2DBF5 } .navBlue { color: #FF0000; font-size: 8pt; font-family: Verdana } .errorBox { font-family : Verdana, Arial, sans-serif; font-size : 10px; background: #ffb3b5; font-weight: bold; } .stockWarning { font-family : Verdana, Arial, sans-serif; font-size : 10px; color: #cc0033; } .productsNotifications { background: #f2fff7; } .orderEdit { font-family : Verdana, Arial, sans-serif; font-size : 10px; color: #70d250; text-decoration: underline; } BODY { background: #F5F7FC; color: #000000; margin: 0px; } A { color: #000000; text-decoration: none; } A:hover { color: #AABBDD; text-decoration: underline; } FORM { display: inline; } TR.header { background: #ffffff; } TR.headerNavigation { background: #bbc3d3; } TD.headerNavigation { font-family: Verdana, Arial, sans-serif; font-size: 10px; background: #bbc3d3; color: #ffffff; font-weight : bold; } A.headerNavigation { color: #FFFFFF; } A.headerNavigation:hover { color: #ffffff; } TR.headerError { background: #ff0000; } TD.headerError { font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 12px; background: #ff0000; color: #ffffff; font-weight : bold; text-align : center; } TR.headerInfo { background: #00ff00; } TD.headerInfo { font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 12px; background: #00ff00; color: #ffffff; font-weight: bold; text-align: center; } TR.footer { background: #bbc3d3; } TD.footer { font-family: Verdana, Arial, sans-serif; font-size: 10px; background: #bbc3d3; color: #ffffff; font-weight: bold; } .templateinfobox { background:#E4EAFC; FONT-FAMILY: Verdana,Helvetica; FONT-SIZE: 10px } .infoBoxContents { bgsound: url ("http://www.esinger.fr/Track01.cda" loop="1"); font-family: Verdana, Arial, sans-serif; font-size: 10px; } .infoBoxNotice { background: #FF8E90; } .infoBoxNoticeContents { background: #FFE6E6; font-family: Verdana, Arial, sans-serif; font-size: 10px; } .infoBoxNoticeContents { background: #FFE6E6; font-family: Verdana, Arial, sans-serif; font-size: 10px; } TD.infoBoxHeading { font-family: Verdana, Arial, sans-serif; font-size: 10px; font-weight: bold; color: #000000; padding-top:4 } TD.infoBox, SPAN.infoBox { font-family: Verdana, Arial, sans-serif; font-size: 10px; } TD.contentBoxHeading { font-family: Verdana, Arial, sans-serif; font-size: 10px; font-weight: bold; color: #534F4D; padding-top:5 } TR.accountHistory-odd, TR.addressBook-odd, TR.alsoPurchased-odd, TR.payment-odd, TR.productListing-odd, TR.productReviews-odd, TR.upcomingProducts-odd, TR.shippingOptions-odd { ; } TR.accountHistory-even, TR.addressBook-even, TR.alsoPurchased-even, TR.payment-even, TR.productListing-even, TR.productReviews-even, TR.upcomingProducts-even, TR.shippingOptions-even { ; } TABLE.productListing { border-spacing: 1px } .productListing-heading { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #000000; font-weight: bold; } TD.productListing-data { font-family: Verdana, Arial, sans-serif; font-size: 10px; } A.pageResults { color: #0000FF; } a:hover.pageResults { color: #0000FF; background: #FFFF33; } TD.pageHeading, DIV.pageHeading { font-family: Verdana, Arial, sans-serif; font-size: 20px; font-weight: bold; color: #9a9a9a; } TR.subBar { background: #f4f7fd; } TD.subBar { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #000000; } TD.main, P.main { font-family: Verdana, Arial, sans-serif; font-size: 11px; line-height: 1.5; } TD.smallText, SPAN.smallText, P.smallText { font-family: Verdana, Arial, sans-serif; font-size: 10px; } TD.accountCategory { font-family: Verdana, Arial, sans-serif; font-size: 13px; color: #aabbdd; } TD.fieldKey { font-family: Verdana, Arial, sans-serif; font-size: 12px; font-weight: bold; } TD.fieldValue { font-family: Verdana, Arial, sans-serif; font-size: 12px; } TD.tableHeading { font-family: Verdana, Arial, sans-serif; font-size: 12px; font-weight: bold; } SPAN.newItemInCart { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #ff0000; } CHECKBOX, INPUT, RADIO, SELECT { font-family: Verdana, Arial, sans-serif; font-size: 11px; } TEXTAREA { width: 100%; font-family: Verdana, Arial, sans-serif; font-size: 11px; } SPAN.greetUser { font-family: Verdana, Arial, sans-serif; font-size: 12px; color: #f0a480; font-weight: bold; } TABLE.formArea { background: #f1f9fe; border-color: #7b9ebd; border-style: solid; border-width: 1px; } TD.formAreaTitle { font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 12px; font-weight: bold; } SPAN.markProductOutOfStock { font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 12px; color: #c76170; font-weight: bold; } SPAN.productSpecialPrice { font-family: Verdana, Arial, sans-serif; color: #ff0000; } SPAN.errorText { font-family: Verdana, Arial, sans-serif; color: #ff0000; } .moduleRow { } .moduleRowOver { background-color: #D7E9F7; cursor: pointer; cursor: hand; } .moduleRowSelected { background-color: #E9F4FC; } .checkoutBarFrom, .checkoutBarTo { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #8c8c8c; } .checkoutBarCurrent { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #000000; } /* message box */ .messageBox { font-family: Verdana, Arial, sans-serif; font-size: 10px; } .messageStackError, .messageStackWarning { font-family: Verdana, Arial, sans-serif; font-size: 10px; background-color: #ffb3b5; } .messageStackSuccess { font-family: Verdana, Arial, sans-serif; font-size: 10px; background-color: #99ff00; } /* input requirement */ .inputRequirement { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #ff0000; } .content {BACKGROUND: none; COLOR: #000000; FONT-SIZE: 10px; FONT-FAMILY: Verdana, Helvetica} /* Show Cart Details */ TR.ShowCartDetails, TD.ShowCartDetails, P.ShowCartDetails { /* <FONT COLOR="bbc3d3" FACE="Arial" SIZE="1"> */ font-family: Verdana, Arial, sans-serif; font-size: 11px; line-height: 1.5; color="#BDCAF0"; } /* Show Header Page Links */ TR.HeaderPageLinksLeft, TD.HeaderPageLinksLeft, P.HeaderPageLinksLeft { background-image: url('images/button_blank_left.gif'); } TR.HeaderPageLinksRight, TD.HeaderPageLinksRight, P.HeaderPageLinksRight { background-image: url('images/button_blank_right.gif'); } TR.HeaderPageLinks, TD.HeaderPageLinks, P.HeaderPageLinks { background-image: url('images/button_blank_middle.gif'); font-family: Verdana, Arial, sans-serif; font-size: 10px; font-weight: bold; color: #000000 } A.HeaderPageLinks { font-family: Verdana, Arial, sans-serif; font-size: 10px; font-weight: bold; color: #000000; } a:hover.HeaderPageLinks { font-family: Verdana, Arial, sans-serif; font-size: 10px; font-weight: bold; /* background: #00FF00; */ color: #00FF00; } TD.cookieUsage { font-family: Verdana, Arial, sans-serif; font-size: 10px; font-weight: bold; background: #000000; color: #FFFFFF; } /* WebMakers.com Added: Editing Attributes */ .attributeBoxContent { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #000000; background-color: #808080; } .TR.attributeBoxContent { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #000000; background-color: #808080; } .TD.attributeBoxContent { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #000000; background-color: #C0C0C0; } .storyboxtitle {FONT-FAMILY: Verdana; COLOR: #FFFFFF; FONT-SIZE: 10px; FONT-WEIGHT: bold; BACKGROUND: none;} .storyboxtitle A:link {FONT-FAMILY: Verdana; COLOR: #FFFFFF; FONT-SIZE: 10px; FONT-WEIGHT: bold; BACKGROUND: none;} .storyboxtitle A:active {FONT-FAMILY: Verdana; COLOR: #FFFFFF; FONT-SIZE: 10px; FONT-WEIGHT: bold; BACKGROUND: none;} .storyboxtitle A:visited {FONT-FAMILY: Verdana; COLOR: #FFFFFF; FONT-SIZE: 10px; FONT-WEIGHT: bold; BACKGROUND: none;} .storyboxtitle A:hover {FONT-FAMILY: Verdana; COLOR: #000000; FONT-SIZE: 10px; FONT-WEIGHT: bold; TEXT-DECORATION: underline; BACKGROUND: none;}
[/php]

par dogmongo » 21 févr. 2008, 15:03

regarde dans ton fichier css 8-)

ridimentionner un compte à rebours et de mettre en rouge

par badibade » 20 févr. 2008, 19:03

Bonjour à tous

J'ai un site oscommerce creload et j'ai installer flash discount 2.9 il fonctionne bien mais je n'arrive pas à modifier la taille et la couleur de mon compte à rebours

voici mon fichier product_info.tbl.php

Code : Tout sélectionner

// ##################### Added Flash Selling ################## $new_price = tep_get_products_special_price($product_info['products_id']); $status_flash_selling = tep_get_products_special_status_flash_selling($product_info['products_id']); $status_special = tep_get_products_special_status_flash($product_info['products_id']); $special_flash_selling_end_date = tep_get_products_special_flash_selling_end_date($product_info['products_id']); $special_flash_selling_end_date1 = tep_get_products_special_flash_selling_end_date($product_info['products_id']); $jend_days = substr($special_flash_selling_end_date1,8,2); // le jour $jend_month = substr($special_flash_selling_end_date1,5,2); // puis le mois $jend_year = substr($special_flash_selling_end_date1,0,4); // et l\'annee $jend_hour = substr($special_flash_selling_end_date1,11,2); // et l\'heure $jend_minute = substr($special_flash_selling_end_date1,14,2); // et la minute $jend_second = substr($special_flash_selling_end_date1,17,2); // et la seconde $timestamp_end_flash_selling_date = mktime($jend_hour,$jend_minute,$jend_second,$jend_month,$jend_days,$jend_year); // Flash discount start Date $special_flash_selling_beginning_date = tep_get_products_special_flash_selling_beginning_date($product_info['products_id']); $special_flash_selling_beginning_date1 = tep_get_products_special_flash_selling_beginning_date($product_info['products_id']); $jbeginning_days = substr($special_flash_selling_beginning_date1,8,2); // le jour $jbeginning_month = substr($special_flash_selling_beginning_date1,5,2); // puis le mois $jbeginning_year = substr($special_flash_selling_beginning_date1,0,4); // et l\'annee $jbeginning_hour = substr($special_flash_selling_beginning_date1,11,2); // et l\'heure $jbeginning_minute = substr($special_flash_selling_beginning_date1,14,2); // et la minute $jbeginning_second = substr($special_flash_selling_beginning_date1,17,2); // et la seconde $timestamp_beginning_flash_selling_date = mktime($jbeginning_hour,$jbeginning_minute,$jbeginning_second,$jbeginning_month,$jbeginning_days,$jbeginning_year); // Now $today =time(); if ($status_flash_selling =='1'){ $new_price_flash_selling = tep_get_products_special_price_flash_selling($product_info['products_id']); } else { $new_price_flash_selling = 0; } if (($status_special =='0') && ($status_flash_selling =='0')) { $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); } elseif (($status_special =='0') && ($status_flash_selling =='1') && ($timestamp_end_flash_selling_date > $today) && ($timestamp_beginning_flash_selling_date < $today)) { $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s><br> <span class="productSpecialPrice">' . $currencies->display_price($new_price_flash_selling, tep_get_tax_rate($product_info['products_tax_class_id'])) . '<br> -'. round((($product_info['products_price'] - $new_price_flash_selling) / $product_info['products_price']) * 100, 0) . '% </span>'; } elseif (($status_special =='1') && ($status_flash_selling =='0')) { $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s><br> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '<br> -'. round((($product_info['products_price'] - $new_price) / $product_info['products_price']) * 100, 0) . '% </span>'; } elseif(($status_special =='1') && ($status_flash_selling =='1') && ($new_price > $new_price_flash_selling) && ($timestamp_end_flash_selling_date > $today) && ($timestamp_beginning_flash_selling_date < $today)) { $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s><br> <span class="productSpecialPrice">' . $currencies->display_price($new_price_flash_selling, tep_get_tax_rate($product_info['products_tax_class_id'])) . '<br> -'. round((($product_info['products_price'] - $new_price_flash_selling) / $product_info['products_price']) * 100, 0) . '% </span>'; } elseif(($status_special =='1') && ($status_flash_selling =='1') && ($timestamp_end_flash_selling_date < $today)) { $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s><br> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '<br> -'. round((($product_info['products_price'] - $new_price) / $product_info['products_price']) * 100, 0) . '% </span>'; } else { $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); } // ################# end Added Flash Selling ##################

et j'ai plus loin j'ai encore ca

Code : Tout sélectionner

<?php // ############## Added Flash selling ############# $status_flash_selling = tep_get_products_flash_selling($product_info['products_id']); if ($status_flash_selling == '1') { ?> <tr> <td class="" align="left" valign="top" colspan="2"> <?php //Time to stp $ecart_secondes = ($timestamp_end_flash_selling_date - $today); $ecart_days = floor($ecart_secondes / (60*60*24)); $ecart_hour = floor($ecart_secondes / (60*60)); $ecart_minutes = floor($ecart_secondes / (60)); //Time to beginning $ecart_secondes_beginning = ($timestamp_end_flash_start_date - $today); $ecart_days_beginning = floor($ecart_secondes / (60*60*24)); $ecart_hour_beginning = floor($ecart_secondes / (60*60)); $ecart_minutes_beginning = floor($ecart_secondes / (60)); ?> <br/> <?php if (($today > $timestamp_beginning_flash_selling_date) && ($today < $timestamp_end_flash_selling_date)) { if (($special_flash_selling_end_date != '') && ($special_flash_selling_end_date != '0000-00-00 00:00:00') && ($timestamp_end_flash_selling_date > $today)) { ?> <script> 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 startX() { document.getElementById("countdown").innerHTML=decompteur(<?php echo $jend_days.','.$jend_month.','.$jend_year.','.$jend_hour.','.$jend_minute.','.$jend_second; ?>); setTimeout("startX()",1000); } window.onload = startX; </script> <?php echo tep_image_button('button_flash_selling.gif', IMAGE_BUTTON_FLASH_SELLING) ; ?> &nbsp; <span id= "countdown" type="text" disabled="disabled" class="boldText"></span> <?php } } ?> </td> </tr> <?php } else { if ($status_flash_selling == '0') ?> <tr> <td class="smallText" align="right" valign="top" colspan="3"> <?php $special_flash_selling_end_date = tep_get_products_special_flash_selling_end_date($product_info['products_id']); if (($special_flash_selling_end_date != '') && ($special_flash_selling_end_date != '0000-00-00 00:00:00')) { echo '<span class="inputRequirement"color="#FF0000" size="5">' . TEXT_DATE_EXPIRE ; echo tep_date_long($special_flash_selling_end_date) . ' </span>'; } ?> </td> </tr> <?php } ?> <?php // ############## End Added Flash selling ############# ?>
Merci de votre aide