Author Topic: Virtuemart 2.0.2 and Thumbnails Problem  (Read 3529 times)

Federico

  • Beginner
  • *
  • Posts: 17
Virtuemart 2.0.2 and Thumbnails Problem
« on: February 25, 2012, 13:49:43 pm »
Hello,

I’ve just updated to 2.0.2 version and found that the image scaling on product page does not work. It shows the enlarged image only and not the thumbnail.

Eg:
http://www.freeback.it/index.php/component/virtuemart/bigiotteria/bracciali/bracciale-alb01001-detail?Itemid=0

Joomla: 1.7.5 Stable
Virtuemart: 2.0.2
Db: 5.1.49-3
Php: 5.3.3-7+squeeze8

How to solve the problem?

Twix

  • Beginner
  • *
  • Posts: 46
Re: Virtuemart 2.0.2 and Thumbnails Problem
« Reply #1 on: February 25, 2012, 16:24:46 pm »
I recommend first upgrading to Joomla 2.5.1. Joomla 1.7 is end of life.

vapro

  • Beginner
  • *
  • Posts: 9
Re: Virtuemart 2.0.2 and Thumbnails Problem
« Reply #2 on: February 25, 2012, 16:35:43 pm »
add this line to vmsite-ltr.css

.medium-image { width:435px;}
 
of course set your width yourself



samsontumanyan

  • Beginner
  • *
  • Posts: 49
Re: Virtuemart 2.0.2 and Thumbnails Problem
« Reply #3 on: February 26, 2012, 10:16:02 am »
I do this`

IN file:
/components/com_k2/css/k2.css


Add on Line 30 in your k2.css

img {
    border: medium none;
    max-width: 100%;
}

If your site run using SSL (https:)

K2 SSL Fix




I responded in more detail on the other post Lefteris refers to (if you want more details and a better understanding, please visit that post), but long story short, I came up with a solution that can be used in your template to ensure that no components (K2 or otherwise) include non-secure dependencies on pages that you want to be secure. Here's the code:

// SSL fix to resolve issues with K2
if ( substr($this->base, 0, 5) == 'https' ) {
$head = $this->getHeadData();
// first, the stylesheets:
foreach($head['styleSheets'] as $link => $props) {
if (strpos($link, 'http:') !== false) {
$fixedLink = str_replace('http:', 'https:', $link);
$head['styleSheets'][$fixedLink] = $props;
unset($head['styleSheets'][$link]);
}
}
// then, the js:
foreach($head['scripts'] as $link => $props) {
if (strpos($link, 'http:') !== false) {
$fixedLink = str_replace('http:', 'https:', $link);
$head['scripts'][$fixedLink] = $props;
unset($head['scripts'][$link]);
}
}
$this->setHeadData($head);
}

Just put that snippet in your template (it shouldn't matter where you put it, but I find it helpful to put all php logic at the top of my templates, before the actual html markup; though regardless of where you put the code snippet, make sure it's in a <?php ?> block), and your secure pages will become secure once more.

And add this code in a your template component.php file

Regards, Samson Tumanyan

Federico

  • Beginner
  • *
  • Posts: 17
Re: Virtuemart 2.0.2 and Thumbnails Problem
« Reply #4 on: February 27, 2012, 01:42:10 am »
Hello,

Thank you for your answers.

I solved modifying default_images.php file, line 26:

from

<?php echo $this->product->images[0]->displayMediaFull('class="medium-image" id="medium-image"', false, "class='modal'", true); ?>

to

<?php echo $this->product->images[0]->displayMediaFull('class="product-image" id="medium-image"', false, "class='modal'", true); ?>

I hope this will not cause other problems.

janis

  • Beginner
  • *
  • Posts: 41
Re: Virtuemart 2.0.2 and Thumbnails Problem
« Reply #5 on: February 27, 2012, 19:55:52 pm »
this should be in the next version update i think..
Files:  http://dev.virtuemart.net/projects/virtuemart/files

Updates:
https://github.com/VirtueMart/virtuemart/commits/master


love virtuemart when it's 10000% stable like in version 4.5 in the year 2015