Post by billyn_hk » Fri Mar 30, 2012 5:20 pm

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

Newbie

Posts

Joined
Thu Mar 29, 2012 12:13 pm

Post by robster » Tue May 08, 2012 4:29 pm

Simple but effective - thanks billyn_hk

I know my place...!


User avatar
Active Member

Posts

Joined
Tue Jul 13, 2010 8:08 pm
Location - North Yorkshire, UK

Post by NikkiC » Wed May 23, 2012 2:44 am

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!!! :-)

Newbie

Posts

Joined
Fri Feb 17, 2012 5:44 am

Post by Mack24 » Sun Jul 08, 2012 2:20 pm

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)

Newbie

Posts

Joined
Wed Oct 26, 2011 5:28 pm

Post by Valentin_ » Fri Apr 12, 2013 4:27 am

Great Job !!!
This method works perfect with 1.5.5.1 - Thanks!!!

Newbie

Posts

Joined
Fri Apr 12, 2013 4:24 am

Post by sultanchannel » Fri Apr 19, 2013 5:32 am

thanks to emmetje!
this method is working on OC 1.5.4.1! great solution and useful feature.

Newbie

Posts

Joined
Mon Jan 07, 2013 11:17 pm

Post by taksmara » Tue May 14, 2013 7:43 pm

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?

Newbie

Posts

Joined
Tue May 14, 2013 7:23 pm

Post by iamafaker » Sun Oct 06, 2013 3:42 am

i am working on category.php
which line of code should i edit?? and how ?? :clown:

Active Member

Posts

Joined
Wed Sep 18, 2013 3:19 pm

Post by djkfunk » Thu Oct 31, 2013 9:49 am

thanks emmetje for the update for 1.5.1 - also working on 1.5.6! ;D

Newbie

Posts

Joined
Thu Sep 15, 2011 10:19 pm

Post by Mack24 » Sun Nov 10, 2013 1:49 pm

Thanks emmetje! Works great on 1.5.5.1 - Sure would be great to have this option in the admin area.

Newbie

Posts

Joined
Wed Oct 26, 2011 5:28 pm

Post by gtamborero » Thu May 29, 2014 7:51 pm

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

Newbie

Posts

Joined
Fri Aug 19, 2011 5:24 pm

Post by hrm143 » Fri Jun 13, 2014 9:24 pm

Can we make this work for "thumb" images as well? i tried but not working..replacing the "popup" with "thumb"..please help.

Newbie

Posts

Joined
Sun Jun 01, 2014 3:16 am

Post by jigar » Tue Feb 23, 2016 8:50 pm

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.

Newbie

Posts

Joined
Tue Feb 23, 2016 8:42 pm

Post by coldrex » Fri Jul 08, 2016 7:02 pm

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.

User avatar
New member

Posts

Joined
Thu Jun 07, 2012 10:05 pm

Post by straightlight » Sat Jul 09, 2016 2:01 am

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'] = '';
			}

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com contractor officials representative


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by coldrex » Wed Jul 13, 2016 4:26 am

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 :)

User avatar
New member

Posts

Joined
Thu Jun 07, 2012 10:05 pm

Post by straightlight » Wed Jul 13, 2016 4:52 am

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.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com contractor officials representative


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by coldrex » Wed Jul 13, 2016 2:25 pm

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..

User avatar
New member

Posts

Joined
Thu Jun 07, 2012 10:05 pm

Post by straightlight » Wed Jul 13, 2016 6:30 pm

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?

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com contractor officials representative


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by coldrex » Wed Jul 13, 2016 7:41 pm

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'], );
}

User avatar
New member

Posts

Joined
Thu Jun 07, 2012 10:05 pm
Who is online

Users browsing this forum: No registered users and 64 guests