Image survol

  • Posts: 52
  • Thank you received: 5
  • Hikaserial Standard Hikashop Essential
12 years 7 months ago #25855

Bonjour,
dans la vue en liste, je voudrais afficher une image plus grosse lorsque l'on survole les imagettes de produits.

pour celà j'ai :
1) installé le plugin tooltips de nonumber ( www.nonumber.nl/extensions/tooltips ).
2) modifié le fichier listing_img.php pour y intégrer les tags du plugin {tip}{/tip}

j'ai fais un test avec une image "en dur" = pas de problème, j'obtiens le comportement attendu.

mon problème :
je ne sais pas comment appeler l'image thumbnail définie dans la configuration générale

<?php 
$link = hikashop_completeLink('product&task=show&cid='.$this->row->product_id.'&name='.$this->row->alias.$this->itemid.$this->category_pathway);?>
<div style="height:<?php echo $this->image->main_thumbnail_y;?>px;text-align:center;clear:both;" class="hikashop_product_image">
<?php if($this->params->get('link_to_product_page',1)){ ?>
	<a href="<?php echo $link;?>" title="<?php echo $this->escape($this->row->product_name); ?>">
<?php }
		?>
		{tip 
<?php
		echo /* c'est ici que je voudrais afficher l'image thumbnail de la taille définie dans la config générale */
		?>
		} 
<?php
		echo $this->image->display(@$this->row->file_path,false,$this->escape($this->row->file_name), '' , '' , $this->image->main_thumbnail_x,  $this->image->main_thumbnail_y);
		?>
		{/tip}

pouvez-vous m'aider ?
merci

edit : le code ne s'affiche pas correctement une fois publié dans le forum : que faut-il faire ?

Attachments:
Last edit: 12 years 7 months ago by marcmarc.

Please Log in or Create an account to join the conversation.

  • Posts: 81604
  • Thank you received: 13082
  • MODERATOR
12 years 7 months ago #25866

Bonjour,

L'URL de la miniature peut être retrouvée comme cela:
$this->image->uploadFolder_url.'thumbnail_'.$this->image->main_thumbnail_y.'x'.$this->image->main_thumbnail_x.'/'.$image->file_path

Please Log in or Create an account to join the conversation.

  • Posts: 52
  • Thank you received: 5
  • Hikaserial Standard Hikashop Essential
12 years 7 months ago #25876

merci de votre réponse.

le code : $this->image->uploadFolder_url.'thumbnail_'.$this->image->main_thumbnail_y.'x'.$this->image->main_thumbnail_x.'/'.$image->file_path;
me donne le chemin (/media/com_hikashop/upload/thumbnail_60x60/) mais il manque le nom du fichier.

Please Log in or Create an account to join the conversation.

  • Posts: 81604
  • Thank you received: 13082
  • MODERATOR
12 years 7 months ago #25884

En effet, il faut changer $image->file_path par $this->row->file_path pour ce fichier là.

Please Log in or Create an account to join the conversation.

  • Posts: 52
  • Thank you received: 5
  • Hikaserial Standard Hikashop Essential
12 years 7 months ago #25890

merci, c'est bien ça.

malheureusement mon "truc" n'a pas l'air de fonctionner dès lors qu'il y a une variable.
par exemple,
- ça, ça marche : echo '{tip <img src="/media/com_hikashop/upload/parurehellokitty.jpg" /> }';

- ça, ça ne marche pas : echo '{tip <img src="'.$this->image->uploadFolder_url.'thumbnail/'.$this->row->file_path.'/> }';

j'imagine que c'est le plugin qui est en cause.

Please Log in or Create an account to join the conversation.

  • Posts: 81604
  • Thank you received: 13082
  • MODERATOR
12 years 7 months ago #25891

Votre second code a pourtant l'air bon donc en effet cela vient peut être du plugin.

Please Log in or Create an account to join the conversation.

  • Posts: 52
  • Thank you received: 5
  • Hikaserial Standard Hikashop Essential
12 years 7 months ago #25893

je vais donc voir de ce côté là et je mettrais ici le code résultant si ça fonctionne.
à bientôt

Please Log in or Create an account to join the conversation.

  • Posts: 52
  • Thank you received: 5
  • Hikaserial Standard Hikashop Essential
12 years 7 months ago #25948

ça y est, ça marche...
je ne peux pas poster le code puisque le php est supprimé à l'affichage dans le forum mais voilà une copie d'écran avec la modif.

Attachments:

Please Log in or Create an account to join the conversation.

Time to create page: 0.064 seconds
Powered by Kunena Forum