atila-diffusion

Utilisateur open source
  • Compteur de contenus

    1 036
  • Inscrit(e) le

  • Dernière visite


Messages posté(e)s par atila-diffusion


  1. Tu dois placer ce code dans la page /achat/modeles/achat_maintenant.php

    Voici le code de la page modifiée pour le code que tu demande, c'est à dire sans l'amélioration suivante (controle par BackOffice)

    <?php if ($_SESSION['caddie']->compte_elements() == 0) { ?>
    
    	<h2>Votre caddie est vide, visitez le <a class="normal" href="<?php echo $wwwroot?>/achat">catalogue des produits</a>.</h2>
    
    	<?php return false; ?>
    
    <?php } 
    
    
    $fleche_gauche = '<font color=\"red\">&lt;=</font>';
    
    
    $fleche_droite = '<font color=\"red\">=&gt;</font>';
    
    
    if (!empty($message_erreur)) {
    
    
      echo '<font color="\red\">'.$message_erreur."</font>\n";
    
    
    } 
    
    
    ?>
    
    
    
    <form name="entryform" action="<?php echo $_SERVER['PHP_SELF']?>" method="post">
    
    
    <font class="tetiere">Etape 1. Vos informations personnelles</font><br />
    
    <font class="petit">(nécessaires pour prendre contact avec vous)</font>
    
    <table cellpadding="2" cellspacing="0" width="100%" border="0">
    
    <tr>
    
    	<td colspan="3" class="normal"><b>ADRESSE DE FACTURATION :</b></td>
    
    </tr>
    
    <tr>
    
    	<td width="30" class="normal" nowrap><?php if (isset($erreurs['client1'])) { echo $fleche_droite;} ?></td>
    
    	<td width="130" class="normal">Client :</td>
    
    	<td width="400"><input class="formulaire1" type="text" name="client1" size="50" value="<?php echo stripslashes($client1) ?>" /></td>
    
    </tr>
    
    <tr>
    
    	<td width="30" class="normal" nowrap><?php if (isset($erreurs['email1'])) echo $fleche_droite; ?></td>
    
    	<td class=normal>Email :</td>
    
    	<td><input class="formulaire1" type="text" name="email1" size="50" value="<?php echo $email1 ?>" /></td>
    
    </tr>
    
    <tr>
    
    	<td width="30" class="normal" nowrap><?php if (isset($erreurs['contact1'])) echo $fleche_droite; ?></td>
    
    	<td class="normal">Tel. :</td>
    
    	<td><input class="formulaire1" type="text" name="contact1" size="50" value="<?php echo $contact1 ?>" /></td>
    
    </tr>
    
    
    <tr valign="top">
    
    	<td width="30" class="normal" nowrap><?php if (isset($erreurs['adresse1'])) echo $fleche_droite; ?></td>
    
    	<td class=normal>Adresse :</td>
    
    	<td><input class="formulaire1" type="text" name="adresse1" size="50" value="<?php echo stripslashes($adresse1)?>" /></td>
    
    </tr>
    
    <tr valign="top">
    
    	<td width="30" class="normal" nowrap><?php if (isset($erreurs['code_postal1'])) echo $fleche_droite; ?></td>
    
    	<td class="normal">Code Postal :</td>
    
    	<td><input class="formulaire1" type="text" name="code_postal1" size="50" value="<?php echo $code_postal1 ?>" /></td>
    
    </tr>
    
    <tr valign="top">
    
    	<td width="30" class="normal" nowrap><?php if (isset($erreurs['ville1'])) echo $fleche_droite; ?></td>
    
    	<td class="normal">Ville :</td>
    
    	<td><input class="formulaire1" type="text" name="ville1" size="50" value="<?php echo stripslashes($ville1)?>" /></td>
    
    </tr>
    
    <tr valign=top>
    
    	<td width="30" class="normal" nowrap><?php if (isset($erreurs['pays1'])) echo $fleche_droite; ?></td>
    
    	<td class="normal">Pays :</td>
    
    	<td><input class="formulaire1" type="text" name="pays1" size="50" value="<?php echo stripslashes($pays1) ?>" /></td>
    
    </tr>
    
    <tr>
    
    	<td colspan="3" class="normal"><b>ADRESSE DE LIVRAISON :</b>
    
    	<br />(si différente de l'adresse de facturation)</td>
    
    </tr>
    
    <tr>
    
    	<td width="30" class="normal" nowrap><?php if (isset($erreurs['client2'])) echo $fleche_droite; ?></td>
    
    	<td class="normal">Client :</td>
    
    	<td><input class="formulaire1" type="text" name="client2" size="50" value="<?php echo stripslashes($client2) ?>" /></td>
    
    </tr>
    
    <tr>
    
    	<td width="30" class="normal" nowrap></td>
    
    	<td class="normal">Email :</td>
    
    	<td><input class="formulaire1" type="text" name="email2" size="50" value="<?php echo $email2 ?>" /></td>
    
    </tr>
    
    <tr>
    
    	<td width="30" class="normal" nowrap><?php if (isset($erreurs['contact2'])) echo $fleche_droite; ?></td>
    
    	<td class="normal">Tel. :</td>
    
    	<td><input class="formulaire1" type="text" name="contact2" size="50" value="<?php echo $contact2 ?>" /></td>
    
    </tr>
    
    <tr valign="top">
    
    	<td width="30" class="normal" nowrap><?php if (isset($erreurs['adresse2'])) echo $fleche_droite; ?></td>
    
    	<td class="normal">Adresse :</td>
    
    	<td><input class="formulaire1" type="text" name="adresse2" size="50" value="<?php echo stripslashes($adresse2)?>" /></td>
    
    </tr>
    
    <tr valign="top">
    
    	<td width="30" class="normal" nowrap><?php if (isset($erreurs['code_postal2'])) echo $fleche_droite; ?></td>
    
    	<td class="normal">Code Postal :</td>
    
    	<td><input class="formulaire1" type="text" name="code_postal2" size="50" value="<?php echo $code_postal2 ?>" /></td>
    
    </tr>
    
    <tr valign="top">
    
    	<td width="30" class="normal" nowrap><?php if (isset($erreurs['ville2'])) echo $fleche_droite; ?></td>
    
    	<td class="normal">Ville :</td>
    
    	<td><input class="formulaire1" type="text" name="ville2" size="50" value="<?php echo stripslashes($ville2)?>" /></td>
    
    </tr>
    
    <tr valign="top">
    
    	<td width="30" class="normal" nowrap><?php if (isset($erreurs['pays2'])) echo $fleche_droite; ?></td>
    
    	<td class="normal">Pays :</td>
    
    	<td><input class="formulaire1" type="text" name="pays2" size="50" value="<?php echo stripslashes($pays2) ?>" /></td>
    
    </tr>
    
    
    <tr valign="top">
    
    	<td width="30" class="normal" nowrap><?php if (isset($erreurs['paiement'])) echo $fleche_droite; ?></td>
    
    	<td class="normal">Paiement* :</td>
    
    	<td class="normal">
    
    	<input type="radio" name="paiement" value="paypal" <?php if( $paiement == "paypal") {echo " checked";} ?> />Paypal<br />
    
      <input type="radio" name="paiement" value="chèque" <?php if( $paiement == "chèque") {echo " checked";} ?> />Chèque<br />
    
      <input type="radio" name="paiement" value="virement" <?php if($paiement == "virement") {echo " checked";} ?> />Virement
    
    	</td>
    
    </tr>
    
    <tr valign="top">
    
    	<td width="30" class="normal" nowrap>
    
    	<?php if   (isset($erreurs['transport'])) echo $fleche_droite; ?></td>
    
    	<td class="normal">Frais de port * :</td>
    
    	<td class="normal">
    <select class="formulaire1" name="transport"> <?php if (floatval(fprix($_SESSION['caddie']->total)) <35 ) { echo("<option value='normal' selected >Normal</option>"); } else { echo("<option value='express' selected >Gratuit</option>"); } ?> </select>
    	</td>
    
    </tr>
    
    <tr valign="top">
    
    	<td class="normal" colspan="3">
    
    	<?php 
    
    	if (isset($erreurs['cgv'])) echo $fleche_droite; ?>
    
    	<input type="checkbox" name="cgv" <?php if($cgv == "on") echo " checked" ?> />J'ai pris connaissance des <a href="cgv.php" class="label" >conditions générales de vente</a> du site <?php echo  $site ?> en vigueur à cet instant et j’y adhère sans réserve.</td>
    
    </tr>
    
    
    <tr>
    
    <td width="30" class="normal" nowrap></td>
    
    <td colspan="2" class="normal">Vos commentaires : </td>
    
    </tr>
    
    <tr>
    
    <td nowrap>&nbsp;</td>
    
    <td colspan="2"><textarea class="formulaire1" name="commentaires" style="width:560px" rows="5"><?php echo $commentaires ?></textarea></td>
    
    </tr>
    
    <tr>
    
    	<td colspan="3" align="center"><br /><input type="submit" value="Etape suivante" class="bouton" /></td>
    
    </tr>
    
    <tr>
    
    	<td colspan="3" align="left" class="petit">(*) Ne pas oublier d'indiquer votre moyen de paiement</td>
    
    </tr>
    
    
    </table>
    
    <blockquote>
    
    </form>


  2. Ce ne sont que des lignes à ne pas afficher,

    la création est souvent plus compliqué que la destruction...

    Autrement dit si tu es patient, tu n'auras surement aucun souci à ne plus faire afficher le ht dans le front office

    .

    Tout ce qui te reste à faire, c'est à éditer toutes les pages ou cela s'affiche et à lever la ligne d'affichage HT.

    Ne pas oublier de toujours laisser le calcul HT se faire afin de garder une appli correcte en Back Office.

    Liste toi les pages à modifier une par une et tu veras ce n'est pas si difficile, et puis nous sommes là pour regler les "problemes" eventuellement rencontrés.


  3. merci beaucoup, ça marche nikel chrome.

    Serais tu intéréssé par le fait de pouvoir faire jouer le montant à partir duquel le port deviens gratuit depuis l'interface?

    Si OUI suit ceci: (ATTENTION aux erreurs [!])

    --> EDITE la page /administrer/variables.php

    --> REMPLACE le code de la page (EN ENTIER) par:

    (attention une étape à la suite à ne pas manquer)

    <?php 
    
    include("../configuration.inc.php");
    
    necessite_identification();
    
    necessite_priv("admin");
    
    
    $DOC_TITLE = "Variables du site";
    
    
    
    include("modeles/haut.php");
    
    
    switch (vb($_REQUEST['mode'])) {
    
    
    	case "ajout" :
    
    		ecrire($HTTP_POST_VARS);
    
    		echo "<div class=\"normal\">Vos modifications ont été prise en compte.</div>";
    
    		$tab_var = lire();
    
    		affiche_variables($tab_var);
    
    	break;
    
    
    	default :
    
    	$tab_var = lire();
    
    	affiche_variables($tab_var);
    
    break;
    
    }
    
    
    
    include("modeles/bas.php");
    
    
    // LISTE DES FONCTIONS
    
    
    function lire() {
    
    	$file = fopen("../lib/setup/info.inc.php", "r");
    
    	$count = 0;
    
    	$tab_var = array();
    
    	while (true) {
    
    		if (feof($file)) break;
    
    		$car = fgetc($file);
    
    		while(($car != "\"") && (true)) {
    
    			if (feof($file)) break;
    
    			$car = fgetc($file);
    
    		}
    
    		//ici on est au debut de la variable
    
    		$car = fgetc($file);
    
    		$var="";
    
    		while (($car != "\"") && (true)) {
    
    			if (feof($file)) break;
    
    			$var = $var.$car;
    
    			$car = fgetc($file);
    
    		}
    
    		$tab_var[$count] = $var;
    
    		$count++;
    
    	}
    
    	fclose($file);
    
    	return $tab_var;
    
    }
    
    
    function ecrire(&$frm) {
    
    	$file = fopen("../lib/setup/info.inc.php", "w");
    
    	$string = "<?php 
    
    	\n\$serveur_mysql = \"". $frm['serveur_mysql']."\";
    
    	\n\$utilisateur_mysql = \"". $frm['utilisateur_mysql']."\";
    
    	\n\$mot_de_passe_mysql = \"". $frm['mot_de_passe_mysql']."\";
    
    	\n\$nom_de_la_base = \"". $frm['nom_de_la_base']."\";
    
    	\n\$wwwroot = \"". $frm['wwwwroot']."\";
    
    	\n\$site = \"". $frm['site']."\";
    
    	\n\$normal = \"".$frm['normal']."\";
    
    	\n\$express = \"".$frm['express']."\";
    
    	\n\$support = \"".$frm['support']."\";
    
    	\n\$paypal = \"".$frm['paypal']."\";
    
    	\n\$ApartirDeDonneGratuit = \"".$frm['ApartirDeDonneGratuit']."\";
    
    	\n?>";
    
    	fwrite($file, $string);
    
    	fclose($file);
    
    }
    
    
    function affiche_variables(&$tab_var) {
    
    ?>
    
    <table border="0" cellpadding="0" cellspacing="1" width="760">
    
    <tr>
    
    	<td class="entete" colspan="2">Variables du site</th>
    
    </tr>
    
    <form action="<?php echo $_SERVER['PHP_SELF']?>" method="post">
    
    	<tr><td class="normal">Serveur hôte (mysql) : </td><td><input type="text" name="serveur_mysql" value="<?php echo ($tab_var[0]); ?>" size="" /></td></tr>
    
    	<tr><td class="normal">Identifiant (mysql) : </td><td><input type="text" name="utilisateur_mysql" value="<?php echo ($tab_var[1]); ?>" size="" /></td></tr>
    
    	<tr><td class="normal">Mot de passe (mysql) : </td><td><input type="text" name="mot_de_passe_mysql" value="<?php echo ($tab_var[2]); ?>" size="" /></td></tr>
    
    	<tr><td class="normal">Nom de la base mysql : </td><td><input type="text" name="nom_de_la_base" value="<?php echo ($tab_var[3]); ?>" size="" /></td></tr>
    
    	<tr><td class="normal">URL de la boutique sans barre oblique à la fin : </td><td><input type="text" name="wwwwroot" value="<?php echo ($tab_var[4]); ?>" size="" /></td></tr>
    
    	<tr><td class="normal">Nom du site web : </td><td><input type="text" name="site" value="<?php echo ($tab_var[5]); ?>" size="" /></td></tr>
    
    	<tr><td class="normal">Tarif normal (&euro; TTC) : </td><td><input type="text" name="normal" value="<?php echo ($tab_var[6]); ?>" size="" /></td></tr>
    
    	<tr><td class="normal">Tarif express (&euro; TTC) : </td><td><input type="text" name="express" value="<?php echo ($tab_var[7]); ?>" size="" /></td></tr>	
    
    	<tr><td class="normal">Valeur (&euro; TTC) pour Port Gratuit : </td><td><input type="text" name="ApartirDeDonneGratuit" value="<?php echo ($tab_var[10]); ?>" size="" /></td></tr>
    
    	<tr><td class="normal">Email administrateur : </td><td><input type="text" name="support" value="<?php echo ($tab_var[8]); ?>" size="" /></td></tr>	
    
    	<tr><td class="normal">Email paypal : </td><td><input type="text" name="paypal" value="<?php echo ($tab_var[9]); ?>" size="" /></td></tr>	
    
    
    
    	<tr>
    
    	<td align="center" colspan="2">
    
    	<input type="submit" name="action" class="bouton" value="Enregistrer les modifications">
    
    	<input type="hidden" name="mode" value="ajout">
    
    </form>
    
    	</td></tr>
    
    </table>
    
    
    <?php 
    
    }
    
    ?>
    --> Cette ETAPE a ajouté une variable en plus dans les variables SYSTEME ------> Pour la VALIDER => aller sur la page Variables du site dans le backoffice, entrez un montant, puis validez. ENSUITE, retournez dans la page achat_maintenant que nous avons modifié précedemment et modifié le code que nous avions mis :
    	<select class="formulaire1" name="transport">
    
    			<?php
    
    			if (floatval(fprix($_SESSION['caddie']->total)) <35 )
    
    			{
    
    			echo("<option value='normal' selected >Normal</option>");
    
    			}
    
    			else
    
    			{
    
    			echo("<option value='express' selected >Gratuit</option>");
    
    			}
    
    			?>
    
    	</select>
    =====> PAR
    	<select class="formulaire1" name="transport">
    
    			<?php
    
    			if (floatval(fprix($_SESSION['caddie']->total)) <$ApartirDeDonneGratuit )
    
    			{
    
    			echo("<option value='normal' selected >Normal</option>");
    
    			}
    
    			else
    
    			{
    
    			echo("<option value='express' selected >Gratuit</option>");
    
    			}
    
    			?>
    
    	</select>

    CONTACTEZ moi si vous rencontrez un problème; Bonne Chance :(

    PS: et si ce module vous plait on pourrait aller plus loin en ajoutant un frais de port... qui vous permettrez d'avoir le port express de libre


  4. Pour ce qui est de ta première requete:

    EDITE la page /configuration.inc.php

    Vas à la ligne 74( // Initialisation de SESSION pour la couleur)

    REMPLACE :

    if (! empty($_GET['style'])) 
    
    
    	{ $_SESSION['style'] = $_GET['style']; 
    
    
    	} elseif 
    
    
    	(empty($_SESSION['style'])) 
    
    
    	{ $_SESSION['style'] = "bleu"; 
    
    
    	}
    PAR
     
    
    	  $_SESSION['style'] = "vert";
    --> Puis dans la page /modeles/haut.php enleve ceci qui se trouve à partir de la ligne 41, ni PLUS, ni MOINS:
    		<table border="0" cellpadding="2" cellspacing="2">
    
    
    		<tr>
    
    
    			<td width="10" height="10" bgcolor="#1f1f5f"><a href="<?php echo  $_SERVER['PHP_SELF'];?>?style=bleu"><img src="<?php echo $wwwroot?>/images/blank.gif" alt="blank" width="10" height="10" border="0" /></a></td>
    
    
    			<td width="10" height="10" bgcolor="#663366"><a href="<?php echo  $_SERVER['PHP_SELF'];?>?style=violet"><img src="<?php echo $wwwroot?>/images/blank.gif" alt="blank" width="10" height="10" border="0" /></a></td>
    
    
    			<td width="10" height="10" bgcolor="#3C7A6D"><a href="<?php echo  $_SERVER['PHP_SELF'];?>?style=vert"><img src="<?php echo $wwwroot?>/images/blank.gif" alt="blank" width="10" height="10" border="0" /></a></td>
    
    
    			<td width="10" height="10" bgcolor="#993300"><a href="<?php echo  $_SERVER['PHP_SELF'];?>?style=marron"><img src="<?php echo $wwwroot?>/images/blank.gif" alt="blank" width="10" height="10" border="0" /></a></td>
    
    
    			<td width="10" height="10" bgcolor="#CC0000"><a href="<?php echo  $_SERVER['PHP_SELF'];?>?style=rouge"><img src="<?php echo $wwwroot?>/images/blank.gif" alt="blank" width="10" height="10" border="0" /></a></td>
    
    
    			<td width="10" height="10" bgcolor="#FF9900"><a href="<?php echo  $_SERVER['PHP_SELF'];?>?style=jaune"><img src="<?php echo $wwwroot?>/images/blank.gif" alt="blank" width="10" height="10" border="0" /></a></td>
    
    
    		</tr>
    
    
    		</table>


  5. Bonjour, je vais te guider:

    -édite la page /modeles/haut.php

    ---> juste en dessous la ligne qui affiche les conditions de vente,

    AJOUTE

    echo "<br /><img src=\"images/menminus.gif\" alt=\"\" /> <a href=\"$wwwroot/contacts.php\" class=\"normal\">Contacts</a>";
    [la ligne qui précéde est]
    echo "<br /><div class=\"tetiere_petit\" align=\"center\" >$site et vous</div>";
    
    
    echo $rubrique_options;
    
    
    echo "<br /><img src=\"images/menminus.gif\" alt=\"\" /> <a href=\"$wwwroot/references.php\" class=\"normal\">Nos références</a>";
    
    
    echo "<br /><img src=\"images/menminus.gif\" alt=\"\" /> <a href=\"$wwwroot/cgv.php\" class=\"normal\">Conditions de vente</a>";


  6. Une solution serait de passer le port Express à 0.

    Puis d'aller dans la pages acaht maintenant

    et remplacer l'affichage des deux differents types de port par ceci::

     	<select class="formulaire1" name="transport">
    
    			<?php
    
    			if (floatval(fprix($_SESSION['caddie']->total)) <35 )
    
    			{
    
    			echo("<option value='normal' selected >Normal</option>"); 
    
    			}
    
    			else
    
    			{
    
    			echo("<option value='express' selected >Gratuit</option>"); 
    
    			}
    
    			?>
    
    	</select>

    te manque plus qu'à remplacer 35 par la somme qui t'irai le mieux.

    Message @Paulanna: faudrait faire une variable globale et l'insérer des l'origine dans la nouvelle version à venir non?


  7. "DESIGNATION" => stripslashes($prod["nom_produit"])."\n\r".$prod["couleur"]." ".$prod["taille"]."\n\r".$prod["comment"]."\n\r".$perso

    ta pas ' ."" ' en trop ici

    "DESIGNATION" => stripslashes($prod["nom_produit"])."\n\r".$prod["couleur"]." ".$prod["taille"]."\n\r".$prod["comment"]."\n\r".$perso

    essaye ca, si cela ne marche pas Paulanna,

    "DESIGNATION"   => stripslashes($prod["nom_produit"])."\n\r".$prod["couleur"].$prod["taille"]."\n\r".$prod["comment"]."\n\r".$perso

Twitter Advisto ecommerce

Facebook PEEL Shopping