Sign in to follow this  
Followers 0

modifier la page ajout caddie

19 posts in this topic

Posted · Report post

je n'arrive pas a trouver le fichier me permettant de modifierla page caddie ajout..cadre, icone panier etc..

merci de vos lumieres

j'ai bien achat/caddie-ajout mais pas de mode creation..

merci

Share this post


: post
Share on other sites

Posted · Report post

achat/modeles/caddie.php

Share this post


: post
Share on other sites

Posted · Report post

achat/modeles/caddie.php

merci, Paulanna mais j'ai du mal m'exprimer, je cherche la page produit ou catégorie(ajouter au panier)

merci du renseignement

Share this post


: post
Share on other sites

Posted · Report post

merci, Paulanna mais j'ai du mal m'exprimer, je cherche la page produit ou catégorie(ajouter au panier)

merci du renseignement

oui, le fichier cherché est celui ou apparait le ou les produits avec "ajouter au panier" pour modification icone caddie etc..

merci

Share this post


: post
Share on other sites

Posted · Report post

tu cherches le lien "ajouter au panier" avec le descriptif, l'image et tout et tout .. ?

modeles/default/template.php fonction template_index_produit

je pense

Share this post


: post
Share on other sites

Posted · Report post

oui, c'est bien ce fichier, par ailleurs sur ce fichier produit je n'ai pas le lien + de détails (fonction MORE) qui apparait sur les nouveautés et top ventes...comment integrer cette fonction sur le template produit

merci

Share this post


: post
Share on other sites

Posted · Report post

regarde dans lib/fonctions/fonctions.php fonction => print_critere_stock_prix

Share this post


: post
Share on other sites

Posted · Report post

oui, merci Paulanna, j'ai trouvé le fichier et lafonction, mais comment y intégrer le code pour avoir le "+ details"

merci

Share this post


: post
Share on other sites

Posted · Report post

ben justement c'est dans cette fonction..

tu as lien vers ton site ?

Share this post


: post
Share on other sites

Posted · Report post

bizarre dans cette fonction print_critere_stock_prix as tu MORE

Share this post


: post
Share on other sites

Posted · Report post

bizarre dans cette fonction print_critere_stock_prix as tu MORE

oui, le seul More que j'ai est celui-ci

echo "<a class=\"normal\" href=\"java script:document.ajout".$prodId.".submit()\">";

echo strtoupper(ADD_CART);

echo "</a>";

echo "&nbsp;<img src=\"$wwwroot/images/lirelasuite.gif\" align=\"absmiddle\" border=\"0\">&nbsp;<a href=\"achat/produit_details.php?id=".$prodId."\">&nbsp;".MORE."</a>";

Share this post


: post
Share on other sites

Posted · Report post

dans cette fonction print_critere_stock_prix ?

Share this post


: post
Share on other sites

Posted · Report post

dans cette fonction print_critere_stock_prix ?

oui, ligne 1384 en fin du code suivant

1134 >>function print_critere_stock_prix($prodId) {

global $wwwroot;

global $repertoire_images;

$sqlProd = "SELECT prix, prix_revendeur, promotion, tva, comments, on_stock, delai_stock, affiche_stock, on_perso, etat_stock FROM peel_produits WHERE id = '".$prodId."'";

$resProd = mysql_query($sqlProd);

$objProd = mysql_fetch_object($resProd);

/* Choix entre prix grossiste et prix public */

if (isset($_SESSION['utilisateur']['priv']) && $_SESSION['utilisateur']['priv'] == "reve") {

$prix = $objProd->prix_revendeur * (1-$objProd->promotion/100);

$prix_barre = $objProd->prix_revendeur;

} else {

$prix = $objProd->prix * (1-$objProd->promotion/100);

$prix_barre =$objProd->prix;

}

if ($objProd->on_stock == 1) { # Si le stock du produit est géré

echo "<form method=\"POST\" action=\"$wwwroot/achat/caddie_ajout.php\" name=\"ajout".$prodId."\">";

echo "<input type=\"hidden\" name=\"etat_stock\" value=\"".$objProd->on_stock."\">";

echo "<input type=\"hidden\" name=\"delivery_stock\" value=\"".$objProd->delai_stock."\">";

echo "<input type=\"hidden\" name=\"id\" value=\"".$prodId."\">";

echo "<input type=\"hidden\" value=\"".$prix."\" name=\"prix\">";

echo "<input type=\"hidden\" value=\"".$objProd->promotion."\" name=\"promotion\">";

echo "<input type=\"hidden\" value=\"".$objProd->tva."\" name=\"tva\">";

$sqlStock = "SELECT stock, couleur_id, taille_id FROM peel_stocks_temp WHERE produit_id = '".$prodId."'"; /* Ici on ne recherche que les produits dont le stock est > 0 */

$resStock = mysql_query($sqlStock);

/* Si la table des stocks temporaires est vide alors on teste la table réelle */

if (mysql_num_rows($resStock) == 0) {

$sqlStock = "SELECT stock, couleur_id, taille_id FROM peel_stocks WHERE produit_id = '".$prodId."' AND stock > 0"; /* Ici on ne recherche que les produits dont le stock est > 0 */

$resStock = mysql_query($sqlStock);

}

$Stock = mysql_fetch_array($resStock);

# R&eacute;cup&egrave;re le nombre de ligne dans le table, si &eacute;gal &agrave; 1 alors on est dans le cas d'un produit sans couleur ni taille

# Dans ce cas, le critere sera trait&eacute; par <input type=\"hidden\">

$numLigne = mysql_num_rows($resStock);

$stock_remain = 0; #- Initialisation de la variable Stock restant

$sPrix = 0; # Indique qu'il n'existe pas de prix / taille pour ce produit.

if ($numLigne == 1 && $Stock['couleur_id'] == 0 && $Stock['taille_id'] == 0) { # Si il y a du stock mais pas de couleur et pas de taille

/* PRODUIT CONTENANT UN STOCK SANS TAILLE NI COULEUR */

echo "<input type=\"hidden\" value=\"||\" name=\"critere\">";

if ($Stock['stock'] != 0) {

$stock_remain = 1;

echo "<br />".QUANTITY." : <input type=\"text\" class=\"formulaire1\" type=\"text\" size=\"2\" name=\"qte\" value=\"1\" onChange=\"if (this.value > ".$Stock['stock'].") {this.value=".$Stock['stock]."'; alert('La quantit&eacute; demand&eacute;e est sup&eacute;rieure au stock disponible.');}\" maxlength=\"3\" /><br />";

echo "<a class=\"normal\" href=\"java script:document.ajout".$prodId.".submit()\">";

echo "<img src=\"$wwwroot/images/caddie.gif\" align=\"absmiddle\" border=\"0\">";

echo "</a>";

echo "<a class=\"normal\" href=\"java script:document.ajout".$prodId.".submit()\">";

echo strtoupper(ADD_CART);

echo "</a>";

echo "&nbsp;<img src=\"$wwwroot/images/lirelasuite.gif\" align=\"absmiddle\" border=\"0\">&nbsp;<a href=\"achat/produit_details.php?id=".$prodId."\">&nbsp;".MORE."</a>";

}

} else { /* Produit contenant au moins une couleur ou une taille */

if ($numLigne > 0) {

$cName = "";

$sName = "";

$cId = 0;

$sId = 0;

$sPrix = 0; /* Indique qu'il n'existe pas de prix / taille pour ce produit. */

$sqlStockTrue = "SELECT stock, couleur_id, taille_id FROM peel_stocks WHERE produit_id = '".$prodId."'"; /* Ici on ne recherche que les produits dont le stock est > 0 */

$resStockTrue = mysql_query($sqlStockTrue);

$stockTrue = mysql_query($sqlStockTrue);

$selected = 1; #- cette variable permet d'initialiser les boutons radio en sélectionnant au moins 1 item

if (mysql_num_rows($stockTrue) > 0) {

echo "<p align=\"center\"><b>".CRITERIA." : </b><br />";

echo "<select name=\"critere\" class=\"formulaire1\">";

while ( $s = mysql_fetch_array($stockTrue)) {

$resCouleur = mysql_query("SELECT id, nom_".$_SESSION['langue']." as nom FROM peel_couleurs WHERE id = '".$s['couleur_id']."'")

or DIE('Une erreur de connexion &agrave; la base s est produite ' . __LINE__ . '.<p>' . MYSQL_ERROR());

$resTaille = mysql_query("SELECT id, nom_".$_SESSION['langue']." as nom, prix, prix_revendeur FROM peel_tailles WHERE id = '".$s['taille_id']."'")

or DIE('Une erreur de connexion &agrave; la base s est produite ' . __LINE__ . '.<p>' . MYSQL_ERROR());

if ($s['couleur_id'] > 0) { /* si il y a une couleur */

$couleur = mysql_fetch_array($resCouleur);

$cId = $couleur['id'];

$cName = $couleur['nom'];

}

if ($s['taille_id'] > 0) { /* si il y a une taille */

$taille = mysql_fetch_array($resTaille);

$sName = $taille['nom'];

if (isset($_SESSION['utilisateur']['priv']) && $_SESSION['utilisateur']['priv'] == "reve") {

$sPrix = $taille['prix_revendeur'] * (1-$objProd->promotion/100);

} else {

$sPrix = $taille['prix'] * (1-$objProd->promotion/100);

}

$sId = $taille['id'];

}

$sqlStock = "SELECT stock, couleur_id, taille_id FROM peel_stocks_temp WHERE produit_id = '".$prodId."' AND couleur_id = '".vn($cId)."' AND taille_id = '".vn($sId)."'"; /* Ici on ne recherche que les produits dont le stock est > 0 */

$resStock = mysql_query($sqlStock);

/* Si la table des stocks temporaires est vide alors on teste la table réelle */

if (mysql_num_rows($resStock) == 0) {

$sqlStock = "SELECT stock, couleur_id, taille_id FROM peel_stocks WHERE produit_id = '".$prodId."' AND stock > 0 AND couleur_id = '".$cId."' AND taille_id = '".$sId."'"; /* Ici on ne recherche que les produits dont le stock est > 0 */

$resStock = mysql_query($sqlStock);

}

$Stock = mysql_fetch_array($resStock);

if (!empty($Stock['stock'])) {

$stock_remain = 1;

echo $selected;

echo "<option value=\"".$cId."|".$sId."|".$Stock['stock']."\"";

if ($selected == 1) {echo " selected";}

echo ">";

//echo "<input type=\"radio\" name=\"critere\" value=\"".$cId."|".$sId."|".$Stock['stock']."\"";

if (!empty($cName)) {echo $cName;}

if (!empty($sName)) {echo " &nbsp; ".$sName;}

if ($sPrix != 0) {echo " &nbsp; ".fprix($sPrix)." &euro; TTC";}

echo " - Stock : ".$Stock['stock'];

echo "</option>";

$selected++;

} else {

echo "<option value=\"NULL\">";

if (!empty($cName)) {echo $cName;}

if (!empty($sName)) {echo " &nbsp; ".$sName;}

echo " : ".NO_AVAILABLE."</option>";

}

} # FIN DE LA BOUCLE WHILE

echo "</select></p>";

}

} else { /* Fin de la boucle if ($numLigne > 0) */

echo "<input type=\"hidden\" name=\"critere\" value=\"||\" />";

}

if ($objProd->comments != 0) { /* Si le produit permet au client de proposer un commentaire */

echo "<br /><b>".COMMENTS."</b><br />";

echo "<textarea name=\"comment\" class=\"formulaire1\"></textarea>";

} else {

echo "<input type=\"hidden\" name=\"comment\" class=\"formulaire1\" value=\"\">";

}

if ($stock_remain != 0) {

echo "<input type=\"hidden\" name=\"option\" value=\"".vn($sPrix)."\" />";

echo "<b>".QUANTITY." :</b> <input type=\"text\" class=\"formulaire1\" size=\"3\" name=\"qte\" value=\"1\" /><br />";

echo "<a class=\"normal\" href=\"java script:document.ajout".$prodId.".submit()\">";

echo "<img src=\"$wwwroot/images/caddie.gif\" align=\"absmiddle\" border=\"0\">";

echo "</a>";

echo "<a class=\"normal\" href=\"java script:document.ajout".$prodId.".submit()\">";

echo strtoupper(ADD_CART);

echo "</a>";

1384> echo "&nbsp;<img src=\"$wwwroot/images/lirelasuite.gif\" align=\"absmiddle\" border=\"0\">&nbsp;<a href=\"achat/produit_details.php?id=".$prodId."\">&nbsp;".MORE."</a>";

}

Share this post


: post
Share on other sites

Posted · Report post

essai de mettre un produit avec du stock de 20 pour voir

Share this post


: post
Share on other sites

Posted · Report post

20 est un exemple

faut que je regarde la fonction d'un peu plus près

Share this post


: post
Share on other sites

Posted · Report post

ajoute :

echo "<input type=\"hidden\" name=\"option\" value=\"".vn($sPrix)."\" />";

							echo "<input type=\"text\" class=\"formulaire1\" name=\"qte\" value=\"1\" />";

							echo "<a class=\"normal\" href=\"java script:document.ajout".$prodId.".submit()\">";

							echo "<img src=\"$wwwroot/images/caddie.gif\" align=\"absmiddle\" border=\"0\">";

							echo "</a>";

							echo "<a class=\"addcart\" href=\"java script:document.ajout".$prodId.".submit()\">";

							echo  strtoupper(ADD_CART);

							echo "</a>";

avant if ($stock_remain != 0) {

ps: fais attention si tu fais un copier/coller du code ci-dessous

il ne faut pas d'espace à java script

Share this post


: post
Share on other sites

Posted · Report post

ajoute :

echo "<input type=\"hidden\" name=\"option\" value=\"".vn($sPrix)."\" />";

							echo "<input type=\"text\" class=\"formulaire1\" name=\"qte\" value=\"1\" />";

							echo "<a class=\"normal\" href=\"java script:document.ajout".$prodId.".submit()\">";

							echo "<img src=\"$wwwroot/images/caddie.gif\" align=\"absmiddle\" border=\"0\">";

							echo "</a>";

							echo "<a class=\"addcart\" href=\"java script:document.ajout".$prodId.".submit()\">";

							echo  strtoupper(ADD_CART);

							echo "</a>";

avant if ($stock_remain != 0) {

ps: fais attention si tu fais un copier/coller du code ci-dessous

il ne faut pas d'espace à java script

non, ça ne me donne rien de mieux, il faut toujours inserer un stock et le gérer

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
Sign in to follow this  
Followers 0

Twitter Advisto ecommerce

Facebook PEEL Shopping