OpenCart Modifying the Background folder name

Source: Internet
Author: User
Tags opencart

When using OpenCart for two development, it is possible to modify the folder name of the background directory if necessary. The steps are as follows:

1, change the site background folder name to Opencartadmin

2. Locate the config.php file under this folder

$document _root = $_server[' document_root '); $server _name = $_server[' server_name '];//$website _root = Str_replace (" Admin/"," ", $document _root), if (Isset ($_server[' https") && (($_server[' https '] = = ' on ') | | ($_server[' HTTPS '] = = ' 1 ')) ) {//Httpdefine (' http_server ', ' https://'. $server _name. '/admin/');d efine (' Http_catalog ', ' https://'. $server _name. '/');//Httpsdefine (' https_server ', ' https://'. $server _name. '/admin/');d efine (' Https_catalog ', ' https://'. $server _name. '/');d efine (' cdn_server ', ' https://d1eki5bd8dytdi.cloudfront.net/');} else {//Httpdefine (' http_server ', ' http://'. $server _name. '/admin/');d efine (' http_catalog ', ' http://'. $server _name. '/');//Httpsdefine (' https_server ', ' http://'. $server _name. '/admin/');d efine (' https_catalog ', ' http://'. $server _name. '/');d efine (' cdn_server ', ' http://d1eki5bd8dytdi.cloudfront.net/');} Dirdefine (' Dir_application_global ', $document _root. '/');d efine (' dir_application ', $document _root. '/admin/');d efine (' Dir_system ', $document _root. '/system/');d efine (' Dir_language ', $document _root. '/admin/language/');d efine (' dir_template ', $document _root. '/admin/view/template/');d efine (' Dir_config ', $document _root. '/system/config/');d efine (' Dir_image ', $document _root. '/image/');d efine (' Dir_cache ', $document _root. '/system/cache/');d efine (' dir_download ', $document _root. '/system/download/');d efine (' dir_upload ', $document _root. '/system/upload/');d efine (' dir_logs ', $document _root. '/system/logs/');d efine (' dir_modification ', $document _root. '/system/modification/');d efine (' Dir_catalog ', $document _root. '/catalog/');d efine (' Dir_invoice ', $document _root. '/admin/invoice/');d efine (' Dir_vendor ', $document _root. '/vendor/');d efine (' Dir_excel ', $document _root. '/admin/excel/');d efine (' Http_protential_customer_excel ', http_server. ' excel/protential_customer.xlsx ');d efine (' Http_protential_manufacturer_excel ', http_server. ' excel/protential_manufacturer.xlsx ');d efine (' Http_excel ', HTTP_server. ' excel/');d efine (' default_volume_id ', 4);d efine (' default_price_type_id ', 1);d efine (' default_order_customer_id ', ;d efine (' attr_brand_id ');d efine (' attr_group_id ', 7);d efine (' attr_specification_id ', +);d efine (' Attr_ Expiration_id ', 5);d efine (' authorized_user_id ', 1);d efine (' Random_sort_base ', 1000);d efine (' normal_user_id '); Define (' default_currency ', ' CNY ');d efine (' stuff_commission ', 0.05);d efine (' Model_no_length ', 6);d efine (' Length_ Class_id_meter ', 4);d efine (' fob_currency_id ', 4);//Db/*define (' db_driver ', ' mysqli ');d efine (' Db_hostname ', ' Cso-main-db.cukuz7fl9ajn.ap-southeast-1.rds.amazonaws.com ');d efine (' db_username ', ' admin ');d efine (' DB_PASSWORD ') , ' cso1234# ');d efine (' db_database ', ' Csomain ');d efine (' Db_prefix ', ' oc_ '); */require_once ("... /inc/dbconfig.php ");

  Then use the editor to replace all admin with opencartadmin

<?php$document_root = $_server[' Document_root ']; $server _name = $_server[' server_name '];//$website _root = str_ Replace ("opencartadmin/", "", $document _root), if (Isset ($_server[' https ") && (($_server[' https '] = = ' on ') | | ($_server[' HTTPS '] = = ' 1 ')) ) {//Httpdefine (' http_server ', ' https://'. $server _name. '/opencartadmin/');d efine (' Http_catalog ', ' https://'. $server _name. '/');//Httpsdefine (' https_server ', ' https://'. $server _name. '/opencartadmin/');d efine (' Https_catalog ', ' https://'. $server _name. '/');d efine (' cdn_server ', ' https://d1eki5bd8dytdi.cloudfront.net/');} else {//Httpdefine (' http_server ', ' http://'. $server _name. '/opencartadmin/');d efine (' http_catalog ', ' http://'. $server _name. '/');//Httpsdefine (' https_server ', ' http://'. $server _name. '/opencartadmin/');d efine (' https_catalog ', ' http://'. $server _name. '/');d efine (' cdn_server ', ' http://d1eki5bd8dytdi.cloudfront.net/');} Dirdefine (' Dir_application_global ', $document _root. '/');d EfinE (' dir_application ', $document _root. '/opencartadmin/');d efine (' Dir_system ', $document _root. '/system/');d efine (' Dir_language ', $document _root. '/opencartadmin/language/');d efine (' dir_template ', $document _root. '/opencartadmin/view/template/');d efine (' Dir_config ', $document _root. '/system/config/');d efine (' Dir_image ', $document _root. '/image/');d efine (' Dir_cache ', $document _root. '/system/cache/');d efine (' dir_download ', $document _root. '/system/download/');d efine (' dir_upload ', $document _root. '/system/upload/');d efine (' dir_logs ', $document _root. '/system/logs/');d efine (' dir_modification ', $document _root. '/system/modification/');d efine (' Dir_catalog ', $document _root. '/catalog/');d efine (' Dir_invoice ', $document _root. '/opencartadmin/invoice/');d efine (' Dir_vendor ', $document _root. '/vendor/');d efine (' Dir_excel ', $document _root. '/opencartadmin/excel/');d efine (' Http_protential_customer_excel ', http_server. ' excel/protential_customer.xlsx ');d efine (' http_protential_manufactuRer_excel ', Http_server. ' excel/protential_manufacturer.xlsx ');d efine (' Http_excel ', http_server. ' excel/');d efine (' default_volume_id ', 4);d efine (' default_price_type_id ', 1);d efine (' default_order_customer_id ', ;d efine (' attr_brand_id ');d efine (' attr_group_id ', 7);d efine (' attr_specification_id ', +);d efine (' Attr_ Expiration_id ', 5);d efine (' authorized_user_id ', 1);d efine (' Random_sort_base ', 1000);d efine (' normal_user_id '); Define (' default_currency ', ' CNY ');d efine (' stuff_commission ', 0.05);d efine (' Model_no_length ', 6);d efine (' Length_ Class_id_meter ', 4);d efine (' fob_currency_id ', 4);//Db/*define (' db_driver ', ' mysqli ');d efine (' Db_hostname ', ' Cso-main-db.cukuz7fl9ajn.ap-southeast-1.rds.amazonaws.com ');d efine (' db_username ', ' opencartadmin ');d efine (' DB_ PASSWORD ', ' cso1234# ');d efine (' db_database ', ' Csomain ');d efine (' Db_prefix ', ' oc_ '); */require_once ("... /inc/dbconfig.php ");

Note: Some vqmod mode feature plug-ins default to find the admin of this background folder name, then you can do this vqmod the corresponding XML file is also modified to adjust.

OpenCart Modifying the Background folder name

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.