Catalogue
One, the current market popular Electronic mall system 1
Second, Ecshop Introduction of 1
Third, installation 2
Four, Echsop directory Structure of 5
v. Analysis Ecshop architecture of the inside program 5
Six, the small test sledgehammer to change the breadcrumb navigation to two greater than the number 6
1 , according to PHP page to find the template that corresponds to the page. 6
2 , find CATEGORY.DWT template file, open the location where breadcrumb navigation is found 6
3 , in Library directory to find Ur_here.lbi File 7
Seven, init.php File Analysis 9
Eight, the completion of the user login is, You can sign in using a mailbox. 11
Nine, complete the balance display: 15
10. When adding a new item, add a Seotitle, easy to display on the Product Details page. 17
11. Set of template 20
1 , copy the template file to Themes directory below. The style of the template and the path to the picture are the same as the default in ecshop 20
2 , and remove the navigation information from the template file. 21
3 , showing the classification of the goods 22
4 , remove top sellers 24
5 , take out the best recommendation Data , the current market popular electronic mall system
Ecshop
SHOPNC (Code partial encryption)
Abroad: Zencart,magento (Mackindou)
Generally in foreign trade companies, with Zencart,magento with more.
Magento was developed on the basis of zendframework. second, the introduction of Ecshop
Ecshop is a Shanghai Business Network Technology Co., Ltd. (SHOPEX) under the-B2C Independent online shop system, suitable for enterprises and individuals to quickly build personalized online stores. The system is a cross-platform open source program developed based on PHP language and MySQL database architecture.
History:
In June 2006, Ecshop launched its first version of 1.0
From May 2007 to June, Ecshop Management sold Ecshop to Hong sing century.
October 10, 2008, Ecshop series software (including Ecshop,ecmall, Maifou, etc.) was acquired by Shanghai Merchants Network Science and Technology Co., Ltd. (SHOPEX).
April 2012, released Ecshop v2.7.3 release 0411 III, installation
1, download unzip, the upload directory copy the root directory of the Web site (Virtual host directory)
2. Configure a virtual host
3, if your PHP version is relatively high, then block some output hint error.
Open the init.php file under the includes directory
In the Open background directory (Admin) of the init.php file.
4, the implementation of the installation, in the browser access to the domain name.
IV. directory structure of Echsop
v. Analysis of the structure of the ecshop inside the program
1:ecshop belongs to the process-oriented + function call -based, and does not use single-entry mode specific functions corresponding to specific pages.
2: The template engine used is a simplified smarty template.
First step: Include include/init.php, perform initialization of database and smarty, etc.
The second step: Call the relevant function to fetch the data from the database, and then assign
Step three: Display a static page
Summary: It's also an MVC architecture, but it's not purely oop, it's not a single entry.
Pure OOP: All things must belong to a class and cannot be detached from the outside of the class.
Controller : php file in root directory
model layer : Some files that start with lib_, such as: lib_article: File-related operations includes/.
View layer:themes/front static page six, small test sledgehammer to change the breadcrumb navigation to two greater than the number of
1, according to the PHP page to find the template corresponding to the page.
2. Locate the CATEGORY.DWT template file and open the location where you found the breadcrumb navigation.
Idea: Based on static page analysis: Just find the <div id= "Ur_here" > location in the template and you can find it.
Through analysis, navigation is in the Ur_here.lbi file under the Library directory,
3. Locate the Ur_here.lbi file in the library directory
The output of the discovery navigation is output by {$ur _here} variable
Note that there must be a $smarty->assign (' Ur_here ') in the PHP page;
The search does not currently have this function, which means that the function is defined in another page.
Open the init.php file to find it by require other files in the file
The last discovery is in the lib_main.php file.
Practice yourself: Remove the word "powered by Echsop" in the title.
vii. init.php File Analysis
1. Define a root directory to facilitate the introduction of other files.
2, determine whether to install
3, initialization settings, when there is no permission to modify the server in the php.ini file can be in the page itself through the Ini_set function to complete the modification.
4, to determine whether magic quotes open, if not open, you want to customize the function to complete the filtering of the data.
$sql = "SELECT * from user where username= ' $username ' # ' and password= ' $password '";
5. Initialize the class of the database
$ecs->table (' sessions_data ')//return the actual table name of the parameter
6. Load the Language pack file directory
7. Judging Visitors
8. Create a Smarty Object
20150411--dede two times Development-01