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?
I recommend first upgrading to Joomla 2.5.1. Joomla 1.7 is end of life.
add this line to vmsite-ltr.css
.medium-image { width:435px;}
of course set your width yourself
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
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.
this should be in the next version update i think..