Page 2 of 3

Re: DISABLE - Product Image Popup Size

Posted: Fri Mar 30, 2012 5:20 pm
by billyn_hk
just passing here to look for way shut down the popup feature, as that will burden my server which is a tiny lite web hosting with plenty of products. (unfortunately the above method does not work for my version)

For OpenCart 1.5.2.1 , after some study, I found you can achieve easily on HTML technique

locate for the file catalog/view/theme/default/template/product/product.tpl

Find from top of file:

<div class="image"><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox" rel="colorbox"> <img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" /></a></div>

Replace with:

<div class="image"><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox" rel="colorbox"></a><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" /> </div>

The technique is by Turn this HTML <a href .....> <img ....> </a>

into this HTML < a href ......></a> <img .....>

so the link will never be able to be clicked.

hope that helps who need this

Re: DISABLE - Product Image Popup Size

Posted: Tue May 08, 2012 4:29 pm
by robster
Simple but effective - thanks billyn_hk

Re: DISABLE - Product Image Popup Size

Posted: Wed May 23, 2012 2:44 am
by NikkiC
emmetje wrote: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'],

This method works perfect with 1.5.2.1 - Thanks!!! :-)

Re: DISABLE - Product Image Popup Size

Posted: Sun Jul 08, 2012 2:20 pm
by Mack24
Thank You merrydukaan! The vqmod works great! I thought I had a time consuming task ahead of me.

Opencart v1.5.1.3, php 5.1.6, Apache/2.2.3 (CentOS)

Re: DISABLE - Product Image Popup Size

Posted: Fri Apr 12, 2013 4:27 am
by Valentin_
Great Job !!!
This method works perfect with 1.5.5.1 - Thanks!!!

Re: DISABLE - Product Image Popup Size

Posted: Fri Apr 19, 2013 5:32 am
by sultanchannel
thanks to emmetje!
this method is working on OC 1.5.4.1! great solution and useful feature.

Re: DISABLE - Product Image Popup Size

Posted: Tue May 14, 2013 7:43 pm
by taksmara
Hi,

I have taken all of the advice from this thread but nothing changes.
I am on AceShop: 1.4.6 and OpenCart: 1.5.1.3.
I first tried editing code as per emmetje but nothing.
Then I replaced product.php with the one that k.kakkad provided, still nothing.
I also dropped Product Image Popup Size_Disable.xml into my vqmod/xml folder.
Yup, nothing.

Something I was not able to do was STEP 3 (DIR-rename):
DIR is in: OPENCART-ROOT\catalog\view\javascript\jquery
DIR name is: thickbox

I found neither a jquery directory within my javascript nor a thickbox directory.

Is there something else I can do?

Re: DISABLE - Product Image Popup Size

Posted: Sun Oct 06, 2013 3:42 am
by iamafaker
i am working on category.php
which line of code should i edit?? and how ?? :clown:

Re: DISABLE - Product Image Popup Size

Posted: Thu Oct 31, 2013 9:49 am
by djkfunk
thanks emmetje for the update for 1.5.1 - also working on 1.5.6! ;D

Re: DISABLE - Product Image Popup Size

Posted: Sun Nov 10, 2013 1:49 pm
by Mack24
Thanks emmetje! Works great on 1.5.5.1 - Sure would be great to have this option in the admin area.

Re: DISABLE - Product Image Popup Size

Posted: Thu May 29, 2014 7:51 pm
by gtamborero
After try lots of options, the best and easiest for us has been add those lines in stylesheet.css:

Code: Select all

.zoomLens {
	display: none !important;
}

.zoomContainer {
	display: none !important;
}
Thanks!!!

Re: DISABLE - Product Image Popup Size

Posted: Fri Jun 13, 2014 9:24 pm
by hrm143
Can we make this work for "thumb" images as well? i tried but not working..replacing the "popup" with "thumb"..please help.

Re: DISABLE - Product Image Popup Size

Posted: Tue Feb 23, 2016 8:50 pm
by jigar
hi
can anybody tell me how to disable image popup in opencart 2.1.0.2 on product page and use the functionality which is been used by flipkart or the paytm.

Re: DISABLE - Product Image Popup Size

Posted: Fri Jul 08, 2016 7:02 pm
by coldrex
Any ideas how to disable image popup resize in OC 2.2, default theme?

In /catalog/controller/product/product.php I found a code with "popup" variables, I think this is what we need.

But I cant understand how to modify it.

Re: DISABLE - Product Image Popup Size

Posted: Sat Jul 09, 2016 2:01 am
by straightlight
coldrex wrote:Any ideas how to disable image popup resize in OC 2.2, default theme?

In /catalog/controller/product/product.php I found a code with "popup" variables, I think this is what we need.

But I cant understand how to modify it.
In catalog/controller/product/product.php file,

find:

Code: Select all

foreach ($results as $result) {
				$data['images'][] = array(
					'popup' => $this->model_tool_image->resize($result['image'], $this->config->get($this->config->get('config_theme') . '_image_popup_width'), $this->config->get($this->config->get('config_theme') . '_image_popup_height')),
					'thumb' => $this->model_tool_image->resize($result['image'], $this->config->get($this->config->get('config_theme') . '_image_additional_width'), $this->config->get($this->config->get('config_theme') . '_image_additional_height'))
				);
			}
if you wish to entirely remove the resizing methods:

Code: Select all

foreach ($results as $result) {
				$data['images'][] = array(
					'popup' => $result['image'],
					'thumb' => $result['image'],				);
			}
In this case, using two different keys from the array which would point to the same image size would be useless but it is simply to indicate the example on how to remove the sizing from the images. :)

You can also manipulate these from the same file:

Code: Select all

if ($product_info['image']) {
				$data['popup'] = $this->model_tool_image->resize($product_info['image'], $this->config->get($this->config->get('config_theme') . '_image_popup_width'), $this->config->get($this->config->get('config_theme') . '_image_popup_height'));
			} else {
				$data['popup'] = '';
			}

			if ($product_info['image']) {
				$data['thumb'] = $this->model_tool_image->resize($product_info['image'], $this->config->get($this->config->get('config_theme') . '_image_thumb_width'), $this->config->get($this->config->get('config_theme') . '_image_thumb_height'));
			} else {
				$data['thumb'] = '';
			}

Re: DISABLE - Product Image Popup Size

Posted: Wed Jul 13, 2016 4:26 am
by coldrex
I tried this:

foreach ($results as $result) {
$data['images'][] = array(
'popup' => $result['image'],
'thumb' => $result['image'], );
}

Image could not be loaded.

Could You please come back with a certain code, please?

Iam not a programmer, sorry :)

Re: DISABLE - Product Image Popup Size

Posted: Wed Jul 13, 2016 4:52 am
by straightlight
coldrex wrote:I tried this:

foreach ($results as $result) {
$data['images'][] = array(
'popup' => $result['image'],
'thumb' => $result['image'], );
}

Image could not be loaded.

Could You please come back with a certain code, please?

Iam not a programmer, sorry :)
That is the point of this topic; to disable the product image popup size.

Re: DISABLE - Product Image Popup Size

Posted: Wed Jul 13, 2016 2:25 pm
by coldrex
straightlight wrote:
That is the point of this topic; to disable the product image popup size.
To disble popup SIZE. Exactly.

And this disables the image itself.

But we need not to cut it inside the popup, to have it in original size..

Re: DISABLE - Product Image Popup Size

Posted: Wed Jul 13, 2016 6:30 pm
by straightlight
coldrex wrote:
straightlight wrote:
That is the point of this topic; to disable the product image popup size.
To disble popup SIZE. Exactly.

And this disables the image itself.

But we need not to cut it inside the popup, to have it in original size..
So by stating: tried this on the above, could you provide the step-by-step that you did?

Re: DISABLE - Product Image Popup Size

Posted: Wed Jul 13, 2016 7:41 pm
by coldrex
I went to:

catalog/controller/product/product.php file

Found:

foreach ($results as $result) {
$data['images'][] = array(
'popup' => $this->model_tool_image->resize($result['image'], $this->config->get($this->config->get('config_theme') . '_image_popup_width'), $this->config->get($this->config->get('config_theme') . '_image_popup_height')),

and replaced with:

foreach ($results as $result) {
$data['images'][] = array(
'popup' => $result['image'],
'thumb' => $result['image'], );
}