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
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
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:
Replace with:
STEP 2 (same file):
Find:
Replace with:
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
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'));
Code: Select all
$this->data['popup'] = 'image/' . $image;
Find:
Code: Select all
'popup' => image_resize($result['image'] , $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height')),
Code: Select all
'popup' => 'image/' . $result['image'] ,
DIR is in: OPENCART-ROOT\catalog\view\javascript\jquery
DIR name is: thickbox
Rename DIR to (example) thickbox-DISABLE
DONE AND DONE
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:
Change to:
& within the same file....
Look for:
Change to:
_____________________________________________________________________________________
It'll work now in 1.4.9.5!
Hope this helps!
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'));
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')),
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.
To make this work on 1.5.1
Use this:
IN /catalog/controller/product/product.php
Look for:
Change to:
& within the same file....
Look for:
Change to:
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'));
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')),
Code: Select all
'popup' => 'image/' . $result['image'],
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
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
Attachments
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!
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)
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
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.
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)
Who is online
Users browsing this forum: No registered users and 289 guests