Post by creat015 » Wed Dec 09, 2015 2:44 pm

hallo... :)

I want to ask

how to disable the image cache in OpenCart version 2.1.0.1

I was trying to find a way, and found this
http://stackoverflow.com/questions/1156 ... n-opencart

there, told me add this code

<? php echo HTTP_IMAGE. $ product_info ['image']; ?>

but I am confused code was added in what file? and the location of the folder where?
and is it true the code can disable the image cache?

or there are other ways to disable the image cache to OpenCart version 2.1.0.1

Please help me,
thank you

Newbie

Posts

Joined
Wed Dec 09, 2015 2:34 pm

Post by florinsith » Wed Dec 09, 2015 7:04 pm

Edit catalog/model/tool/image.php and after the line:

Code: Select all

public function resize($filename, $width, $height) {
add:

Code: Select all

if ($this->request->server['HTTPS']) {
			return $this->config->get('config_ssl') . 'image/' . $filename;
		} else {
			return $this->config->get('config_url') . 'image/' . $filename;
		}

Image
My Extensions - SuperTheme - Opencart templates - Opencart modules


User avatar
Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am


Post by creat015 » Fri Dec 11, 2015 12:01 am

florinsith wrote:Edit catalog/model/tool/image.php and after the line:

Code: Select all

public function resize($filename, $width, $height) {
add:

Code: Select all

if ($this->request->server['HTTPS']) {
			return $this->config->get('config_ssl') . 'image/' . $filename;
		} else {
			return $this->config->get('config_url') . 'image/' . $filename;
		}
thanks for reply
hi :)
tutorial you give whether to disable cache image?
if I see from the code that you give it to resize the image size?
if so, to resize the image size sorry it was not what I was looking for,
I look for is a way to disable the image cache
thanks

Newbie

Posts

Joined
Wed Dec 09, 2015 2:34 pm

Post by ginboomerang » Fri Dec 11, 2015 6:56 am

Can I ask why you would want to disable the image cache ?

New member

Posts

Joined
Sun Aug 28, 2011 2:51 pm

Post by florinsith » Tue Dec 15, 2015 3:52 pm

The image cache of opencart stores only the resized images so the code above disabled that, perhaps you do not know what you want.

Image
My Extensions - SuperTheme - Opencart templates - Opencart modules


User avatar
Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am


Post by vishwap » Wed Jan 20, 2016 12:00 pm

Hi i also want to disable image cache in oc 2.1.0.2.its very fustrating.why opencart dont have option to disable cache.

Newbie

Posts

Joined
Thu Aug 13, 2015 6:44 pm
Who is online

Users browsing this forum: No registered users and 37 guests