Sign in to follow this  
Followers 0

lien sur image et sur nom

15 posts in this topic

Posted · Report post

Bonjour,

je voudrais savoir comment faire pour que quand on clic sur l'image, on arrive sur la page du produit.

Pour le moment il faut cliquer sur le texte.

Pour la page d'accueil j'ai réussi mais pour la page dans achat, jen'y arrive pas.

Pouvez vous me dépanner.

Merci

Share this post


: post
Share on other sites

Posted · Report post

<a href=""><img src=""></a>

Share this post


: post
Share on other sites

Posted · Report post

oui je sais ce qu'il faut faire.

Mais quand je met l'adresse du lien, en cliquant sur l'image, il me met page introuvable. et dans la barre d'adresse, il met l'adresse du site suivi de l'adressedu lien. Donc la page là n'existe pas.

Et je n'arrive pas a voir quel lien je dois mettre pour ouvrir la page produit_details qui se trouve dans achat.

Share this post


: post
Share on other sites

Posted · Report post

fais voir ce que tu fais

Share this post


: post
Share on other sites

Posted · Report post

Voilace que je fais :

<td class="normal" align="center" valign="middle" width="200" height="200">
<?php if ($prod['image1'] != "") { ?>

<a class=\"titre_produit\" href=\"$wwwroot/achat/produit_details.php?id=".$prod['id']."&catid=".$catid."\"><img src="<?php echo $repertoire_images?>/<?php echo $prod['image1'] ?>" align="center" width="150" alt="" /></a>

<?php } else {?>

<a class=\"titre_produit\" href=\"$wwwroot/achat/produit_details.php?id=".$prod['id']."&catid=".$catid."\"><img src="<?php echo $wwwroot?>/images/photo-non-disponible.gif" align="center" alt="photo non disponible" /></a>

<?php }?>

</td>[/codebox]

Share this post


: post
Share on other sites

Posted · Report post

<?php if ($prod['image1']  != "") {		  

<a class=\"titre_produit\" href=\"$wwwroot/achat/produit_details.php?id=".$prod['id']."&catid=".$catid."\"><img src="<?php echo $repertoire_images?>/<?php echo $prod['image1'] ?>" align="center" width="150" alt="" /></a>		 } else {

<a class=\"titre_produit\" href=\"$wwwroot/achat/produit_details.php?id=".$prod['id']."&catid=".$catid."\"><img src="<?php echo $wwwroot?>/images/photo-non-disponible.gif" align="center" alt="photo non disponible" /></a>		}?>

Share this post


: post
Share on other sites

Posted · Report post

je ne vois pas la modification que tu as faite a part de mettre le lien également quand la photo n'est pas disponible.

Je ne l'avais pas fait car pour les tests c'est pas la peine vu que les articles que je test ont des photos.

Merci pour ton temps.

Share this post


: post
Share on other sites

Posted · Report post

fais un copier/coller de mon code

Share this post


: post
Share on other sites

Posted · Report post

si je fai copier / coller, j'ai un message d'erreur qui vient du code :

Parse error: syntax error, unexpected '<' in /mnt/157/sda/8/1/

Share this post


: post
Share on other sites

Posted · Report post

<?php if ($prod['image1']  != "") {  


echo "<a class=\"titre_produit\" href=\"$wwwroot/achat/produit_details.php?id=".$prod['id']."&catid=".$catid."\"><img src=\"$repertoire_images/".prod['image1']."\" align=\"center\" width=\"150\" alt=\"\" /></a>";


	  } else {


echo" <a class=\"titre_produit\" href=\"$wwwroot/achat/produit_details.php?id=".$prod['id']."&catid=".$catid."\"><img src=\"$wwwroot/images/photo-non-disponible.gif\" align=\"center\" alt=\"photo non disponible\" /></a>";



		}?>

Share this post


: post
Share on other sites

Posted · Report post

Je suis vraiment désolé mais j'ai toujours un message d'erreur :

Parse error: syntax error, unexpected '[', expecting ',' or ';' in /mnt/157/sda/8/1

<_<

Share this post


: post
Share on other sites

Posted · Report post

<?php if ($prod['image1'] != "") {

echo "<a class=\"titre_produit\" href=\"$wwwroot/achat/produit_details.php?id=".$prod['id']."&catid=.$catid."\"><img src=\"$repertoire_images/".$prod['image1]."\" align=\"center\" width=\"150\" alt=\"\" /></a>";

} else {

echo" <a class=\"titre_produit\" href=\"$wwwroot/achat/produit_details.php?id=".$prod['id']."&catid=".$catid."\"><img src=\"$wwwroot/images/photo-non-disponible.gif\" align=\"center\" alt=\"photo non disponible\" /></a>";

}?>

Share this post


: post
Share on other sites

Posted · Report post

super ça marche.

Meci beaucoup paulanna pour le temps que ta passé à m'aider.

Share this post


: post
Share on other sites

Posted · Report post

Bonjour et merci Paulana pour tes intervention ici, elles sont precieuses..

je viens de mettre le lien ( + de details) sur l'image comme indiqué ci dessus...ça marche! merci Paulana

mon image est maintenant encadré.... mais je n'arrive pas en changer la couleur du cadre de celle ci (qui est d'un beau violet) mais chock un peu dans l'idée graphique de la page , comment puis je faire?

j'ai helas une autre question , ...je n'arrive pas a changer la couleur ni la taille de la "description" dans (+ de detail)

sans suprimer "un lien" indiqué dans celle ci...

en effet quand je modifie le code pour y changer la couleur du teste, le code "lien" (<a href="http://mon_site/photo.php" hreflang="fr">plus d'info</a>)

apparait dans le texte sous cette forme <a href="http://mon_site/photo.php.php" hreflang="fr">plus d'info</a>...

c'est genant....si quelqu'un peut m'eclairer.....

voila , je vous salut tous ..

sandra

Share this post


: post
Share on other sites

Posted · Report post

Couleur du texte dans (+d'info)

je crois que j'ai trouvé ...j'espere que ce code est coherent

pour modifier la couleur du texte de la "description" dans (+ de detail) sans suprimer un lien inclu dans celui ci...

j'ai modifier la ligne "print" ci dessous...

<?php

echo "</td>";

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

echo (!empty($prod['reference'])) ? "<font class=\"normal\">Le : ".$prod['reference']."</font><br />" : "";

echo (!empty($prod['nom'])) ? "<font class=\"titregras\"><b> ".$prod['nom']."</font></b><br />" : "";

echo (!empty($prod['marque'])) ? "<font class=\"normal\"><b>Lieu : ".$prod['marque']."</font></b><br /><br />" : "";

print "<span class=\"normal\"><br /><br />". nl2br(html_entity_decode($prod['description']))."</span>";

echo "</td>";

echo "</tr>";

echo "</table>";

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