afficher image ordering 1 show_block_img.php

  • Posts: 2639
  • Thank you received: 66
  • Hikashop Business
12 years 2 weeks ago #75176

Je ne veux afficher dans le detail que la grande image ordering = 1

dans templates/TPL/html/com_hikashop/product/show_block_img.php

$image = reset($this->element->images);
$photo = '';
foreach($this->element->images as $num => $image){
	if ($num==1){
		$photo = '<img src="' . $this->image->uploadFolder_url . $image->file_path . '" alt="' . $image->file_name . '" id="hikashop_main_image"  />';
	}
}
echo $photo;

est ce la seule methode ?
il n'y a pas plus simple ?
un truc du genre $this->element->images[1]

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

  • Posts: 13201
  • Thank you received: 2322
12 years 2 weeks ago #75293

Bonjour,

Vous pouvez tout à fait utiliser ceci:

echo $this->image->display($this->element->images[0]->file_path, 'hikashop_main_image'.$variant_name, $this->element->images[0]->file_name, 'class="hikashop_child_image"','', $width,  $height);
à la place du foreach.

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

  • Posts: 2639
  • Thank you received: 66
  • Hikashop Business
12 years 2 weeks ago #75295

ha voilà c'est beaucoup mieux

merci

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

Time to create page: 0.068 seconds
Powered by Kunena Forum