Opencart VERSION', '3.0.3.8: change image folder name - opencart

I've got OpenCart VERSION', '3.0.3.8 and tried to change the image folder with unexpected results.
my config.php modified with following update
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/newimagefolder/');
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/');
After this modification I can't able to show my image from domain. its point to old image directory
<img src="https://example.com/image/cache/catalog/DRESS/12-550x550.jpg" srcset="https://example.com/image/cache/catalog/DRESS/12-550x550.jpg 1x, https://example.com/image/cache/catalog/DRESS/12-1100x1100.jpg 2x" data-largeimg="https://example.com/image/cache/catalog/DRESS/12-1000x1000.jpg" alt="Dichus Shirt" title="Dichus Shirt" width="550" height="550">

Have you cleared your cache?
Have you moved your open cart installation into a sub folder?
Have you set this folder up in the htaccess
Your config.php doesn't seem to be opencart V3.0.3.8. You would typically have a storage define('DIR_CACHE', DIR_STORAGE .

Related

upload to remote subdomain ftp folder

This is driving me nuts:
My 'ftp.company.com' ftp account structure:
/root/
public_html
domains
-mysubdomain.com
-public_html
i set up my git config:
[git-ftp]
url = ftp.company.com/domains/mysubdomain.com/public_html
user = company.com
password = ******
but 'git ftp init/push' keeps uploading to:
//public_html/domains/mysubdomain.com/public_html
Why is git-ftp refering to my ftp ROOT/public_html as base url?
What am I doing wrong here?
thanks and regards
Tom

Admin doesnt opening on OpenCart3

I have an issue with OC3:
When I open admin page i has only white page. When I open error log I have anything, all is okay but page doesnt open.
My config file:
<?php
// HTTP
define('HTTP_SERVER', 'http://nanox.md/admin');
define('HTTP_CATALOG', 'http://nanox.md/');
// HTTPS
define('HTTPS_SERVER', 'http://nanox.md/admin');
define('HTTPS_CATALOG', 'http://nanox.md/');
// DIR
define('DIR_APPLICATION', '/home/bodybuilding/public_html/nanox/catalog/admin');
define('DIR_SYSTEM', '/home/bodybuilding/public_html/nanox/system/');
define('DIR_IMAGE', '/home/bodybuilding/public_html/nanox/image/');
define('DIR_STORAGE', DIR_SYSTEM . 'storage/');
define('DIR_LANGUAGE', DIR_APPLICATION . 'language/');
define('DIR_CATALOG', '/home/bodybuilding/public_html/nanox/catalog/');
define('DIR_TEMPLATE', DIR_APPLICATION . 'view/theme/');
define('DIR_CONFIG', DIR_SYSTEM . 'config/');
define('DIR_CACHE', DIR_STORAGE . 'cache/');
define('DIR_DOWNLOAD', DIR_STORAGE . 'download/');
define('DIR_LOGS', DIR_STORAGE . 'logs/');
define('DIR_MODIFICATION', DIR_STORAGE . 'modification/');
define('DIR_SESSION', DIR_STORAGE . 'session/');
define('DIR_UPLOAD', DIR_STORAGE . 'upload/');
// DB
define('DB_DRIVER', 'mysqli');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', '*');
define('DB_PASSWORD', '*');
define('DB_DATABASE', '*');
define('DB_PORT', '3306');
define('DB_PREFIX', 'oc_');
And link to the admin page is http://nanox.md/admin
Please help :)
Your admin folder is not on catalog folder so replace this:
define('DIR_APPLICATION', '/home/bodybuilding/public_html/nanox/catalog/admin');
with this
define('DIR_APPLICATION', '/home/bodybuilding/public_html/nanox/admin');
You seem to have missed the last "/" in your Application definition, additionally, your path is incorrect, there is no admin folder in the catalog, try replacing this:
define('DIR_APPLICATION', '/home/bodybuilding/public_html/nanox/catalog/admin');
with this:
define('DIR_APPLICATION', '/home/bodybuilding/public_html/nanox/admin/');

How to Move Opencart From Root to Subfolder

I have a novice question that you can help me easily. I have installed OC in root. I want to move it to a subfolder in the root. For example,if I have www.mysite.com, I want to move it in www.mysite.com/Subfolder. I have redirected www.mysite.com to www.mysite.com/Subfolder through htaccess in the root. What changes I need to make to config.php and admin/config.php and to htaccess in the Subfolder. Would I need to make changes to other files too in the Subfolder? How to deal with databases in www.mysite.com? Where I need to export it? How can I achieve this? I am using OC 3.0.2.0. I would be thankful for any help. My Subfolder config.php looks like this
define('HTTP_SERVER', 'http://www.example.com/');
// HTTPS
define('HTTPS_SERVER', 'http://www.example.com/');
// DIR
define('DIR_APPLICATION', '/home/user/public_html/catalog/');
define('DIR_SYSTEM', '/home/user/public_html/system/');
define('DIR_IMAGE', '/home/user/public_html/image/');
define('DIR_STORAGE', '/home/user/storedata1/storage/');
define('DIR_LANGUAGE', DIR_APPLICATION . 'language/');
define('DIR_TEMPLATE', DIR_APPLICATION . 'view/theme/');
define('DIR_CONFIG', DIR_SYSTEM . 'config/');
define('DIR_CACHE', DIR_STORAGE . 'cache/');
define('DIR_DOWNLOAD', DIR_STORAGE . 'download/');
define('DIR_LOGS', DIR_STORAGE . 'logs/');
define('DIR_MODIFICATION', DIR_STORAGE . 'modification/');
define('DIR_SESSION', DIR_STORAGE . 'session/');
define('DIR_UPLOAD', DIR_STORAGE . 'upload/');
and my Subfolder admin config.php looks like this
// HTTP
define('HTTP_SERVER', 'http://www.example.com/admin/');
define('HTTP_CATALOG', 'http://www.example.com/');
// HTTPS
define('HTTPS_SERVER', 'http://www.example.com/admin/');
define('HTTPS_CATALOG', 'http://www.example.com/');
// DIR
define('DIR_APPLICATION', '/home/user/public_html/admin/');
define('DIR_SYSTEM', '/home/user/public_html/system/');
define('DIR_IMAGE', '/home/user/public_html/image/');
define('DIR_STORAGE', '/home/user/storedata1/storage/');
define('DIR_CATALOG', '/home/user/public_html/catalog/');
define('DIR_LANGUAGE', DIR_APPLICATION . 'language/');
define('DIR_TEMPLATE', DIR_APPLICATION . 'view/template/');
define('DIR_CONFIG', DIR_SYSTEM . 'config/');
define('DIR_CACHE', DIR_STORAGE . 'cache/');
define('DIR_DOWNLOAD', DIR_STORAGE . 'download/');
define('DIR_LOGS', DIR_STORAGE . 'logs/');
define('DIR_MODIFICATION', DIR_STORAGE . 'modification/');
define('DIR_SESSION', DIR_STORAGE . 'session/');
define('DIR_UPLOAD', DIR_STORAGE . 'upload/');
Please advise me how to edit my Subfolder config.php and Subfolder/admin/config.php and in which places I need to put my Subfolder
There are three places you'll need to make the edits:
OpenCartSiteFolder/config.php
OpenCartSiteFolder/admin/config.php
Update .htaccess file
Step 1. You must modify the paths in the config.php to match the name of the new folder you're placing the site into (assuming you're hosting on linux shared hosting):
// HTTP
define('HTTP_SERVER', 'http://www.website.com/subfolder_name/');
// HTTPS
define('HTTPS_SERVER', 'https://www.website.com/subfolder_name/');
// DIR
define('DIR_APPLICATION', '/usr/www/users/ftp_username/subfolder_name/catalog/');
define('DIR_SYSTEM', '/usr/www/users/ftp_username/subfolder_name/system/');
define('DIR_IMAGE', '/usr/www/users/ftp_username/subfolder_name/image/');
define('DIR_LANGUAGE', '/usr/www/users/ftp_username/subfolder_name/catalog/language/');
define('DIR_TEMPLATE', '/usr/www/users/ftp_username/subfolder_name/catalog/view/theme/');
define('DIR_CONFIG', '/usr/www/users/ftp_username/subfolder_name/system/config/');
define('DIR_CACHE', '/usr/www/users/ftp_username/subfolder_name/system/storage/cache/');
define('DIR_DOWNLOAD', '/usr/www/users/ftp_username/subfolder_name/system/storage/download/');
define('DIR_LOGS', '/usr/www/users/ftp_username/subfolder_name/system/storage/logs/');
define('DIR_MODIFICATION', '/usr/www/users/ftp_username/subfolder_name/system/storage/modification/');
define('DIR_UPLOAD', '/usr/www/users/ftp_username/subfolder_name/system/storage/upload/');
Step 2: You must modify the paths in the website/sub_folder/admin/config.php to match the name of the new folder you're placing the site into:
// HTTP
define('HTTP_SERVER', 'http://www.website.com/subfolder_name/');
// HTTPS
define('HTTPS_SERVER', 'https://www.website.com/subfolder_name/');
// HTTP
define('HTTP_SERVER', 'http://www.website.com/subfolder_name/admin/');
define('HTTP_CATALOG', 'http://www.website.com/subfolder_name/');
// HTTPS
define('HTTPS_SERVER', 'https://www.website.com/subfolder_name/admin/');
define('HTTPS_CATALOG', 'https://www.website.com/subfolder_name/');
// DIR
define('DIR_APPLICATION', '/usr/www/users/ftp_username/subfolder_name/admin/');
define('DIR_SYSTEM', '/usr/www/users/ftp_username/subfolder_name/system/');
define('DIR_IMAGE', '/usr/www/users/ftp_username/subfolder_name/image/');
define('DIR_LANGUAGE', '/usr/www/users/ftp_username/subfolder_name/admin/language/');
define('DIR_TEMPLATE', '/usr/www/users/ftp_username/subfolder_name/admin/view/template/');
define('DIR_CONFIG', '/usr/www/users/ftp_username/subfolder_name/system/config/');
define('DIR_CACHE', '/usr/www/users/ftp_username/subfolder_name/system/storage/cache/');
define('DIR_DOWNLOAD', '/usr/www/users/ftp_username/subfolder_name/system/storage/download/');
define('DIR_LOGS', '/usr/www/users/ftp_username/subfolder_name/system/storage/logs/');
define('DIR_MODIFICATION', '/usr/www/users/ftp_username/subfolder_name/system/storage/modification/');
define('DIR_UPLOAD', '/usr/www/users/ftp_username/subfolder_name/system/storage/upload/');
define('DIR_CATALOG', '/usr/www/users/ftp_username/subfolder_name/catalog/');
You may also need to update your htaccess file as K.B. mentioned:
RewriteBase /subfolder_name/
config.php
define('HTTP_SERVER', 'http://www.example.com/subfolder_name/');
// HTTPS
define('HTTPS_SERVER', 'http://www.example.com/subfolder_name/');
// DIR
define('DIR_APPLICATION', '/home/user/public_html/subfolder_name/catalog/');
define('DIR_SYSTEM', '/home/user/public_html/subfolder_name/system/');
define('DIR_IMAGE', '/home/user/public_html/subfolder_name/image/');
define('DIR_STORAGE', '/home/user/storedata1/storage/');
define('DIR_LANGUAGE', DIR_APPLICATION . 'language/');
define('DIR_TEMPLATE', DIR_APPLICATION . 'view/theme/');
define('DIR_CONFIG', DIR_SYSTEM . 'config/');
define('DIR_CACHE', DIR_STORAGE . 'cache/');
define('DIR_DOWNLOAD', DIR_STORAGE . 'download/');
define('DIR_LOGS', DIR_STORAGE . 'logs/');
define('DIR_MODIFICATION', DIR_STORAGE . 'modification/');
define('DIR_SESSION', DIR_STORAGE . 'session/');
define('DIR_UPLOAD', DIR_STORAGE . 'upload/');
Subfolder admin config.php should be:
// HTTP
define('HTTP_SERVER', 'http://www.example.com/subfolder_name/admin/');
define('HTTP_CATALOG', 'http://www.example.com/subfolder_name/');
// HTTPS
define('HTTPS_SERVER', 'http://www.example.com/subfolder_name/admin/');
define('HTTPS_CATALOG', 'http://www.example.com/subfolder_name/');
// DIR
define('DIR_APPLICATION', '/home/user/public_html/subfolder_name/admin/');
define('DIR_SYSTEM', '/home/user/public_html/subfolder_name/system/');
define('DIR_IMAGE', '/home/user/public_html/subfolder_name/image/');
define('DIR_STORAGE', '/home/user/storedata1/storage/');
define('DIR_CATALOG', '/home/user/public_html/subfolder_name/catalog/');
define('DIR_LANGUAGE', DIR_APPLICATION . 'language/');
define('DIR_TEMPLATE', DIR_APPLICATION . 'view/template/');
define('DIR_CONFIG', DIR_SYSTEM . 'config/');
define('DIR_CACHE', DIR_STORAGE . 'cache/');
define('DIR_DOWNLOAD', DIR_STORAGE . 'download/');
define('DIR_LOGS', DIR_STORAGE . 'logs/');
define('DIR_MODIFICATION', DIR_STORAGE . 'modification/');
define('DIR_SESSION', DIR_STORAGE . 'session/');
define('DIR_UPLOAD', DIR_STORAGE . 'upload/');

open cart configure config file

I have installed open cart on my demo subdomain server.
config file changed by me is as follows
// HTTP
define('HTTP_SERVER', 'https://demos.abc.com/artnkraft/');
// HTTPS
define('HTTPS_SERVER', 'https://demos.abc.com/artnkraft/');
// DIR
define('DIR_APPLICATION', '/demos/artnkraft/catalog/');
define('DIR_SYSTEM', '/demos/artnkraft/system/');
define('DIR_IMAGE', '/demos/artnkraft/image/');
define('DIR_LANGUAGE', '/demos/artnkraft/catalog/language/');
define('DIR_TEMPLATE', '/demos/artnkraft/catalog/view/theme/');
define('DIR_CONFIG', '/demos/artnkraft/system/config/');
define('DIR_CACHE', '/demos/artnkraft/system/storage/cache/');
define('DIR_DOWNLOAD', '/demos/artnkraft/system/storage/download/');
define('DIR_LOGS', '/demos/artnkraft/system/storage/logs/');
define('DIR_MODIFICATION', '/demos/artnkraft/system/storage/modification/');
define('DIR_UPLOAD', '/demos/artnkraft/system/storage/upload/');
// DB
define('DB_DRIVER', 'mysqli');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', 'abc');
define('DB_PASSWORD', 'abc#_password');
define('DB_DATABASE', 'abc_database');
define('DB_PORT', '3306');
define('DB_PREFIX', 'oc_');
this gives error
Warning: require_once(/demos/artnkraft/system/startup.php): failed to open stream: No such file or directory in /home/cloudusweb/public_html/demos/artnkraft/index.php on line 17
Fatal error: require_once(): Failed opening required '/demos/artnkraft/system/startup.php' (include_path='.:/usr/local/lib/php') in /home/cloudusweb/public_html/demos/artnkraft/index.php on line 17
i have also change the admin config file.
help me how to configure configre file to correct path
thanks in advance

Move OpenCart front page only from a subdirectory

I have installed OpenCart in a subdirectory (ex: www.example.com/shop/) but I would like to move/show the OpenCart front page as my main website front page.
Can it be done, please?
Try this
RedirectMatch 301 ^/shop/$ http://www.example.com/
in your htaccess file
#This is a permanent redirect
RedirectMatch 301 ^/shop/.*$ http://www.example.com/
#This is a temporary redirect
RedirectMatch 302 ^/shop/.*$ http://www.example.com/
You will have to change the paths in 2 config.php files. First, the config.php file from main Opencart directory and the second config.php file from admin folder.
Example:
from this:
<?php
// HTTP
define('HTTP_SERVER', 'http://www.example.com/shop/');
// HTTPS
define('HTTPS_SERVER', 'http://www.example.com/shop/');
// DIR
define('DIR_APPLICATION', '/home/user/opencart/shop/catalog/');
define('DIR_SYSTEM', '/home/user/opencart/shop/system/');
define('DIR_DATABASE', '/home/user/opencart/shop/system/database/');
define('DIR_LANGUAGE', '/home/user/opencart/shop/catalog/language/');
define('DIR_TEMPLATE', '/home/user/opencart/shop/catalog/view/theme/');
define('DIR_CONFIG', '/home/user/opencart/shop/system/config/');
define('DIR_IMAGE', '/home/user/opencart/shop/image/');
define('DIR_CACHE', '/home/user/opencart/shop/system/cache/');
define('DIR_DOWNLOAD', '/home/user/opencart/shop/download/');
define('DIR_LOGS', '/home/user/opencart/shop/system/logs/');
// DB
define('DB_DRIVER', 'mysql');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', 'root');
define('DB_PASSWORD', '');
define('DB_DATABASE', 'opencart');
define('DB_PREFIX', 'oc_');
?>
to this:
<?php
// HTTP
define('HTTP_SERVER', 'http://www.example.com/');
// HTTPS
define('HTTPS_SERVER', 'http://www.example.com/');
// DIR
define('DIR_APPLICATION', '/home/user/opencart/catalog/');
define('DIR_SYSTEM', '/home/user/opencart/system/');
define('DIR_DATABASE', '/home/user/opencart/system/database/');
define('DIR_LANGUAGE', '/home/user/opencart/catalog/language/');
define('DIR_TEMPLATE', '/home/user/opencart/catalog/view/theme/');
define('DIR_CONFIG', '/home/user/opencart/system/config/');
define('DIR_IMAGE', '/home/user/opencart/image/');
define('DIR_CACHE', '/home/user/opencart/system/cache/');
define('DIR_DOWNLOAD', '/home/user/opencart/download/');
define('DIR_LOGS', '/home/user/opencart/system/logs/');
// DB
define('DB_DRIVER', 'mysql');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', 'root');
define('DB_PASSWORD', '');
define('DB_DATABASE', 'opencart');
define('DB_PREFIX', 'oc_');
?>
Where /home/user/opencart/ is the fullpath of Opencart installation.
And notice I removed /shop from each path.
Also, if you have a .htaccess file, you will have to change the RewriteBase:
from
RewriteBase /shop/
to
RewriteBase /