Page 1 of 3
DISABLE - Product Image Popup Size
Posted: Wed Sep 02, 2009 9:14 pm
by Okogawa
Hello
Under
Settings/Image there is a setting called:
Product Image Popup Size and while this feature is great for general stores, I use quite huge images of products (banknotes/coins/antiques). In the old version of Opencart I simply by-pass the "image pop-up script" and the problem is solved, but in this version of opencart the image is sadly "hard-coded" in it's downscaling while added into the Opencart store-system.
My question is thus: Is there any way to by-pass the
Product Image Popup Size feature i.e. (bad example) so my internal image-sizes are retained? So, what scripts do I need to edit... any hint/code example would be great!
The very best regards
O
Re: DISABLE - Product Image Popup Size
Posted: Thu Sep 03, 2009 2:16 am
by Okogawa
I could not EDIT my 1st post, but here is the ENTIRE sollution step-by-step:
With this change Opencart will DISABLE thickbox and use the ORGINAL image-sizes! Depending on your needs, you can skip STEP 3 if you still want to use thickbox.
How to change:
STEP 1:
File is under: OPENCART-ROOT\catalog\controller\product\product.php
Find:
Code: Select all
$this->data['popup'] = image_resize($image, $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height'));
Replace with:
Code: Select all
$this->data['popup'] = 'image/' . $image;
STEP 2 (same file):
Find:
Code: Select all
'popup' => image_resize($result['image'] , $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height')),
Replace with:
Code: Select all
'popup' => 'image/' . $result['image'] ,
STEP 3 (DIR-rename):
DIR is in: OPENCART-ROOT\catalog\view\javascript\jquery
DIR name is: thickbox
Rename DIR to (example) thickbox-DISABLE
DONE AND DONE
Re: DISABLE - Product Image Popup Size
Posted: Thu Dec 24, 2009 3:59 am
by sai
you are my hero
thank you so much
i highly recommend the developer to insert a turn off pop-up image resize button in the admin area
Re: DISABLE - Product Image Popup Size
Posted: Fri Oct 22, 2010 3:41 pm
by jty
Okogawa is my hero too
and Sai is my hero also as s/he posted a link to this topic in another thread
So long to thickbox popup
Thank-you, thank-you
Re: DISABLE - Product Image Popup Size
Posted: Sat Mar 26, 2011 10:29 am
by Ivank
THANK YOU FOR YOUR SHARE.
Very helpful~!!

Re: DISABLE - Product Image Popup Size
Posted: Wed May 25, 2011 3:06 pm
by yiyinlah
Hi!
Ever since 1.4.9.5 came out, the code had changed for abit.
To do this in 1.4.9.5,
IN
/catalog/controller/product/product.php
Look for:
Code: Select all
$this->data['popup'] = $this->model_tool_image->resize($image, $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height'));
Change to:
Code: Select all
$this->data['popup'] = 'image/' . $image;
& within the same file....
Look for:
Code: Select all
'popup' => $this->model_tool_image->resize($result['image'] , $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height')),
Change to:
Code: Select all
'popup' => 'image/' . $result['image'] ,
_____________________________________________________________________________________
It'll work now in 1.4.9.5!
Hope this helps!
Re: DISABLE - Product Image Popup Size
Posted: Wed Sep 07, 2011 2:33 pm
by jezfez
this seems to have been changed again
any idea how to do this in 1.5.1?
please
Re: DISABLE - Product Image Popup Size
Posted: Wed Sep 07, 2011 10:42 pm
by yiyinlah
I've no idea I'm sorry I couldn't be of help.
I'm still using 1.4.9.5.
Didn't like the ways I can't import options into 1.5.1.1.
Re: DISABLE - Product Image Popup Size
Posted: Wed Sep 07, 2011 11:04 pm
by jezfez
thanks for your reply
i need to import options too, maybe i will install 1.4.9.5
Re: DISABLE - Product Image Popup Size
Posted: Thu Sep 08, 2011 1:21 am
by yiyinlah
Sure, Good luck & all the best!

Re: DISABLE - Product Image Popup Size
Posted: Tue Sep 27, 2011 10:11 pm
by emmetje
To make this work on 1.5.1
Use this:
IN
/catalog/controller/product/product.php
Look for:
Code: Select all
$this->data['popup'] = $this->model_tool_image->resize($image, $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height'));
Change to:
Code: Select all
$this->data['popup'] = 'image/' . $product_info['image'];
& within the same file....
Look for:
Code: Select all
'popup' => $this->model_tool_image->resize($result['image'] , $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height')),
Change to:
Code: Select all
'popup' => 'image/' . $result['image'],
Re: DISABLE - Product Image Popup Size
Posted: Thu Nov 03, 2011 5:52 am
by yiyinlah
Yeah, the fix provided by "emmetje" works!
Thanks!
Re: DISABLE - Product Image Popup Size
Posted: Sat Nov 26, 2011 2:09 am
by lemonie
Thank you .. this still works although the initial code is slightly different.
Re: DISABLE - Product Image Popup Size
Posted: Mon Nov 28, 2011 10:39 pm
by yiyinlah
Actually it doesn't work well with my cloudzoom =.=
Re: DISABLE - Product Image Popup Size
Posted: Thu Dec 15, 2011 8:29 pm
by k.kakkad
Thanks emmetje.
Your fix really works.
For the benefit of the community I am attaching the file that has to be replaced, so no editing of codes.
Replace the attached file to catalog/controller/product/product.php
Version - 1.5.1.3
Best,
KK
Re: DISABLE - Product Image Popup Size
Posted: Sat Dec 17, 2011 8:24 am
by Dubblicious
I can confirm that emmetje fix works for Version 1.5.1.3.

Re: DISABLE - Product Image Popup Size
Posted: Thu Dec 22, 2011 12:04 am
by jacgo
Hi All
I update the "product.php" file on my opencart.
It's seems no changes.
The image fit to my screen 1024x768.
I hope my product popup image up to 1600px
Is it possible to do it?
Thanks!
Jac
Re: DISABLE - Product Image Popup Size
Posted: Mon Jan 09, 2012 8:25 am
by merrydukaan
Hi,
Thanks to emmetje, followed the given instructions and came up with my first vqmod

.
Just drop it in YourShop/vqmod/xml folder. Works with Opencart v1.5.1.3.
Those without vqmod, its easy to install, get it here:
http://code.google.com/p/vqmod/download ... encart.zip
Happy new Openyear!
Re: DISABLE - Product Image Popup Size
Posted: Mon Jan 09, 2012 9:44 am
by jacgo
merrydukaan wrote:Hi,
Thanks to emmetje, followed the given instructions and came up with my first vqmod

.
Just drop it in YourShop/vqmod/xml folder. Works with Opencart v1.5.1.3.
Those without vqmod, its easy to install, get it here:
http://code.google.com/p/vqmod/download ... encart.zip
Happy new Openyear!
Hi merrydukaan
I hope my popup image can up to 1600px
I update the Product Image Popup Size_Disable.xml file to my shop "myshop/vqmod/xml folder.
It's seems no changes.
Do I need to make any settings?
Hope you can help.
Great thanks!
Jacgo
Re: DISABLE - Product Image Popup Size
Posted: Tue Jan 10, 2012 5:40 pm
by merrydukaan
Hi Jacgo,
I am not a programmer and don't understand why this works after disabling in .xml, but try Admin>>System>>Settings>>Image: *Product Image Popup Size: 1600 x 1600(your biggest image size). Although with default fancybox settings the popups will still be shrunk to fit in the browser. For any further image/popup customisation, like fullscreen, etc you should look for help here:
http://fancybox.net/home and make changes to product.tpl.
Hope this helps.