문제

I want to change URL structure of images in opencart. Which files must be changed? I am tried search but I can't find. I searched below folders:

/catalog
/catalog/controller
/catalog/model
도움이 되었습니까?

해결책

I found answer. 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://cdn1.yoursite.com/' . $new_image;

AND

Replace this: return $this->config->get('config_url') . 'image/' . $new_image;
To This: return 'http://cdn1.yoursite.com/' . $new_image;

다른 팁

I will try and make this like a guide.

To change the base url of the images while keeping everything in the same way they were you simply have to go to the root of your website (where index.php can be found) there is a config.php file there locate it, this is the one we will edit.

From : define('HTTP_IMAGE', 'http://old_domain/image/');

To : define('HTTP_IMAGE', 'http://new_domain/image/');

From : define('HTTPS_IMAGE', 'https://old_domain/image/');

To : define('HTTPS_IMAGE', 'https://new_domain/image/');

that is all you have to do and everything will work accordingly on their own.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top