Author Topic: Additional product images displaying full size  (Read 12162 times)

cinos

  • Jr. Member
  • **
  • Posts: 85
Additional product images displaying full size
« on: February 18, 2009, 11:40:28 am »
I think this is the right place to put this.

Before the update I am positive that any additional images you added to a product, were displayed as thumbnails under the primary picture. Only when you actually clicked on them did the lightbox display them full size.

However now, every time that I add a picture it displays full size, where the thumbnail should be, pushing everything else to the side.

What could have broken this?

timmse

  • Beginner
  • *
  • Posts: 2
Re: Additional product images displaying full size
« Reply #1 on: February 21, 2009, 00:45:40 am »
Same problem for me...

asiclari

  • Beginner
  • *
  • Posts: 4
Re: Additional product images displaying full size
« Reply #2 on: February 23, 2009, 06:05:24 am »
I am have the same problem here.
The only time it will work it I have
Enable Dynamic Thumbnail Resizing? enabled under Admin > Configuration > Site.

But I do not want this enabled as it screws up the images I have for categories, add additional images should be abled to be resized in the same window.

By the way I am running Joomla 1.5.9, virtuemart 1.1.3

Desperately need to resolved as I cannot go live with my site until I upload over 500 images.

Thanks in advance.
Tony.

cinos

  • Jr. Member
  • **
  • Posts: 85
Re: Additional product images displaying full size
« Reply #3 on: February 23, 2009, 12:56:25 pm »
What I find interesting is that the first image for each product displays fine, but if I then add extra images they all display as mentioned above.  :-\

Not shop breaking, but a pain since alot of my products have several pictures (different angles, etc).

asiclari

  • Beginner
  • *
  • Posts: 4
Re: Additional product images displaying full size
« Reply #4 on: February 24, 2009, 22:31:13 pm »
That's exactly the same for me. Can I ask what configuration you have, I wonder if it happens in
virtuemart 1.1.2

If anybody can help will be so much appreciated.

Ta.

Tony

asiclari

  • Beginner
  • *
  • Posts: 4
Re: Additional product images displaying full size
« Reply #5 on: March 01, 2009, 04:45:20 am »
I found where the problem lies. The file in question is

components/com_virtuemart/show_image_in_imgtag.php

There is a section that was added in this file in version 1.1.3 compared to 1.1.2
_________________________________________________________________________________
(*)$resize_image = true;
(*)// check if dynamic thumbnails are disabled or the GD Library is not available
(*)if( PSHOP_IMG_RESIZE_ENABLE == '') {
(*)   $resize_image = false;
(*)}
(*)elseif (!extension_loaded('gd') && !dl('gd.so')) {
(*)   $resize_image = false;
(*)}
(*)
include( CLASSPATH . "ps_main.php");
(*)   
(*)if( $resize_image ) {
(*)   //   Image2Thumbnail will resize your images
(*)   include( CLASSPATH . "class.img2thumb.php");
(*)}
_________________________________________________________________________________

This seems to be causing the issue when dynamic resizing is not enabled in admin. I copied the version 1.1.2 and it has resolved my problem, not sure if it is a bug and not knowing php what to do next. Maybe one of the Admins can tell me what to do, if I need to raise a bug.

Admins, please see if this is a bug or not.

Regards,
Tony.

inkblotlabs

  • Beginner
  • *
  • Posts: 1
Re: Additional product images displaying full size
« Reply #6 on: March 02, 2009, 05:14:15 am »
Quote
I found where the problem lies. The file in question is

components/com_virtuemart/show_image_in_imgtag.php

There is a section that was added in this file in version 1.1.3 compared to 1.1.2
_________________________________________________________________________________
(*)$resize_image = true;
(*)// check if dynamic thumbnails are disabled or the GD Library is not available
(*)if( PSHOP_IMG_RESIZE_ENABLE == '') {
(*)   $resize_image = false;
(*)}
(*)elseif (!extension_loaded('gd') && !dl('gd.so')) {
(*)   $resize_image = false;
(*)}
(*)
include( CLASSPATH . "ps_main.php");
(*)   
(*)if( $resize_image ) {
(*)   //   Image2Thumbnail will resize your images
(*)   include( CLASSPATH . "class.img2thumb.php");
(*)}
_________________________________________________________________________________

This seems to be causing the issue when dynamic resizing is not enabled in admin. I copied the version 1.1.2 and it has resolved my problem, not sure if it is a bug and not knowing php what to do next. Maybe one of the Admins can tell me what to do, if I need to raise a bug.

Admins, please see if this is a bug or not.

Regards,
Tony.

do you have the exact code i should replace and where i should put it?, I do not have access to version 1.1.2 so i cant get the fix,

thanks for the help

cinos

  • Jr. Member
  • **
  • Posts: 85
Re: Additional product images displaying full size
« Reply #7 on: March 07, 2009, 11:59:52 am »
First off big up to asiclari for finding that code! The solution is so simple it has actually made me cry.  :'(

All you have to do is change line 40 from:

Code: [Select]
   $resize_image = false;
To:

Code: [Select]
   $resize_image = true;
Excuse me now, whilst I go bang my head through a wall.  >:(

MADmarion

  • Beginner
  • *
  • Posts: 8
Re: Additional product images displaying full size
« Reply #8 on: March 26, 2009, 12:55:54 pm »
Thankx a lot for that solution! I had the same issue and it worked perfect!

cinos

  • Jr. Member
  • **
  • Posts: 85
Re: Additional product images displaying full size
« Reply #9 on: March 26, 2009, 18:46:23 pm »
Cheers for that, only too happy to help. :)

derHugoZ

  • Guest
Re: Additional product images displaying full size
« Reply #10 on: April 01, 2009, 07:48:56 am »
As soon as I set
Code: [Select]
$resize_image = true;
My menu and my opened image overlap. Any ideas why?

[attachment cleanup by admin]

cinos

  • Jr. Member
  • **
  • Posts: 85
Re: Additional product images displaying full size
« Reply #11 on: April 02, 2009, 17:49:57 pm »
Looks like it could be a problem with lightbox or perhaps with the menu you're using. Honestly though I'm not sure. :(

Are you able to try a different menu, to see if the problem can be replicated?

derHugoZ

  • Guest
Re: Additional product images displaying full size
« Reply #12 on: April 03, 2009, 06:33:25 am »
I tried a different template and the same happens. It is like the top frame is above the lighbox.

But anyways, this probably belongs to another topic. I am just wondering because it was working fine before and I just changed the true and false in the code around and this is what happened. I will try to recreate it and see what happens.

thanks for your help.

cheers

cinos

  • Jr. Member
  • **
  • Posts: 85
Re: Additional product images displaying full size
« Reply #13 on: April 03, 2009, 11:14:00 am »
Probably a silly question but just wanted to make sure :)

When you changed the code you did change the bit here, didn't you?

Code: [Select]
(*)if( PSHOP_IMG_RESIZE_ENABLE == '') {
(*)   $resize_image = false;

I'm sure you did, I'm just asking incase it's an instance of Ockham's Razor. :)

Maykel

  • Beginner
  • *
  • Posts: 17
Re: Additional product images displaying full size
« Reply #14 on: April 08, 2009, 15:33:46 pm »
Thanks this worked for me also. Áll my thumbnails are small right now. But now only the image added to the product shows up big. When I choose next (To go to the next extra added image) the big image has the same size as the thumbnail.

What goed wrong here I dont understand.

Greetings from Holland