Post by Okogawa » Wed Sep 02, 2009 9:14 pm

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! ;D

The very best regards

O

Newbie

Posts

Joined
Wed Sep 02, 2009 7:11 pm

Post by Okogawa » Thu Sep 03, 2009 2:16 am

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

Newbie

Posts

Joined
Wed Sep 02, 2009 7:11 pm

Post by sai » Thu Dec 24, 2009 3:59 am

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

sai
Newbie

Posts

Joined
Sat Nov 21, 2009 6:55 am

Post by jty » Fri Oct 22, 2010 3:41 pm

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

jty
Active Member

Posts

Joined
Sat Aug 30, 2008 8:19 am

Post by Ivank » Sat Mar 26, 2011 10:29 am

THANK YOU FOR YOUR SHARE.
Very helpful~!! ;)

Newbie

Posts

Joined
Sun Mar 20, 2011 10:48 pm

Post by yiyinlah » Wed May 25, 2011 3:06 pm

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!

I'm using Opencart 1.5.4.1 & vQmod 2.3.2.


User avatar
Active Member

Posts

Joined
Thu Sep 23, 2010 1:19 pm
Location - Singapore

Post by jezfez » Wed Sep 07, 2011 2:33 pm

this seems to have been changed again

any idea how to do this in 1.5.1?

please

New member

Posts

Joined
Wed Sep 07, 2011 2:24 pm

Post by yiyinlah » Wed Sep 07, 2011 10:42 pm

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.

I'm using Opencart 1.5.4.1 & vQmod 2.3.2.


User avatar
Active Member

Posts

Joined
Thu Sep 23, 2010 1:19 pm
Location - Singapore

Post by jezfez » Wed Sep 07, 2011 11:04 pm

thanks for your reply

i need to import options too, maybe i will install 1.4.9.5

New member

Posts

Joined
Wed Sep 07, 2011 2:24 pm

Post by yiyinlah » Thu Sep 08, 2011 1:21 am

Sure, Good luck & all the best! ;)

I'm using Opencart 1.5.4.1 & vQmod 2.3.2.


User avatar
Active Member

Posts

Joined
Thu Sep 23, 2010 1:19 pm
Location - Singapore

Post by emmetje » Tue Sep 27, 2011 10:11 pm

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'],

User avatar
New member

Posts

Joined
Wed Jun 22, 2011 2:18 am

Post by yiyinlah » Thu Nov 03, 2011 5:52 am

Yeah, the fix provided by "emmetje" works! :)
Thanks!

I'm using Opencart 1.5.4.1 & vQmod 2.3.2.


User avatar
Active Member

Posts

Joined
Thu Sep 23, 2010 1:19 pm
Location - Singapore

Post by lemonie » Sat Nov 26, 2011 2:09 am

Thank you .. this still works although the initial code is slightly different.

New member

Posts

Joined
Fri Nov 18, 2011 8:28 pm

Post by yiyinlah » Mon Nov 28, 2011 10:39 pm

Actually it doesn't work well with my cloudzoom =.=

I'm using Opencart 1.5.4.1 & vQmod 2.3.2.


User avatar
Active Member

Posts

Joined
Thu Sep 23, 2010 1:19 pm
Location - Singapore

Post by k.kakkad » Thu Dec 15, 2011 8:29 pm

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

Newbie

Posts

Joined
Thu Dec 15, 2011 8:23 pm

Post by Dubblicious » Sat Dec 17, 2011 8:24 am

I can confirm that emmetje fix works for Version 1.5.1.3. 8)

User avatar
New member

Posts

Joined
Tue Jun 14, 2011 2:35 pm

Post by jacgo » Thu Dec 22, 2011 12:04 am

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

New member

Posts

Joined
Thu Jun 09, 2011 12:41 am

Post by merrydukaan » Mon Jan 09, 2012 8:25 am

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!

Attachments

vqmod: Product Image Popup Size: Disable.xml
Opencart v1.5.1.3


>> search before you post and [solved] when solved
>>Opencart v1.5.1.3, php 5.1.6, Apache/2.2.3 (CentOS)


New member

Posts

Joined
Sun Jan 01, 2012 3:26 pm


Post by jacgo » Mon Jan 09, 2012 9:44 am

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

New member

Posts

Joined
Thu Jun 09, 2011 12:41 am

Post by merrydukaan » Tue Jan 10, 2012 5:40 pm

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.

>> search before you post and [solved] when solved
>>Opencart v1.5.1.3, php 5.1.6, Apache/2.2.3 (CentOS)


New member

Posts

Joined
Sun Jan 01, 2012 3:26 pm

Who is online

Users browsing this forum: No registered users and 58 guests