PrestaShop Forum

The best place in the world to ask questions about PrestaShop and get advice from our passionate community!

PrestaShop Forum

Jump to content

 

[RESOLU] Image fabricant dans module manufacturer

10 replies to this topic
#1
atipix

    PrestaShop Apprentice

  • Members
  • PipPip
  • 25 posts
Bonjour à tous,

je souhaite afficher l'image du fabricant dans le module manufacturer,
pour cela j'ai édité manufacturer.tpl où j'ai inséré :

{if $product->manufacturer_name}

getmanufacturerLink($product->id_manufacturer, $product_manufacturer->link_rewrite)}" title="{$product->manufacturer_name}">
id}-medium.jpg" alt="{$product_manufacturer->name}" vspace="3px"/>


{/if}

Ça fonctionne tant que je ne suis pas logué.
Dès que je me connecte en tant que client l'image fabricant ne s'affiche plus !
Avez-vous une idée d'où vient l'erreur SVP ?

Merci pour votre aide.

#2
Yoya

    PrestaShop Fanatic

  • Members
  • PipPipPipPip
  • 1697 posts
Salut atipix,
essayes plutot çà pour la page manufacturer.tpl:





Pierre.

Rejoins la communauté FR de Prestashop et discutes avec elle !

Connecte toi sur www.cgichat.epiknet.org, choisis toi un nom, rejoins le canal #prestashop !


#3
atipix

    PrestaShop Apprentice

  • Members
  • PipPip
  • 25 posts
J'ai contourné le problème,
en insérant une variable test dans la page product.tpl

{if $product->manufacturer_name}
{assign var='test' value=1}
{/if}

Et selon le retour de test on affiche ou pas l'image dans le bloc fabricant en rapport avec le produit affiché :

{if $test}

getmanufacturerLink($product->id_manufacturer, $product_manufacturer->link_rewrite)}" title="{$product->manufacturer_name}">
id}-medium.jpg" alt="{$product_manufacturer->name}"/>


{/if}

#4
atipix

    PrestaShop Apprentice

  • Members
  • PipPip
  • 25 posts
Non, en fait le bon code c'est :

{if $product_manufacturer->id}

getmanufacturerLink($product_manufacturer->id, $product_manufacturer->link_rewrite)}" title="{$product->manufacturer_name}">
id}-medium.jpg" alt="{$product_manufacturer->name}" vspace="3px"/>


{/if}

CA MARCHE !!!

#5
Yoya

    PrestaShop Fanatic

  • Members
  • PipPipPipPip
  • 1697 posts
Si CA MARCHE !!! un petit RESOLU la prochaine fois ;) -yoya971

Rejoins la communauté FR de Prestashop et discutes avec elle !

Connecte toi sur www.cgichat.epiknet.org, choisis toi un nom, rejoins le canal #prestashop !


#6
atipix

    PrestaShop Apprentice

  • Members
  • PipPip
  • 25 posts
Et comment fait on ?

#7
rom

    PrestaShop Newbie

  • Members
  • Pip
  • 10 posts
Salut,

Y a cela aussi :

{if $product->manufacturer_name}
getManufacturerLink($product->id_manufacturer, $manufacturer.link_rewrite)|escape:'htmlall':'UTF-8'}">id_manufacturer}-medium.jpg" alt="{$product->manufacturer_name}" title="{$product->manufacturer_name}">

{/if}

++

#8
maofree

    PrestaShop Addict

  • Members
  • PipPipPip
  • 870 posts
Hi
Sorry, but I can't speak in france.
I have the same problem and I have tried your solution but it doesn't work with me.
I have finished a module for block of manufacturers with slideshow, everything is ok but I don't know how to show the manufacturers's images. I have tried some solutions. My code in .tpl is:



and the problem is with $manufacturer.image in


Can you help me? (use the code's tag to post your solution)
Thanks

#9
rom

    PrestaShop Newbie

  • Members
  • Pip
  • 10 posts
Hy,


Don't use : {$img_manu_dir}{$manufacturer.image|escape:'htmlall':'UTF-8'}-medium.jpg" for img...

But use the $manufacturer.id_manufacturer for get your good name of your picture


Bye

#10
maofree

    PrestaShop Addict

  • Members
  • PipPipPip
  • 870 posts
Thank you very much
It works



I will post the module
It will be similar to this
http://www.prestasho..._per_le_offerte

bye

#11
maofree

    PrestaShop Addict

  • Members
  • PipPipPip
  • 870 posts
Module here
http://www.prestasho...r_i_produttori/

ciaooooooooo