News:

Looking for documentation? Take a look on our wiki

Main Menu

Show thumb images on product details pages

Started by Piombo, February 26, 2014, 19:23:49 PM

Previous topic - Next topic

Piombo

Hello!

I have one photo for each product and i made a small (thumb) photos manually (as more beautiful than the automatic resizing). But on product details page - I see the big picture.

Code like:


<div class="width and height specified in the css">
   <a href="Big Picture">
      <img src="Big Picture" />
   </a>
</div>


How do I change the code in default_images.php file to show a small image?

This line displays the path to the small image on product details page:


<?php echo $this->product->images[0]->file_url_thumb?>


But I can`t figure out where to use it....


$document->addScriptDeclaration ($imageJS);

if (!empty($this->product->images)) {
$image = $this->product->images[0];
?>
<div class="main-image">

<?php
echo $image->displayMediaFull("",true,"rel='vm-additional-images'");
?>


I have tried in different ways... but i get only "fatal error"

Please help! Thanks!

Piombo

Elementary solution: do not touch anything, just change it  "displayMediaFull" to "displayMediaThumb"