2014年3月5日星期三

Brief introduction of the structure and system processes of zencart system

When doing zencart development , we must first understand the structure of the system  how to work , and it is how that kind of a structure in the end? Here i dont want to say too complex  ,but give you a simple and overview of this systerm. Zencart  belongs to a simple little MVC framework structure , on the introduction and benefits of MVC do not want to say more. He said there is a single entry is the entry procedure , what is the single entrance , this is very easy to understand. If you do not install SEO plugin , then all of the URL of the page you see are based on index.php? Main_page = do for the people , so that people who do not understand that he is only one page ( also can be understood ) , in fact, it is precisely this structure where his advantage , index.php page as a portal , according to different parameters behind the decision to enter the different procedures.And this page will play a role in distributing tasks , all pages are available through the back of the parameters to achieve it . This would solve the problem of complex and not easy to manage a multi- entry program. And it is this structure is particularly suitable for modular development , and this system is actually the case. If you want to modify the contents of the product to achieve the page, you can find the page related code module, which is product_info zencart this module if you want to modify, you can quickly find the module information of the page, in fact, is the main module inside query the database for information.The module is placed in the file includes / modules directory. And if it is the page to find the directory below pages / directory , and if you can find the border sideboxes / directory , the other as the name suggests it. In accordance with this understanding can accelerate the understanding of zencart system. Get inside information from the module file inside after going to the front display , so the next step is to includes / templates / find the corresponding tpl_ files in your templates / templates directory , modify the template file is modified to achieve our goal . This is about the process .Understanding the flow of the system , the next will be conducive to the development of the secondary template .The default zencart page consists of 5 parts , namely,Page header - template file for the includestemplates your template name commontpl_header.phpBody of the page - the template file includestemplates your template name commontpl_main_page.php
      
Under the main page is divided into left , center and right three parts.
      
Left border - module file for the includesmodulescolumn_left.php
      
The middle part of the module - includestemplates your template name commonmain_template_vars.php
      
Right border - module file for the includesmodulescolumn_right.phpBottom of the page - the template file includestemplates your template name commontpl_footer.phpIn doing zencart template secondary development , if they knew the words , and will be helpful for your zencart development .
Tagged under:

0 评论:

发表评论