The whole codebase consists of several applications primarily written using PHP and .Net. All the applications are centralized around CRM, a customer relationship management system written in PHP.

CRM

CRM is a web application consisting of several modules. It mainly uses the following techstack.

  • PHP
  • Yii 1.1
  • MVC architecture
  • SQL Server

Where to find the code for a URL?

Let’s say you are asked to perform a task on the following URL:

mt2.itserver.biz/admin/indexyii.php?r=orders/placeOrder

While coding and testing, we shall use the local URLs, so our URL will change to

mt2.itserver.biz.local/admin/indexyii.php?r=orders/placeOrder (notice .local at the end of domain name)

Now, to find the code, you will take the r query parameter. It currently has a value of “orders/placeOrder“. The part before the “/” (orders) indicates controller and the other one suggests action.

The controllers are located at: httpdocs/admin/protected/controllers, you will go to the OrdersController.php and search for action<ActionName> or actionPlaceOrder.

The action will likely be returning a view like this

$this->render('view_name', ...)

You can find the view in httpdocs/admin/protected/views/<controller>/<view>.php.

Reporting

CRM uses crystal reports and SQL server to create detailed reports for users. Here is an example of a report:

Code and actual Crystal Reports files can be found in httpdocs/report directory.

More details can be found here: (TODO)

Custom

BEFORE PLACING ANYTHING IN CUSTOM – YOU MUST ASK PERMISSION FROM YOUR TEAM LEADS

CRM runs on several domains, therefore, a new module is introduced to help you write and deploy code without affecting other domains. Custom allows you to write code for a specific code only.

The custom folder is located at httpdocs/custom. The code for a specific domain can be placed in httpdocs/custom/<domain.local> folder.

Let’s say you are creating something for mt2.itserver.biz, we can place our code like this (notice the .local suffix):

Original DirectoryCustom DirectoryDescription
httpdocs/admin/protected/viewshttpdocs/custom/mt2.itserver.biz.local/views
httpdocs/admin/protected/reporthttpdocs/report/report
Make sure to use the mt2.itserver.biz.local domain for testing.

ITLCommon

ITLCommon contains a lot of reusable code for global application, this is a helper and can be found at httpdocs/admin/protected/helpers/ITLCommon.php.

Leave a Reply

Your email address will not be published. Required fields are marked *