php - Opencart: change image folder -
i've got opencart 1.5.5.1 , tried change image folder unexpected results.
my opencart installed on www.example.com/opencart/
i changed config.php , admin/config.php
follows:
// http define('http_server', 'http://example.com/opencart/'); // https define('https_server', 'https://example.com/opencart/'); // dir define('dir_application', '/home/example/public_html/opencart/catalog/'); define('dir_system', '/home/example/public_html/opencart/system/'); define('dir_database', '/home/example/public_html/opencart/system/database/'); define('dir_language', '/home/example/public_html/opencart/catalog/language/'); define('dir_template', '/home/example/public_html/opencart/catalog/view/theme/'); define('dir_config', '/home/example/public_html/opencart/system/config/'); define('dir_image', '/home/example/public_html/opencart/image2/'); define('dir_cache', '/home/example/public_html/opencart/system/cache/'); define('dir_download', '/home/example/public_html/opencart/download/'); define('dir_logs', '/home/example/public_html/opencart/system/logs/');
when @ site now, images gone, not broken, gone. after update folder name "image2" images show broken , when @ image url see:
http://example.com/opencart/image/data/logos/logo.png
so somehow still looking "image" folder. gets stranger when move image folder outside opencart folder, e.g. /home/example/public_html/opencart/image2/
/home/example/public_html/image2/
then image url still:
example.com/opencart/image/data/logos/logo.png
when change http_server line in config.php http://example.com/opencart2
images still broken image url now:
example.com/opencart2/image/data/logos/logo.png
can tell me i'm doing wrong? naive thinking dir_image define points folder images are?
anyway, reason i'm doing want 2 opencart shops sharing same image folder. so: shop 1:
/home/example/public_html/opencart/
shop 2:
/home/example/public_html/opencart2/
image folder:
/home/example/public_html/image/
is there way of doing this?
thanks in advance
i had same problem.
file /catalog/model/tool/image.php
line 51 && 53 aprox:
return $this->config->get('config_ssl') . 'image/' . $new_image; return $this->config->get('config_url') . 'image/' . $new_image;
and file
/catalog/controller/common/header.php
line 24 && 30 aprox
$this->data['icon'] = $server . 'image/' . $this->config->get('config_icon'); $this->data['logo'] = $server . 'image/' . $this->config->get('config_logo');
those lines overwritting configuration.
you can replace 'image' or trick add dir_image relevant information.
i guess in later versions correct error.
regards, alex
Comments
Post a Comment