VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: domkart on June 18, 2012, 08:58:00 AM

Title: Hot to remove thumbnail in products
Post by: domkart on June 18, 2012, 08:58:00 AM
Hi everyone,
I try to remove thumbnail in product details

(http://i.minus.com/jbycUmf65rcJoh.jpg) (http://minus.com/lbycUmf65rcJoh)

I want only the main picture with out thumbnail cause i add 1 picture to 1 product
Any idea how to remove it ?

in code i found additional-images but dont know how to modificate it
Title: Re: Hot to remove thumbnail in products
Post by: jenkinhill on June 18, 2012, 16:07:58 PM
That looks like VirtueMart 2 ??  You posted this in the VM1.1. area of the forum - moving to correct section.
Title: Re: Hot to remove thumbnail in products
Post by: domkart on June 19, 2012, 15:00:21 PM
Ohh yes, sorry for my mistake its 2.0.3 version
Title: Re: Hot to remove thumbnail in products
Post by: Artanis on June 19, 2012, 15:36:23 PM
Open this file: \components\com_virtuemart\views\productdetails\tmpl\default_images.php

If You simply want to remove additional images completly, simply comment out or delete this portion:

<div class="additional-images">
<?php
// List all Images
if (count($this->product->images) > 0) {
    foreach ($this->product->images as $image) {
echo '<div class="floatleft">' $image->displayMediaThumb('class="product-image"'true'class="modal"'truetrue) . '</div>'//'class="modal"'
    }
}
?>

        <div class="clear"></div>
    </div>


But if You want for this additional image block to show up only when there are more than one image, change above segment to this:


<div class="additional-images">
<?php
// List all Images
if (count($this->product->images) > 1) {
    foreach ($this->product->images as $image) {
echo '<div class="floatleft">' $image->displayMediaThumb('class="product-image"'true'class="modal"'truetrue) . '</div>'//'class="modal"'
    }
}
?>

        <div class="clear"></div>
    </div>



P.S. Best and right way is to not modify Virtuemart components themslefs, but to create new so called override file in \templates\yourtemplate\html\components\com_virtuemart\views\productdetails\tmpl\default_images.php
Title: Re: Hot to remove thumbnail in products
Post by: 7racecar7 on September 10, 2012, 23:27:49 PM
Would there be a way to choose what additional images are shown?  For example, I would like to remove the default photo (the one that is large to start with) in the thumbnail section,  could i somehow get the thumbnails to start with the 2nd image?
Title: Re: Hot to remove thumbnail in products
Post by: 7racecar7 on September 11, 2012, 00:56:36 AM
figured it out (array_slice($this->product->images,1) as $image)