Author Topic: Resizing thumbnail size  (Read 5010 times)


  • Beginner
  • *
  • Posts: 38
Resizing thumbnail size
« on: December 12, 2009, 23:06:53 pm »

I've read info at:

However none of these solutions work for me.   I removed <?php echo product_image ?> and replaced it with:
Code: [Select]
<img src='components/com_virtuemart/shop_image/product/<?php echo $product_full_image ?>' style="width: 200px;" alt=''/>
However no image displayed.  I have dynamic resizing off

I have a solution, It is slightly more complex but does work. But in this you specify the maximum thumbnail size to be displayed on all product detail pages.

2 files need to be edited.

in /components/com_virtuemart/themes/default/theme.php

edit line 85

Code: [Select]
$text = ps_product::image_tag($product['product_thumb_image'], $img_attributes, 0)."<br/>".$VM_LANG->_('PHPSHOP_FLYPAGE_ENLARGE_IMAGE');


Code: [Select]
$text = ps_product::image_tag($product['product_full_image'], $img_attributes, 1,null,200,200,true)."<br/>".$VM_LANG->_('PHPSHOP_FLYPAGE_ENLARGE_IMAGE');

the 200,200 above is the new max size of the thumbnail to display on the product page, but instead of supplying the thumb nail, the full image is supplied. This only works with dynamic resizing turned on.

edit /administrator/components/com_virtuemart/classes/ps_product.php

line 1347 change from

Code: [Select]
function image_tag($image, $args="", $resize=1, $path_appendix='product', $thumb_width=0, $thumb_height=0 ) {


Code: [Select]
function image_tag($image, $args="", $resize=1, $path_appendix='product', $thumb_width=0, $thumb_height=0,$overide=false ) {

line 1364 from

Code: [Select]
if(PSHOP_IMG_RESIZE_ENABLE == '1' || $resize==1) {
$url = $mosConfig_live_site."/components/com_virtuemart/show_image_in_imgtag.php?filename=".urlencode($image)."&amp;newxsize=".PSHOP_IMG_WIDTH."&amp;newysize=".PSHOP_IMG_HEIGHT."&amp;fileout=";


Code: [Select]
If($overide) {
$new_img_width = $thumb_width;
$new_img_height = $thumb_height;
$new_img_width = PSHOP_IMG_WIDTH;
if(PSHOP_IMG_RESIZE_ENABLE == '1' || $resize==1) {
$url = $mosConfig_live_site."/components/com_virtuemart/show_image_in_imgtag.php?filename=".urlencode($image)."&amp;newxsize=".$new_img_width."&amp;newysize=".$new_img_height."&amp;fileout=";

Basically, if overide is not set to true or not set at all, everything works as normal. When set to true it overides the default image size set in the site tab of the configuration to the size set by thumb sizes set in theme.php alteration above.

It can be seen working here

If you go back to the category you will see the thumb images at their normal size.

Nothing changed with this solution.

I found more info at:
With this solution, all I got was text that said Product_Name aligned right.
I turned off dynamic resizing and nothing changed.

Any other ideas??  I just want the thumbnail size larger!



  • Beginner
  • *
  • Posts: 3
Re: Resizing thumbnail size
« Reply #1 on: October 11, 2010, 19:06:59 pm »
This is how I solved this problem of getting large images on the product detail page.

In the file:



<?PHP echo $product_image ?>


 <a href="<?=$myimagepath ?>" rel="lightbox[product<?=$product_id?>]"><img src="<?=$myimagepath ?>" class="browseProductImage" border="0" title="<?=$product_name?>" alt="<?=$product_name?>" width="400" /></a>



  • Global Moderator
  • Super Hero
  • *
  • Posts: 10431
  • VirtueMart Version: 3+
Re: Resizing thumbnail size
« Reply #2 on: October 11, 2010, 19:15:06 pm »
this is the code I use for large image on flypage

<img src="components/com_virtuemart/shop_image/product/<?= $product_full_image ?>" alt="<?= $product_name ?>" /><br/><?php echo $this->vmlistAdditionalImages( $product_id, $images ) ?>