VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: jimpett81 on April 23, 2016, 15:25:33 PM

Title: browse view image size
Post by: jimpett81 on April 23, 2016, 15:25:33 PM
Hi All,

I have a product category page with lots of images on that I need to speed up by reducing file sizes. The images are large but this is unavoidable at the moment as they need to be in order to work with my zoom function in the product details page. I am using Joomla 3.5 and VirtueMart 3.0.14.

Can I display a separate image in the details page to the one in the browse (category)one? I thought replacing the thumb might work but it did nothing. I have replaced the images themselves with smaller ones, this does the job on the browse page but not the detail one. I feel like this could be obvious but I'm not too sure.

Thanks,

James
Title: Re: browse view image size
Post by: GJC Web Design on April 23, 2016, 18:16:11 PM
in later VM3 +.14 I think the thumbs are dynamic IF your template is correctly coded to produce them

read  http://docs.virtuemart.net/tutorials/templating-layouts/222-different-thumbnail-sizes.html
Title: Re: browse view image size
Post by: jenkinhill on April 23, 2016, 23:41:56 PM
In the default templates for VirtueMart 3 only the generated thumb is used on the category pages and only the full image used on ptoduct details, in each case sized as necessary for display by CSS. I have seen a couple of commercial templates which used the full image on the cat view, too. I assumed they were old VM2 templates cobbled to work with VM3.
Title: Re: browse view image size
Post by: jimpett81 on April 24, 2016, 17:55:13 PM
I have just installed the VM and made some changes with css so I should be on the default setup but it is showing the same image on both product pages and category ones.

Any idea of what I would need to change to have it call for the generated thumb on the category page?

Thanks,

James
Title: Re: browse view image size
Post by: GJC Web Design on April 24, 2016, 19:43:51 PM
you mean two different images?  not the thumb derived from the main?

out of the box I don't think its possible
Title: Re: browse view image size
Post by: jimpett81 on April 25, 2016, 11:31:41 AM
I just want to use the generated thumb on the category page, is that not possible? I thought that was the default.

Thanks,

James
Title: Re: browse view image size
Post by: GJC Web Design on April 25, 2016, 11:51:10 AM
it is the default-- must be your template that's duff

try with protostar
Title: Re: browse view image size
Post by: jimpett81 on April 25, 2016, 12:14:06 PM
I am only using the default VM template as my Joomla template is not a Virtuemart one. I have just instlled VM and made some css edits to make it look how I want on the VM side. Could it be that I have somehow made it display the wrong image? Any idea where I might be able to select what the file calls for?

Thanks,

James
Title: Re: browse view image size
Post by: jenkinhill on April 25, 2016, 12:46:28 PM
The category image is called in components/com_virtuemart/sublayouts/products.php

<div class="vm-product-media-container">

               <a title="<?php echo $product->product_name ?>" href="<?php echo $product->link.$ItemidStr; ?>">
                  <?php
                  echo $product->images[0]->displayMediaThumb('class="browseProductImage"', false);
                  ?>
               </a>

         </div>