Page 1 of 2
IMAGES on subdomain
Posted: Mon Jan 26, 2015 8:06 pm
by spiders3
Hello all,
Im using opencart 2.0.1.1.
And im trying to move images on subdomain
I creat subdomain images.mysite.com
I copied images to public_html -> images
On config.php i added
Code: Select all
// HTTP
define('HTTP_SERVER', 'http://mysite.com/');
define('HTTP_IMAGE', 'http://images.mysite.com/');
// HTTPS
define('HTTPS_SERVER', 'https://www.mysite.com/');
define('HTTP_IMAGE', 'http://images.mysite.com/');
// DIR
define('DIR_IMAGE', '/home/mysite/public_html/images/');
also i configured config.php on admin
and sistem still get old directory ïmage
what can be done?
Re: IMAGES on subdomain
Posted: Tue Jan 27, 2015 5:16 am
by IP_CAM
In my
v.1.5.6.x based Testshops, I did it this way:
ROOT:
Code: Select all
// HTTP
define('HTTP_IMAGE', 'http://images.openshop.li/shop/image/');
// HTTPS
define('HTTPS_SERVER', 'http://www.openshop.li/cart/');
define('HTTPS_IMAGE', 'http://images.openshop.li/shop/image/');
// DIR
define('DIR_APPLICATION', '/home/jacobch/www/openshop_li/cart/catalog/');
define('DIR_IMAGE', '/home/jacobch/www/openshop_li/shop/image/');
ADMIN:
Code: Select all
// HTTP
define('HTTP_CATALOG', 'http://www.openshop.li/cart/');
define('HTTP_IMAGE', 'http://images.openshop.li/shop/image/');
// HTTPS
define('HTTPS_CATALOG', 'http://www.openshop.li/cart/');
define('HTTPS_IMAGE', 'http://images.openshop.li/shop/image/');
// DIR
define('DIR_IMAGE', '/home/jacobch/www/openshop_li/shop/image/');
and it worked.
Good Luck!
Ernie
openshop.li
Re: IMAGES on subdomain
Posted: Tue Jan 27, 2015 5:44 am
by tjsystems
OC 2.x
Code: Select all
define('DIR_IMAGE', '/home/admin/domains/NEWDOMAIN.CDN/public_html/image/');
//define('DIR_IMAGE', '/home/admin/domains/WEBSHOP.COM/public_html/oc/image/');
Works for me on OC2.x!
Re: IMAGES on subdomain
Posted: Fri Jan 30, 2015 9:26 am
by cs378
I am having the same issue. If anyone had figured it out, please share. meanwhile I guess I will need to study the code a bit.
Re: IMAGES on subdomain
Posted: Sat Jan 31, 2015 12:39 am
by spiders3
Still not working on 2.0.1.1.
After OpenCart 1.5.5.1, this does not work. It is only for versions prior to 1.5.5.1.
Opencart do not support the HTTP_IMAGE definition.
Working for 1.5.6.x
"New OpenCart Versions Image Structure: catalog/model/tool/image.php Replace this: return $this->config->get('config_ssl') . 'image/' . $new_image; To This: return '
https://images.yourdomain.com/' . $new_image; ANDReplace this: return $this->config->get('config_url') . 'image/' . $new_image; To This: return '
http://images.yourdomain.com/' . $new_image;"
I tried on 2.0.1.1. but doenst work
Re: IMAGES on subdomain
Posted: Sat Jan 31, 2015 11:03 am
by cs378
Hello
It works great. I am running 2.0.1.1
I don't see anything wrong with your code.
Re: IMAGES on subdomain
Posted: Sat Jan 31, 2015 1:18 pm
by IP_CAM
sorry, I forgot to add this information here, the VqMod should do it fopr you, if you follow my scheme:
http://forum.opencart.com/viewtopic.php ... 00#p383857
I hardcoded the VqMod - Content into a new existing testshop source, and it worked flawless in a v.1.5.6.4/5_rc
Good Luck
Ernie
Re: IMAGES on subdomain
Posted: Tue Feb 03, 2015 6:32 pm
by spiders3
up
Re: IMAGES on subdomain
Posted: Tue Feb 03, 2015 9:18 pm
by tjsystems
spiders3 wrote:up
PS: this is a OpenCart 2.0 forum... not for 1.5.x
Re: IMAGES on subdomain
Posted: Tue Feb 03, 2015 11:46 pm
by spiders3
tjsystems wrote:spiders3 wrote:up
PS: this is a OpenCart 2.0 forum... not for 1.5.x
Please read at the head of the post..
I have some bugs, and wondering why doesn't work on my 2.0.1.1 system, still no body can give me an answer
Re: IMAGES on subdomain
Posted: Wed Feb 04, 2015 12:26 am
by tjsystems
spiders3 wrote:tjsystems wrote:spiders3 wrote:up
PS: this is a OpenCart 2.0 forum... not for 1.5.x
Please read at the head of the post..
I have some bugs, and wondering why doesn't work on my 2.0.1.1 system, still no body can give me an answer
Sorry for that... to quick.
hmmmm. just see that my image are also not from the new domain... Damn chache!
look into it later today..
Re: IMAGES on subdomain
Posted: Mon Jul 06, 2015 1:03 am
by Stergios
Anyone figure this out for oc 2x?
1. I have create a subdomain named "static" (without redirection),
2. Then I copy image folder to static folder,
3. On admin and public config I change this code,
define('DIR_IMAGE', '/home/testuser/public_html/static/image/');
Everything looks fine but when I attempt to create a product and add an image, the image preview show the image broken. I guess I have to alter the save location somehow.
Any ideas how to manage all this thing for 2x?
Thanks
Re: IMAGES on subdomain
Posted: Sun Feb 28, 2016 1:11 am
by donaceli
ANy solutions to this problem?
Re: IMAGES on subdomain
Posted: Sun Feb 28, 2016 4:52 am
by IP_CAM
OC2 requires the IMAGE/ Folder, im some parts, because some Images/Pic's have
Images linked INTERNALLY, by 'script code', and so required/placed within the OC IMAGE / Main Folder.
It makes no sense, to re-locate such images Folders, but one is free,
to add whatever Image Directories into the /DATA / ...Sections.
But there is no need, really , to create a complicated
http://Image.Domain/ Setup,
a NO-COOKIE Domain already exists, in natural form, and it's:
http://yourshop/
if your configured Site URL is:
http://www.yourshop/
---
therefore, just place this:
Code: Select all
// HTTP
define('HTTP_SERVER', 'http://www.yoursite.com/shop/');
define('HTTP_IMAGE', 'http://yoursite.com/shop/image/');
// HTTPS
define('HTTPS_SERVER', 'http://www.yoursite.com/shop/');
define('HTTPS_IMAGE', 'http://yoursite.com/shop/image/');
into your config.php Files, then, it should usually function. Just check on, how your Admin
Image Manager act's on this, or then, if you want to place an image into an information page,
or so, how the image Handler reacts, it's internal LINKING may has to be re-matched, as well.
I will publish tonight a OC VqMod v.2 Extension, for this, I just tested here:
http://www.jti.li/cart/
Ernie
openshop.li
Re: IMAGES on subdomain
Posted: Sun Feb 28, 2016 11:16 am
by IP_CAM
Here it is, the VqMod for OC v.2.x :
Cookie Free Image SubDomain Routing + Image height/width sizes
http://www.opencart.com/index.php?route ... n_id=25919
Good Luck
Ernie
jti.li/cart/
Re: IMAGES on subdomain
Posted: Sun Jun 12, 2016 12:58 am
by Cue4cheap
I know this is in the 2.x section but you have the 1.5.6 version of this?
Mike
Re: IMAGES on subdomain
Posted: Sun Jun 12, 2016 3:23 am
by IP_CAM
it's also there, in the Extension Section:
Cookieless HTTP Domain Routing
enhanced VqMod Version, with added image Width+Weight -Tags
http://www.opencart.com/index.php?route ... n_id=23506
Ernie
Re: IMAGES on subdomain
Posted: Thu Jul 07, 2016 5:21 pm
by saliverdim
hi,
please check me ? 2.3.0.1 journal
root right ?
<?php
// HTTP
define('HTTP_SERVER', '
http://www.mysite.net/');
define('HTTP_IMAGE', '
http://subdomain.mysite.net/image');
// HTTPS
define('HTTPS_SERVER', '
http://www.mysite.net/');
define('HTTPS_IMAGE', '
http://subdomain.mysite.net/image');
// DIR
define('DIR_APPLICATION', '/home/u6754684/public_html/catalog/');
define('DIR_SYSTEM', '/home/u6754684/public_html/system/');
define('DIR_LANGUAGE', '/home/u6754684/public_html/catalog/language/');
define('DIR_TEMPLATE', '/home/u6754684/public_html/catalog/view/theme/');
define('DIR_CONFIG', '/home/u6754684/public_html/system/config/');
define('DIR_IMAGE', '/home/u6754684/public_html/subdomain/image/');
define('DIR_CACHE', '/home/u6759681/public_html/system/cache/');
define('DIR_DOWNLOAD', '/home/u6754684/public_html/system/download/');
define('DIR_UPLOAD', '/home/u6754684/public_html/system/upload/');
define('DIR_MODIFICATION', '/home/u6754684/public_html/system/modification/');
define('DIR_LOGS', '/home/u6754684/public_html/system/logs/');
// DB
define('DB_DRIVER', 'mysqli');
define('DB_HOSTNAME', '15.19.67.221');
define('DB_USERNAME', 'erferf52');
define('DB_PASSWORD', 'tt4445555t');
define('DB_DATABASE', 'rewergerer56');
define('DB_PREFIX', 'oc_');
Re: IMAGES on subdomain
Posted: Thu Jul 07, 2016 5:35 pm
by artcore
Saliverdim. Change your database password immediately!
Never put sensitive info on a public forum!
Re: IMAGES on subdomain
Posted: Fri Jul 08, 2016 2:29 am
by saliverdim
thank you change my pass.
can you help me ?