Post by IP_CAM » Wed Apr 19, 2017 8:56 am

You could only link https-images, if those images are placed on a https-server.
At least, if no Filters prevent direct image-access from such servers.
But you also may find answers here, Google knows more about OC than anyone else on Earth!:
https://www.google.com/search?q=is+it+p ... n+opencart
Good Luck ;)
Ernie

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by IP_CAM » Wed Apr 19, 2017 10:44 am

well, some Option Description Extensions exist, you may find something matching, but if you need to have it
made, it will probably not come for free.
Good Luck!
Ernie
https://www.opencart.com/index.php?rout ... escription
---
Image

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by IP_CAM » Mon Oct 16, 2017 7:25 am

Well, it's a while since, but I tried it again, after beeing linked here by another
Poster. In my v.1.5.6.5_rc (1.5.6.4+) the code in the
catalog/model/tool/image.php
file looks like this, after I replaced the default Code with the one below,
and the bottom two lines SHOWN already belong to the default Source.

Code: Select all

public function resize($filename, $width, $height, $type = "") {
if (substr($filename, 0, 7) == 'http://') {
	return $filename.'" height="'.$height.'" width="'.$width;
} elseif (!file_exists(DIR_IMAGE . $filename) || !is_file(DIR_IMAGE . $filename)) {
	return;
} else {
return;
}	
	
$info = pathinfo($filename);
$extension = $info['extension'];
but I am not even sure, if the ELSE Routine needs to be there ... ::)
---
Then, I added the Product Image Link to my Database, after generating
the image link by use of a regularely placed Image onto a Product, as seen
on the lower image part.
---
Then, I modified an existing POPUP Image VqMod, to link to the actual
linked Image, as shown in the Database:

image_pupup_http.xml

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<modification>
<id>Fullsize HTTP Product Image Popup</id>
<version><![CDATA[OS v.1.5.6.4+]]></version>
<vqmver><![CDATA[2.4.1]]></vqmver>
<author>hotvb - IP_CAM</author>

<file name="catalog/controller/product/product.php">
<operation error="log">
<search position="replace">
<![CDATA[$this->data['popup'] = $this->model_tool_image->resize($product_info['image'], $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height'));]]></search>
<add><![CDATA[    $this->data['popup'] = $product_info['image'];]]></add>
</operation>
<operation>
<search position="replace">
<![CDATA['popup' => $this->model_tool_image->resize($result['image'], $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height')),]]>
</search>
<add>
<![CDATA[    'popup' => $result['image'],]]>
</add>
</operation>
</file>
</modification>
And it then linked the JTI Logo directly from the Site, as linked, when the
Popup Function is clicked.
---
JUST BE AWARE: it is not possible, to link 'internal' and 'external' linked
images this way, by use of above mentioned routines, as they come.

And I don't think, that you can use http images, and relink them internally to https,
just to have a clean https setup. But I am really not sure about this.

Good Luck!
Ernie
---
Image

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland
Who is online

Users browsing this forum: Google [Bot] and 348 guests