But sometimes i feel that using external image link will save more time to do product data entry, and easy to locate the image, especially when the connecting speed to server is going down.
i will be very happy if anyone can tell me more about this.
Documentation: OpenCart User Guide
Mods: Total Import PRO | CSV Import PRO | Ecom Tracking | Any Feed | Autosuggest | OpenCart CDN
In the file catalog/model/tool/image.php, replace line 4 where it says this:
Code: Select all
return;
Code: Select all
return $filename;
I hope that helps someone else as much as it just helped me.
Documentation: OpenCart User Guide
Mods: Total Import PRO | CSV Import PRO | Ecom Tracking | Any Feed | Autosuggest | OpenCart CDN
http://www.opencart.com/index.php?route ... order=DESC
This plugin can replace the default Opencart "Image Manager".
You can select images from your Google Picasa Web Albums directly(I think Flickr is comming soon).
No need to upload image to your site, it makes your site more lightweight.
Because the images are hosted at google's server, it makes your site faster.
Live Image Selector, a good extention for opencart
So simple yet afer three days of trying to suss this in 1.5.0.3 has just probably secured me a very large web development project. If we ever meet I'll by you a pint.justinv wrote:Here is a simple tweak to the OpenCart core to allow external image links for product images. It will mean that your images are no longer resized, but at least you will have images!
In the file catalog/model/tool/image.php, replace line 4 where it says this:
With this:Code: Select all
return;
Code: Select all
return $filename;
I hope that helps someone else as much as it just helped me.
Thankyou
Documentation: OpenCart User Guide
Mods: Total Import PRO | CSV Import PRO | Ecom Tracking | Any Feed | Autosuggest | OpenCart CDN
I have changed the size in my CSS but the image size has stayed the same. How do you change it in the tpl files?
replace catalog/model/tool/image.php line 16
Code: Select all
return;
Code: Select all
if (substr($filename, 0, 7) == 'http://') {
return $filename.'" height="'.$height.'" width="'.$width;
} else {
return;
}
I have this working on my shop http://microcnc.net/shop/
Thank you for the code, it does loads the images for external URL. However, there is a problem when you click on additional images below main product image, it opens the additional image from external site and takes the user out from my store. Any advice please
Thank you
So, using the (believed) default oc v.1.5.6.4 image.php template, I have this:
Code: Select all
public function resize($filename, $width, $height, $type = "") {
if (!file_exists(DIR_IMAGE . $filename) || !is_file(DIR_IMAGE . $filename)) {
return;
}
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;
}
}
I like to test a lot, but not really everything, by myselfs.
Thanks a lot! (will try to give it back, some place...!)
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.
opencart 2.0.1.1 , check below page where i tried to add correct url of video yet, facing issue
http://gymtrekkerstore.com/gymcart/inde ... ation_id=8
please help
>> /gymcart/\"https://www.youtube.com/embed ... <<
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.
Warning: getimagesize(/home/b1102/public_html/image/https://storefront.com/Commerce/imageCo ... TDR250.jpg): failed to open stream: No such file or directory in /home/b1102/public_html/catalog/model/tool/image.php on line 26Error: Could not load image /home/b1102/public_html/image/https://storefront.com/Commerce/imageCo ... TDR250.jpg!
2. This is NO Opencart v.2.x Code, you display above./home/b1102/public_html/image/https://storefront.com/Commerce/image
Ernie
openshop.li/cart/
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.
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;
}
}
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.
1. for the external images, I can't use https urls and for my ssl site this causes mixed content errors and the connection is not secure anymore and seo suffers.
2. if any additional images are clicked, they follow the link to the external source instead of the normal behavior to show the large image on my site.
Is there anyone knowledgeable in php and willing to help to revise the code so these will be fixed?
MicroCNC wrote: ↑Tue Dec 10, 2013 1:41 pm
replace catalog/model/tool/image.php line 16withCode: Select all
return;
Code: Select all
if (substr($filename, 0, 7) == 'http://') { return $filename.'" height="'.$height.'" width="'.$width; } else { return; }
Users browsing this forum: No registered users and 71 guests