Building Modules for TomatoCart Admin

From TomatoCart Wiki

Jump to: navigation, search

The administration panel of TomatoCart is excellent, innovative and efficient.In this tutorial, we’ll focus on illustrating how to implement a module for the administration panel of the TomatoCart and learn about the template engine in the frontend.After reading this tutorial, you’ll have acquired the necessary skill, including:

  1. Adding a menu to the start menu in the administration panel
  2. Buidling the user interface of a module
  3. Dealing with the ajax request generated by the user interface

We’ll begin with the module building by developing a ‘hello world’ module in the admin panel. As developing a new module in the administration panel, we should use the extjs to construct the user interface of the module and the ajax technology to load the data about the module. The files that are responsible for generating the user interface should locate in ‘admin/includes/extmodules/’ and the files in ‘admin/includes/jsons/’ should be responsible for dealing with ajax request and choose the correlative classes in ‘admin/includes/classes/’ to return the appropriate response to the UI. The classes in ‘admin/includes/classes’ should be responsible for handling the data and business logic about the new module.The following figure shows the details of the execution folw.

The execution flow of the module in the admin panel
The execution flow of the module in the admin panel