X-Cart:Maintenance Agent

From Qualiteam Help
Jump to: navigation, search

What Maintenance Agent module does

This module enables X-Cart to send email notifications to the store administrator with information about the store functioning during a certain period. These notifications can include visits statistics, orders statistics, various log messages (error logs, logs of file operations, DB backup/restore, data import, changes of environment settings, operations on products and orders, etc).

Maintenance Agent is available as a built-in module in all X-Cart editions. It does not require installation and can be enabled in the Modules section of X-Cart Admin area.

Roles in Maintenance Agent module management

If you are an X-Cart GOLD or GOLD PLUS administrator/provider or an X-Cart PLATINUM or PRO administrator:

Enabling and Configuring 'Maintenance Agent

To begin using the module enable it under Administration menu->Modules. When the module is enabled, you can see: Maintenance Agent options section in General settings/Modules options.

Adjust the module settings via General settings/Modules options->Maintenance Agent options:

Maint agent.gif

1. Use the field 'Periodic sending of emails to the store administrator about the store activity' to specify, how often you wish to receive email notifications from Maintenance Agent (Once a day, Once a week, Once a month).

Periods are calculated as follows:
  • a day is a period of 24 consecutive hours from midnight to midnight;
  • a week is a period of 7 consecutive days;
  • a month is a period from a day in one month to a day numerically corresponding to that day in the following month, less one day.

2. Use the field 'Periodic email sending mode' to specify, whether you want Maintenance Agent notifications to be sent automatically or in manual mode.

When Automatic mode is selected, the script that sends Maintenance Agent notifications is activated by any store script being run first in a period following the period covered in the report.
For example, you enable Maintenance Agent module on April 27, setting the period of sending email notifications to 'Once a day'.
In this case, the first Maintenance Agent notification is sent to the site administrator email address immediately after you click the Save button in General settings/Modules options->Maintenance Agent options. The report in this notification covers the period from 12:00am April 26 to 12:00am April 27.
The next notification is sent on April 28, provided that at least one shop script is run on that day. The report in this notification covers the period from 12:00am April 27 to 12:00am April 28.
If no one uses the store on April 28 (no script is run), and the next script is called only on April 29, no notification is sent on April 28, while on April 29 the site administrator receives a report covering the period from 12:00am April 27 to 12:00am April 29.
Selecting Manual mode provides you more flexibility in adjusting the period of sending email notifications. Using this mode, you can set a cron script to periodically run admin/send_periodic.php - a script that sends Maintenance Agent notifications:
/usr/local/bin/php  /path/to/your/store/admin/send_periodic.php
Note: The script admin/send_periodic.php is used only in Manual mode and can be run only from the command line (you cannot run it using the browser's address line).

3. If you wish messages from shop logs to be included into Maintenance Agent notifications, select titles of logs messages from which you wish to receive.

4. If you wish statistics on visits to the store site to be included into Maintenance Agent notifications, select the appropriate check box.
Please note that statistics on visits includes only visitors who signed in/registered in the store, but not all the site visitors.

5. If you wish orders statistics to be included into Maintenance Agent notifications, select the appropriate check box.

6. Click the Save button.