Skip to main content

afficher image ordering 1 show_block_img.php

More
13 years 10 months ago #75176 by erickb
Je ne veux afficher dans le detail que la grande image ordering = 1

dans templates/TPL/html/com_hikashop/product/show_block_img.php
Code:
$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.

More
13 years 10 months ago #75293 by Xavier
Bonjour,

Vous pouvez tout à fait utiliser ceci:
Code:
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.

More
13 years 10 months ago #75295 by erickb
ha voilà c'est beaucoup mieux

merci

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

Time to create page: 0.162 seconds
Powered by Kunena Forum