Post by simonajerner » Thu Aug 25, 2022 3:14 pm

I've got OpenCart 1.5.5.1 and tried to change the image folder with unexpected results.

My opencart is installed on www.example.com/opencart/

I changed the config.php and admin/config.php as follows:

// HTTP
define('HTTP_SERVER', 'http://example.com/opencart/');

// HTTPS
define('HTTPS_SERVER', 'https://example.com/opencart/'); MyAccountAccess
// 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 I look at the site now, all the images are gone, not broken, but gone. After I update the folder name to "image2" the images show up broken and when I look at the Image URL I see:
So somehow it is still looking for the "image" folder. It gets even stranger when I move the image folder outside the opencart folder, e.g. from /home/example/public_html/opencart/image2/ to /home/example/public_html/image2/

Then the image url is still:
example.com/opencart/image/data/Logos/logo.png
When I change the HTTP_SERVER line in config.php to http://example.com/opencart2 The images are still broken but the image url is now:
example.com/opencart2/image/data/Logos/logo.png
Can someone tell me what I'm doing wrong? Am I too naive thinking that the DIR_IMAGE define points to the folder where the images are?

Anyway, the reason I'm doing this is that I want two opencart shops sharing the 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 any way of doing this?

Thanks in advance Myaccountaccess/Activate

Newbie

Posts

Joined
Thu Aug 25, 2022 3:09 pm

Post by straightlight » Thu Aug 25, 2022 7:25 pm

I would not suggest that without the use of an extension since there are more locations in the platform that may require hardcoded location of the image folder.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by thekrotek » Fri Aug 26, 2022 2:58 am

This forums section is for OC 3, not OC 1.5.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by paulfeakins » Fri Aug 26, 2022 7:20 pm

thekrotek wrote:
Fri Aug 26, 2022 2:58 am
This forums section is for OC 3, not OC 1.5.
Good spot, moved.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by ADD Creative » Sat Aug 27, 2022 4:34 am

The image folder in hard coded in catalog/model/tool/image.php, so you would need to modify that file.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: Amazon [Bot] and 12 guests