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/');
Related
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 .
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/');
I am trying to deploy a django app to AWS using elastic beanstalk but it is saying that my requirements.txt is invalid when I run eb deploy. Can someone please help?
Do I need to create eb virtual environment inside conda virtual env ? Or i can use any one ? Is it the same thing ?
Error :
requirements.txt
alabaster==0.7.10
anaconda-client==1.6.9
anaconda-navigator==1.7.0
anaconda-project==0.8.2
asn1crypto==0.24.0
astroid==1.6.1
astropy==2.0.3
attrs==17.4.0
Babel==2.5.3
backports.shutil-get-terminal-size==1.0.0
beautifulsoup4==4.6.0
bitarray==0.8.1
bkcharts==0.2
blaze==0.11.3
bleach==2.1.2
bokeh==0.12.13
boto==2.48.0
botocore==1.10.11
Bottleneck==1.2.1
certifi==2018.1.18
cffi==1.11.4
chardet==3.0.4
click==6.7
cloudpickle==0.5.2
clyent==1.2.2
colorama==0.3.7
comtypes==1.1.4
conda==4.5.2
conda-build==3.4.1
conda-verify==2.0.0
contextlib2==0.5.5
cryptography==2.1.4
cycler==0.10.0
Cython==0.27.3
cytoolz==0.9.0
dask==0.16.1
datashape==0.5.4
decorator==4.2.1
distributed==1.20.2
Django==2.0.4
django-appconf==1.0.2
django-bootstrap3==10.0.1
django-bootstrap4==0.0.6
django-braces==1.13.0
django-crispy-forms==1.7.2
django-environ==0.4.4
django-forms-bootstrap==3.1.0
django-multiselectfield==0.1.8
django-rest-framework==0.1.0
django-select2==6.0.2
djangorestframework==3.8.2
docutils==0.14
entrypoints==0.2.3
et-xmlfile==1.0.1
fastcache==1.0.2
filelock==2.0.13
Flask==0.12.2
Flask-Cors==3.0.3
gevent==1.2.2
glob2==0.6
greenlet==0.4.12
h5py==2.7.1
heapdict==1.0.0
html5lib==1.0.1
idna==2.6
imageio==2.2.0
imagesize==0.7.1
ipython==6.2.1
ipython-genutils==0.2.0
ipywidgets==7.1.1
isort==4.2.15
itsdangerous==0.24
jdcal==1.3
jedi==0.11.1
Jinja2==2.10
jmespath==0.9.3
jsonschema==2.6.0
jupyter==1.0.0
jupyter-client==5.2.2
jupyter-console==5.2.0
jupyter-core==4.4.0
jupyterlab==0.31.4
jupyterlab-launcher==0.10.2
lazy-object-proxy==1.3.1
llvmlite==0.21.0
locket==0.2.0
lxml==4.1.1
MarkupSafe==1.0
matplotlib==2.1.2
mccabe==0.6.1
menuinst==1.4.11
mistune==0.8.3
mpmath==1.0.0
msgpack-python==0.5.1
multipledispatch==0.4.9
navigator-updater==0.1.0
nbconvert==5.3.1
nbformat==4.4.0
networkx==2.1
nltk==3.2.5
nose==1.3.7
notebook==5.4.0
numba==0.36.2
numexpr==2.6.4
numpy==1.14.0
numpydoc==0.7.0
odo==0.5.1
olefile==0.45.1
openpyxl==2.4.10
packaging==16.8
pandas==0.22.0
pandocfilters==1.4.2
parso==0.1.1
partd==0.3.8
path.py==10.5
pathlib2==2.3.0
patsy==0.5.0
pep8==1.7.1
pickleshare==0.7.4
Pillow==5.1.0
pkginfo==1.4.1
pluggy==0.6.0
ply==3.10
prompt-toolkit==1.0.15
psutil==5.4.3
py==1.5.2
pyasn1==0.4.2
pycodestyle==2.3.1
pycosat==0.6.3
pycparser==2.18
pycrypto==2.6.1
pycurl==7.43.0.1
pyflakes==1.6.0
Pygments==2.2.0
pylint==1.8.2
pyodbc==4.0.22
pyOpenSSL==17.5.0
pyparsing==2.2.0
PySocks==1.6.7
pytest==3.3.2
python-dateutil==2.7.2
pytz==2018.4
PyWavelets==0.5.2
pywin32==222
pywinpty==0.5
PyYAML==3.12
pyzmq==16.0.3
QtAwesome==0.4.4
qtconsole==4.3.1
QtPy==1.3.1
requests==2.18.4
rope==0.10.7
rsa==3.4.2
ruamel-yaml==0.15.35
s3transfer==0.1.13
scikit-image==0.13.1
scikit-learn==0.19.1
scipy==1.0.0
seaborn==0.8.1
Send2Trash==1.4.2
simplegeneric==0.8.1
singledispatch==3.4.0.3
six==1.11.0
snowballstemmer==1.2.1
sortedcollections==0.5.3
sortedcontainers==1.5.9
south==1.0.2
Sphinx==1.6.6
sphinxcontrib-websupport==1.0.1
spyder==3.2.6
SQLAlchemy==1.2.1
statsmodels==0.8.0
sympy==1.1.1
tables==3.4.2
tblib==1.3.2
terminado==0.8.1
testpath==0.3.1
toolz==0.9.0
tornado==4.5.3
traitlets==4.3.2
typing==3.6.2
unicodecsv==0.14.1
urllib3==1.22
wcwidth==0.1.7
webencodings==0.5.1
Werkzeug==0.14.1
widgetsnbextension==3.1.0
win-inet-pton==1.0.1
win-unicode-console==0.5
wincertstore==0.2
wrapt==1.10.11
xlrd==1.1.0
XlsxWriter==1.0.2
xlwings==0.11.5
xlwt==1.3.0
zict==0.1.3
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
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 /