Pb pour affichage image+ bloc statique sur magento

Fermé
kerbal Messages postés 10 Date d'inscription mardi 16 avril 2013 Statut Membre Dernière intervention 30 août 2013 - 30 août 2013 à 16:27
djflexlive Messages postés 557 Date d'inscription mercredi 26 mars 2008 Statut Membre Dernière intervention 23 avril 2015 - 31 août 2013 à 05:03
Bonjour,

je veux afficher une image plus un bloc statique sur magento MAIS il ne fait que soit l'un soit l'autre j'y suis depuis 8 bonnes heures maintenant et ne trouve pas la solution
voici mon code:
$picto = array($_product->getResource()->getAttribute('picto_caracteristique')->getFrontend()->getValue($_product));

foreach ($picto as $picto){
	
	if($picto == 'protection')
	echo '<img src="../../../../../../../../skin/frontend/default/magikshoes/images/breathable.png" />';
	echo $this->getLayout()->createBlock('cms/block')->setBlockId('breathable')->toHtml();
	
	if($picto == 'easyfit')
	
	echo  '<img src="../../../../../../../../skin/frontend/default/magikshoes/images/breathable.png" />';
	echo $this->getLayout()->createBlock('cms/block')->setBlockId('attache')->toHtml();



alors j'ai essayer de faire ça en faisant un echo d'une div ou d'un span via le css mais ça ne marche pas non plus enfin j'ai essayé bcp de choses. si qqun a la solution je suis preneur.

merci a tous d'avance.

A voir également:

1 réponse

djflexlive Messages postés 557 Date d'inscription mercredi 26 mars 2008 Statut Membre Dernière intervention 23 avril 2015 95
31 août 2013 à 05:03
foreach ($picto as $picto){

Tu peux pas utiliser le meme nom de variable dans ta boucle foreach.
0