Working with hits
Copy the link to the article
Copied

When installing the module for the first time, all services will be launched. By default, the catalogue is generated every 4 hours.

To generate a directory manually or configure it to be launched via cron, you can use the following command: php modules/retailcrm/cli.php --job RetailcrmIcmlEvent

To get help with this command, enter the following command at the site root: php modules/retailcrm/cli.php

This will display a list of available services, which will allow you to copy the example of launching in cron from the help, replacing <job name> with the name of the service.

Synchronisation on a hit is launched every 15 minutes. If the service manager does not work on another hit in the background, and more than 15 minutes have passed after the last synchronisation on the history, synchronization will be launched.

In the CLI, since version 3.1.0, there is a command (php modules/retailcrm/cli.php --run-jobs) which launches services in the same way as they start on a hit. Using it, jobs are added to the service.

The complete help looks like this:

Available jobs:
- RetailcrmAbandonedCartsEvent
- RetailcrmIcmlEvent
- RetailcrmSyncEvent
- RetailcrmInventoriesEvent
- RetailcrmExportEvent
Usage:
>php /var/www/html/modules/retailcrm/cli.php -j <job name>- Runs provided job
>php /var/www/html/modules/retailcrm/cli.php --job <job name>- Runs provided job
>php /var/www/html/modules/retailcrm/cli.php --run-jobs - Run default jobs routine
>php /var/www/html/modules/retailcrm/cli.php --set-web-jobs true / false - Enable or disable web jobs
>php /var/www/html/modules/retailcrm/cli.php --query-web-jobs - Check web jobs status
WARNING: Commands below are dangerous and should be used only when job manager or cli doesn't work properly.
Use them at your own risk.
>php /var/www/html/modules/retailcrm/cli.php --reset-job-manager - Will reset job manager internal timers & current job name
>php /var/www/html/modules/retailcrm/cli.php --reset-all - Will reset the entire job subsystem state, can resolve most problems

Where:

php modules/retailcrm/cli.php --run-jobs - launches all jobs

php /modules/retailcrm/cli.php --set-web-jobs false - disables hits (if you pass 'true', it enables)

php modules/retailcrm/cli.php --query-web-jobs - displays the status of hits activity

php modules/retailcrm/cli.php --reset-job-manager - resets the job manager

php modules/retailcrm/cli.php --reset-all - resets the job manager and lock CLI

Thank you for your feedback.
Was this article helpful?
No
  • Рекомендации не помогли
  • Нет ответа на мой вопрос
  • Текст трудно понять
  • Не нравится описанный функционал
Yes
Previous article
Client change in system and PrestaShop orders when working with corporate clients
The article describes how to transfer and change clients in PrestaShop and system orders.
#}