Pb pour affichage image+ bloc statique sur magento

kerbal Messages postés 10 Date d'inscription   Statut Membre Dernière intervention   -  
djflexlive Messages postés 557 Date d'inscription   Statut Membre Dernière intervention   -
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   Statut Membre Dernière intervention   95
 
foreach ($picto as $picto){

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