ventes flash petit souci

29 posts in this topic

Posted · Report post

Bonjour,

Quand je configure une vente flash je la prépare pour quel démarre dans 15 jours par exemple

elle s'affiche au niveau des produits alors que se n'est pas le moment par contre dans "vente flash"

elle s'affiche à la bonne date

On dirait que pour la page des produits la vente flash s'affiche du moment que la case box est coché

mais ne tient pas compte de l'horodatage. :)

merci

Share this post


: post
Share on other sites

Posted · Report post

Bonjour,

Quand je configure une vente flash je la prépare pour quel démarre dans 15 jours par exemple

elle s'affiche au niveau des produits alors que se n'est pas le moment par contre dans "vente flash"

elle s'affiche à la bonne date

On dirait que pour la page des produits la vente flash s'affiche du moment que la case box est coché

mais ne tient pas compte de l'horodatage. :)

merci

Moi aussi cela m'intéresse! je crois que ce n'est pas la 1ère fois que je lis cette remarque! ;) A vérifier.

Share this post


: post
Share on other sites

Posted · Report post

:)

Share this post


: post
Share on other sites

Posted · Report post

 

Share this post


: post
Share on other sites

Posted · Report post

bonjour,

merci pour m'avoir répondue, la au moin si une vente flash est programmé mais en dehors du créno horodaté ben on la voie pas ! normal

est quand on n'est dans le créno et ben on la voie dans sa rubrique " vente flash"

mais par contre on n'a plus d'indication du temps qui reste ! :)

merci !

Share this post


: post
Share on other sites

Posted · Report post

 

Share this post


: post
Share on other sites

Posted · Report post

 

Share this post


: post
Share on other sites

Posted · Report post

bonjour,

je suis un peut nul (voir beaucoup), je n'arrive pas a trouvé la condition qui dit "la c'est programmer et on est dans le créno",

pour le flash.php (achat/flash.php)

<?

include("../configuration.inc.php");


if (!isset($_GET['catid'])) {	$catid = 0;} else {$catid = intval($_GET['catid']);}


$DOC_TITLE = "PEEL.FR";


include("$repertoire_modele/haut.php");


print_sell_flash();


include("$repertoire_modele/bas.php");


?>
c'est cette condition
if (!isset($_GET['catid'])) {	$catid = 0;} else {$catid = intval($_GET['catid']);}
qui dit (du moins je crois) :" si non isset de $_get(catid) alors catid égal 0 sinon catid égal intval($_get(catid))" (je ne comprend pas "isset") et après on appel la fonction "print_sell_flash();" qui est dans template.php
function print_sell_flash() {


/* Affiche la liste des catégories qui sont vente flash */

	global $wwwroot, $repertoire_modele, $repertoire_images, $repertoire_upload, $site;


	$sql = "SELECT p.id, p.nom_".$_SESSION['langue'].", p.promotion, p.descriptif_".$_SESSION['langue'].", p.image1, p.image2, p.prix, p.prix_revendeur, p.points, p.comments FROM peel_produits p 

	WHERE p.on_flash = '1' AND p.etat = '1' AND now() BETWEEN p.flash_start AND p.flash_end";


	$qid = mysql_query($sql) or DIE('Une erreur de connexion à la base s est produite ' . __LINE__ . '.<p>' . MYSQL_ERROR());


	if (mysql_num_rows($qid) > 0) { 


	$nb_cellules = mysql_num_rows($qid);


	$nb_colonnes = 2;


		echo "<table align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" width=\"100%\" >";


		echo "<tr><td colspan=".$nb_colonnes." class=\"entete\"><img src=\"images/fleche.gif\" /> ".FLASH."</td></tr>";


			$j = 0;


			while ($prod = mysql_fetch_array($qid)) 

			{


			if ( $j % $nb_colonnes == 0 ) {	echo "<tr valign=top>";	}


			if($j % $nb_colonnes !=0 OR $j % $nb_colonnes == 0 ) {


			// on affiche une cellule

			if ( $j % $nb_colonnes == 0 OR $j == $nb_cellules ) { echo "<td class=\"newsCelluleOne\" width=\"50%\">"; } else { echo "<td class=\"newsCelluleTwo\" width=\"50%\">"; }


			template_index_produit($prod['id'],$where = "AND p.on_flash = '1'", $form = "flash");


			} 

			echo "</td>";


			$j++;	


			if ( $j % $nb_colonnes == 0 OR $j == $nb_cellules ) {

			echo "</tr>";

			}


			} 


	echo "</table>";


	} else {


	echo "<table align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"5\" width=\"100%\" >";


	echo "<tr><td class=\"entete\"><img src=\"images/fleche.gif\" /> ".FLASH."</td></tr>";


	echo "<tr><td class=\"normal\">Actuellement $site n'organise aucune vente FLASH</td></tr>";


	echo "</table>";


	}


}
la en gros je crois qu'ont prepare la mise en page ? et on fait appel à la fonction : " template_index_produit" (toujour dans template.php)
function template_index_produit($id, $where, $form) {


global $wwwroot;

global $dirroot;

global $repertoire_images;

global $repertoire_upload;


$sqlProd = "

SELECT p.id

, p.nom_".$_SESSION['langue']."

, p.promotion

, p.descriptif_".$_SESSION['langue']."

, p.image1

, p.image2

, p.prix

, p.longueur_prod

, p.largeur_prod

, p.profondeur_prod

, p.poids_prod

, p.matiere_prod

, p.couleur_prod

, p.prix_revendeur

, p.points

, p.comments 

, p.on_stock

, p.affiche_stock

, p.delai_stock

, p.on_check

, p.on_flash

, p.flash_start

, p.flash_end

FROM peel_produits p 

WHERE p.etat = '1' AND p.id = '".intval($id)."' ".$where."";


$resProd = mysql_query($sqlProd);


$prod = mysql_fetch_array($resProd);


/*

				$start = mktime();


				$end = mktime(date("H",strtotime($prod['flash_end'])), date("i",strtotime($prod['flash_end'])), date("s",strtotime($prod['flash_end'])), date("m",strtotime($prod['flash_end'])) , date("d",strtotime($prod['flash_end'])), date("Y",strtotime($prod['flash_end'])));


				$ecart_secondes = $end - $start;


				$ecart_jours = floor($ecart_secondes / (60*60*24));


				setlocale(LC_TIME, "fr");

*/				

				echo "<table border=\"0\" width=\"100%\"  cellpadding=\"0\" cellspacing=\"0\">";  //height=\"210\"

/*				


		if ($prod['on_flash'] == 1) {


				echo "<tr>";


				echo "<td class=\"label\" colspan=\"2\" align=\"center\">Il reste $ecart_jours jours avant la fin de la vente flash<br />".FLASH."<br />".FLASH_FROM." ".date("d-m-Y H:i",strtotime($prod['flash_start']))." ".FLASH_TO." ".date("d-m-Y H:i",strtotime($prod['flash_end']))."</td>";


				echo "</tr>";


				}

*/				

				echo "<tr>";


				echo "<td valign=\"top\" class=\"normal\" width=\"100%\" align=\"center\">";


				echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" align=\"center\">";


				echo "<tr>";


				echo "<td class=\"normal\" width=\"100%\" height=\"140\" align=\"center\" valign=\"middle\">";//width=\"100\"


				$prix = $prod['prix'] * (1-$prod['promotion']/100);


				if (empty($prod['on_check'])) {


				href_link($prod['id'], vn($Cat->categorie_id), $class=""); // link imagette produit -->>>> page produit


				}


				echo (!empty($prod['image1'])) ? "<img src=\"$repertoire_upload/".$prod['image1']."\" width=\"117\" height=\"130\" border=\"0\" title=\"".$prod['nom_'.$_SESSION['langue'].'']."\"/>" : "<img src=\"$wwwroot/images/photo-non-disponible.gif\" width=\"130\" alt=\"photo non disponible\" border=\"0\">"; // width=\"150\


				echo (empty($prod['on_check'])) ? "</a>" : "";


			//	echo (!empty($prod['image2'])) ? "<div style=\"text-align:center\"><a href=\"".$repertoire_upload."/".$prod['image2']."\" rel=\"lightbox\" />zoom</a></div>" : ""; //ZOOM


				echo "</td></tr><tr><td class=\"normal\" width=\"100%\" align=\"center\">";


				affiche_prix_retouch($prod['id']);	 //  AFFICHE LE PRIX ^^ retouché


				echo "</td>";


				echo "</tr></table>";


				echo "</td>";


				echo "<td valign=\"top\" class=\"normal\">";


				echo "<p class=\"titre\">";


				if (empty($prod['on_check'])) {


			//	  href_link($prod['id'], vn($Cat->categorie_id), $class="titre");	   // LIEN DU TRITRE


				}


			//	echo html_entity_decode($prod['nom_'.$_SESSION['langue'].'']);	 // TITRE DU PRODUITS


				echo (empty($prod['on_check'])) ? "</a>" : "";


				echo "</p>";


				$sqlBrand = "SELECT m.nom_".$_SESSION['langue']." as nom FROM peel_produits p, peel_produits_marques pm, peel_marques m WHERE pm.produit_id = '".intval($id)."' AND pm.produit_id = p.id AND pm.marque_id = m.id";


				$resBrand = mysql_query($sqlBrand);


				$Brand = mysql_fetch_object($resBrand);


				echo "<p>";


				if (mysql_num_rows($resBrand) > 0 ) {


			//		echo MANUFACTURER." : ".html_entity_decode($Brand->nom)."<br />";	  //  provenance  pays


				}


				$descriptif = html_entity_decode($prod['descriptif_'.$_SESSION['langue'].'']);

				$descriptif = substr($descriptif, 0, 40); 

			   	$descriptif = substr_replace($descriptif,'...',-3);


			//	echo "<p>".$descriptif."</p>";	 //DESCRIPTIF


				if (empty($prod['on_check'])) {


				//		href_link($prod['id'], vn($Cat->categorie_id), $class="normal");  // plus le lien qui correspond a "plus de détails"


				//	echo "<p class=\"normal\">".MORE."</p></a>";   // plus de détails

				//		$prod['on_stock'] == 1 ? affiche_critere_stock1($prod['id'], $prod['affiche_stock'], $form) : affiche_critere_stock0($prod['id'], $form);  //  affiche quantité et rajouté au caddie


				} else {


					affiche_check($prod['id'], $form);


				}



				echo "<br />";


				$prod['comments'] == 1 ? "<br /><b>".COMMENTS."</b><br /><textarea name=\"comment\" class=\"formulaire1\"></textarea>" : "<input type=\"hidden\" name=\"comment\" class=\"formulaire1\" value=\"\">"; #- Si le produit permet au client de proposer un commentaire


				echo "<br />";


				echo "</td>";


				echo "</tr>";


				echo "</table>";

				if (est_identifie()) {


					if (a_priv("admin")) {


						echo "<a href=\"administrer/produits.php?mode=modif&id=".$prod['id']."\" class=\"label\">MODIFIER LE PRODUIT</a>";


					}


				}


				echo "</div>";


	}
je comprend pas ou se fait le choix en disant : si on n'est dans une flash paramétré est validé par le temps => alors on affiche le produits comment on peut le voir puisque on a ignoré ces lignes :
/*

				$start = mktime();


				$end = mktime(date("H",strtotime($prod['flash_end'])), date("i",strtotime($prod['flash_end'])), date("s",strtotime($prod['flash_end'])), date("m",strtotime($prod['flash_end'])) , date("d",strtotime($prod['flash_end'])), date("Y",strtotime($prod['flash_end'])));


				$ecart_secondes = $end - $start;


				$ecart_jours = floor($ecart_secondes / (60*60*24));


				setlocale(LC_TIME, "fr");

*/				

				echo "<table border=\"0\" width=\"100%\"  cellpadding=\"0\" cellspacing=\"0\">";  //height=\"210\"

/*				


		if ($prod['on_flash'] == 1) {


				echo "<tr>";


				echo "<td class=\"label\" colspan=\"2\" align=\"center\">Il reste $ecart_jours jours avant la fin de la vente flash<br />".FLASH."<br />".FLASH_FROM." ".date("d-m-Y H:i",strtotime($prod['flash_start']))." ".FLASH_TO." ".date("d-m-Y H:i",strtotime($prod['flash_end']))."</td>";


				echo "</tr>";


				}

*/

bon je sais sa fait beaucoup de chose que je comprend pas :)

merci encore de votre patience !

Share this post


: post
Share on other sites

Posted · Report post

isset est une fonction qui teste si la variable a déjà reçu une valeur

if (isset["mavariable"]) { echo "ma variable est présente"; } else { "pas de variable";}

Share this post


: post
Share on other sites

Posted · Report post

bonjour,

ok merci, je vais essayer de m'en sortir

merci

Share this post


: post
Share on other sites

Posted · Report post

Bonjour

j'arrive pas a corriger ce BUG

je voudrais simplement que la partie " vente flash"

fonctionne normalement

Merci :)

Share this post


: post
Share on other sites

Posted · Report post

 

Share this post


: post
Share on other sites

Posted · Report post

bonsoir,

j'ai copier-coller tel quel et sa marche pas , le produit apparait bien dans la partie " vente flash"

mais sans infos (ce qu'il reste comme temps)

ps : il manqué une paranthese que j'ai rajouté avant l'accolade

if (($prod['on_flash'] == 1) && (isset($_GET['id']))){

merci

Share this post


: post
Share on other sites

Posted · Report post

 

Share this post


: post
Share on other sites

Posted · Report post

bonjour,

je vien de faire le copier-coller, et sa marche a moitié :

j'ai le bla-bla qui dit :

"Il reste -1 jours avant la fin de la vente flash Vente flash

du 06-03-2008 00:00 au 06-03-2008 00:00"

alors que ce que j'ai entré comme valeur et :

Début de la vente flash : 2008-03-01 18:00:00

Fin de la vente flash : 2008-09-01 18:00:00

mais bon sa s'affiche, ensuite j'ai pas mal d'erreur sur 2 lignes

voila ce que j'ai à l'ecran :

Notice: Undefined index: flash_end in /home/coeurdasie/domains/coeurdasie.fr/public_html/modeles/default/template.php on line 309

Notice: strtotime() [function.strtotime]: Called with empty time parameter in /home/coeurdasie/domains/coeurdasie.fr/public_html/modeles/default/template.php on line 309

Notice: Undefined index: flash_end in /home/coeurdasie/domains/coeurdasie.fr/public_html/modeles/default/template.php on line 309

Notice: strtotime() [function.strtotime]: Called with empty time parameter in /home/coeurdasie/domains/coeurdasie.fr/public_html/modeles/default/template.php on line 309

Notice: Undefined index: flash_end in /home/coeurdasie/domains/coeurdasie.fr/public_html/modeles/default/template.php on line 309

Notice: strtotime() [function.strtotime]: Called with empty time parameter in /home/coeurdasie/domains/coeurdasie.fr/public_html/modeles/default/template.php on line 309

Notice: Undefined index: flash_end in /home/coeurdasie/domains/coeurdasie.fr/public_html/modeles/default/template.php on line 309

Notice: strtotime() [function.strtotime]: Called with empty time parameter in /home/coeurdasie/domains/coeurdasie.fr/public_html/modeles/default/template.php on line 309

Notice: Undefined index: flash_end in /home/coeurdasie/domains/coeurdasie.fr/public_html/modeles/default/template.php on line 309

Notice: strtotime() [function.strtotime]: Called with empty time parameter in /home/coeurdasie/domains/coeurdasie.fr/public_html/modeles/default/template.php on line 309

Notice: Undefined index: flash_end in /home/coeurdasie/domains/coeurdasie.fr/public_html/modeles/default/template.php on line 309

Notice: strtotime() [function.strtotime]: Called with empty time parameter in /home/coeurdasie/domains/coeurdasie.fr/public_html/modeles/default/template.php on line 309

Notice: Undefined index: flash_start in /home/coeurdasie/domains/coeurdasie.fr/public_html/modeles/default/template.php on line 321

Notice: strtotime() [function.strtotime]: Called with empty time parameter in /home/coeurdasie/domains/coeurdasie.fr/public_html/modeles/default/template.php on line 321

Notice: Undefined index: flash_end in /home/coeurdasie/domains/coeurdasie.fr/public_html/modeles/default/template.php on line 321

Notice: strtotime() [function.strtotime]: Called with empty time parameter in /home/coeurdasie/domains/coeurdasie.fr/public_html/modeles/default/template.php on line 321

a savoir la ligne 309 :

$end = mktime(date("H",strtotime($prod['flash_end'])), date("i",strtotime($prod['flash_end'])), date("s",strtotime($prod['flash_end'])), date("m",strtotime($prod['flash_end'])) , date("d",strtotime($prod['flash_end'])), date("Y",strtotime($prod['flash_end'])));
a savoir la ligne 321 :
echo "<td class=\"label\" colspan=\"2\" align=\"center\">Il reste $ecart_jours jours avant la fin de la vente flash<br />".FLASH."<br />".FLASH_FROM." ".date("d-m-Y H:i",strtotime($prod['flash_start']))." ".FLASH_TO." ".date("d-m-Y H:i",strtotime($prod['flash_end']))."</td>";
avant ma fonction "print_sell_flash " était comme sa :
function print_sell_flash() {


/* Affiche la liste des catégories qui sont vente flash */

	global $wwwroot, $repertoire_modele, $repertoire_images, $repertoire_upload, $site;


	$sql = "SELECT p.id, p.nom_".$_SESSION['langue'].", p.promotion, p.descriptif_".$_SESSION['langue'].", p.image1, p.image2, p.prix, p.prix_revendeur, p.points, p.comments FROM peel_produits p 

	WHERE p.on_flash = '1' AND p.etat = '1' AND now() BETWEEN p.flash_start AND p.flash_end";


	$qid = mysql_query($sql) or DIE('Une erreur de connexion à la base s est produite ' . __LINE__ . '.<p>' . MYSQL_ERROR());


	if (mysql_num_rows($qid) > 0) { 


	$nb_cellules = mysql_num_rows($qid);


	$nb_colonnes = 2;


		echo "<table align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" width=\"100%\" >";


		echo "<tr><td colspan=".$nb_colonnes." class=\"entete\"><img src=\"images/fleche.gif\" /> ".FLASH."</td></tr>";


			$j = 0;


			while ($prod = mysql_fetch_array($qid)) 

			{


			if ( $j % $nb_colonnes == 0 ) {	echo "<tr valign=top>";	}


			if($j % $nb_colonnes !=0 OR $j % $nb_colonnes == 0 ) {


			// on affiche une cellule

			if ( $j % $nb_colonnes == 0 OR $j == $nb_cellules ) { echo "<td class=\"newsCelluleOne\" width=\"50%\">"; } else { echo "<td class=\"newsCelluleTwo\" width=\"50%\">"; }


			template_index_produit($prod['id'],$where = "AND p.on_flash = '1'", $form = "flash");


			} 

			echo "</td>";


			$j++;	


			if ( $j % $nb_colonnes == 0 OR $j == $nb_cellules ) {

			echo "</tr>";

			}


			} 


	echo "</table>";


	} else {


	echo "<table align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"5\" width=\"100%\" >";


	echo "<tr><td class=\"entete\"><img src=\"images/fleche.gif\" /> ".FLASH."</td></tr>";


	echo "<tr><td class=\"normal\">Actuellement $site n'organise aucune vente FLASH</td></tr>";


	echo "</table>";


	}


}

je pense que la date dans le bla-bla ces la date systeme ? variable pas initialisé ?

encore merci !

Share this post


: post
Share on other sites

Posted · Report post

:)

Share this post


: post
Share on other sites

Posted · Report post

 

Share this post


: post
Share on other sites

Posted · Report post

 

Share this post


: post
Share on other sites

Posted · Report post

bonjour,

a premiere vue sa fonctionne :) , je vais regardé de plus prés pour

comprendre et essayer à l'avenir de me dépatouillé tout seul mais bon chaud

le PHP , vive le forum et encore mille merci

;)

Share this post


: post
Share on other sites

Posted · Report post

 

Share this post


: post
Share on other sites

Posted · Report post

re-bonsoir,

sa marche nikel sauf que les ventes flash n'ont aucun prix parametrable

je m'explique le top se serait de avoir un prix hors ventes flash et

un prix dans la période de la vente flash !

merci

Share this post


: post
Share on other sites

Posted · Report post

 

Share this post


: post
Share on other sites

Posted · Report post

bonjour,

ok, merci

Share this post


: post
Share on other sites

Posted · Report post

Bonjour, je remonte ce topic car j'ai un problème avec peel premium version 5.0

Je voulais faire démarrer une vente flash à partir de demain 00h00 donc j'ai inséré 2008-09-03 00:00:00 . C'est avec étonnement que je vois que la vente flash s'active immédiatement :mellow: :P :mellow:

Voici mon copié collé de la fonction vente flash :

Prix : 67

début : 2008-09-03 00:00:00

fin : 2009-09-09 23:59:00

Pouvez-vous me dire ce qui se passe avec ce logiciel?? Avez-vous le même soucis?? :blink:

Share this post


: post
Share on other sites

Posted · Report post

 

Share this post


: post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

Twitter Advisto ecommerce

Facebook PEEL Shopping