VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: Piombo on February 26, 2014, 19:23:49 PM

Title: Show thumb images on product details pages
Post by: Piombo on February 26, 2014, 19:23:49 PM
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!
Title: Re: Show thumb images on product details pages
Post by: Piombo on February 27, 2014, 12:40:00 PM
Elementary solution: do not touch anything, just change it  "displayMediaFull" to "displayMediaThumb"