Page 1 of 1

Changing default 'image' folder in 2.0

Posted: Wed Apr 15, 2015 10:58 am
by codywood
in OpenCart 2.0 can the default 'image' folder be changed to another folder with a different name but in the same location? Is it as simple as changing the 'image' folder's name in the two config.php files (in root/config.php and /admin/config.php)?

Re: Changing default 'image' folder in 2.0

Posted: Wed Apr 15, 2015 11:35 pm
by viethemes
You can follow this steps below to do that
1. Rename the image folder, for example newimage
2. Edit two files config.php and admin/config.php, find

Code: Select all

define('DIR_IMAGE', '{path_to_your_root_folder}/image/');
and replace with new name

Code: Select all

define('DIR_IMAGE', '{path_to_your_root_folder}/newimage/');
3. Edit file catalog\model\tool\image.php,
find

Code: Select all

return $this->config->get('config_ssl') . 'image/' . $new_image;
and replace with

Code: Select all

return $this->config->get('config_ssl') . 'newimage/' . $new_image;
find

Code: Select all

return $this->config->get('config_url') . 'image/' . $new_image;
and replace with

Code: Select all

return $this->config->get('config_url') . 'newimage/' . $new_image;

Re: Changing default 'image' folder in 2.0

Posted: Fri Apr 17, 2015 5:58 am
by codywood
Thanks but this does not seem to work. Something must be missing.

Re: Changing default 'image' folder in 2.0

Posted: Fri Apr 17, 2015 11:35 pm
by viethemes
Is there a error with that?

Re: Changing default 'image' folder in 2.0

Posted: Wed Aug 24, 2016 12:40 am
by hrm143
viethemes wrote:Is there a error with that?
am facing the same errors...no image found error