How do I configure the module ?

Module Purpose

Module aims to export useful related orders or products result in your accounting.

It allows you to configure :
- report format from template report list.
- Choice between 2 output format, HTML in order to check your result in live or CSV In order to operate data in accounting system.

Easy to configure and reached by «orders» admin tab, you can get quickly your accounting data from search.
 

 

Default screen : 

Basic Settings

Including «Headings»

 

Default, option is checked. Displays headings of columns and totals of numeric data.

In case of data operating of third-party, please uncheck option.

 

Configure Date format

Selected format will be used in report with displaying format of displayed dates.

You can also directly go to the admin tab by clicking on export form button.

Manage Admin Tab of «Orders» menu
Default screen :

 

 

 


Choose format

This option lets you select a report format, already defined in module.
Each format includes suitable list of fields.

Encoding

This option lets you encode your CSV report in order to operate data in Excel which doesn’t manage UTF-8 encoding.

Search and Sort fields

There is a notion of group report type.
 

 

Search :

All fields let you to mature your report result.
Date and number fields are available. Choose a period or begin or end value.
You can also search by order status. No status selected will return orders with all status.
Your status selection will be saved each report creation in order to avoid you to check status each time.
A «product» group report will display more features to filter (Cf. screen4).

Sort :


Sort fields lets you sort your result by a specific key. List isn’t complete, whole of fields is shared by all report format.
According to choose «product» or «order» or «brand» or «supplier» or «category» type, sort fields will be different.

Then, you can choose a direction of sort.
 

Export format

You can choose between 2 format :
- html = lets you check result in live. Report will be displayed above search form.
- csv = lets you classify your reports in order to operate data in accounting system.
According to navigator, csv download is carried out alone or by downloading window.

HTML search result - «orders» report type

HTML search result - «products» report type

CSV search result - «orders» report type

CSV search result - «products» report type

Module Display

Module is used only in administration context.

Note to developers

Architecture

Module architecture is decomposed like this (look PHP Doc in ordertaxprofitreport class):
- conf/
- common: used by all conf. Defines main path and globals variables
- admin: only used in admin context
- install: only used in install context
- lib/install
- i-install.php (interface)
- install-ctrl_class.php (controller = design pattern «factory»)
- install-sql_class.php classes (installation «business» class)
- install-config_class.php classes (installation «business» class)
- install-tab_class.php classes (installation «business» class)
- lib/admin
- i-admin.class.php (interface)
- admin-ctrl.class.php (controller = design pattern «factory»)
- admin-display_class.php and admin-update_class.php and admin-export_class.php classes (configuration «business» classes)
- lib/module-dao_class.php => D.A.O (Data Access Object) manage SQL queries
- lib/module-tools_class.php => contains all transverse function
- lib/warnings_class.php => set warnings managed by Prestashop while module installation isn’t configured yet.

- templates/
- admin/ => templates used only for back office (and admin tab)

Tricks

Functionnal

None.

Technical

Each «business» class used in «lib/admin» have to return associative array :
‘tpl’ => template name to be used
‘assign’ smarty assigned values

In this way, displayModule() function aggregates all displaying .