...
Select downloaded module archive and confirm installation. Wait for a message about successful installation.
Go to "SestemSуIn some casesstem" section → "Users" → "User Groups"
...
Go to “Extensions” section → “Extensions”.
Перейдите в раздел «Модули/Расширения» → «Модули/Расширения»
Выберите тип расширения «Модули» и нажмите кнопку «Активировать» для модуля «OT API Import».
Перейдите в раздел «Модули/Расширения» → «Модификаторы» и нажмите справа вверху кнопку «Обновить».
Модуль установлен.
Choose extension type "Modules" in drop-down menu.
Click "Install" button for "OT API Import" module
Go to “Extensions” section → “Modifications” and click "Refresh" button on top right.
Module is installed.
Scheduled product update
...
- Manually copy cli directory from the module archive to the directory where admin folder is located.
- To automatically update products on a schedule, you need to set up cron job to run with a frequency equal to or less than the value of product update launch period (this is Update interval parameter in module settings - update interval in minutes).
- example of running cron job every hour:
@hourly cd "opencart directory"/cli && php7.4 otapi_import_cli.php > /dev/null 2>&1 - Importing a large number of goods can take a long time - from several hours to several days, depending on the server computing resources of the server, especially the database server. Therefore, too frequent launch intervals do not make sense: if the previous import has not yet been completed, the new one will still not be launched.
- Импорт большого количества товаров может занимать продолжительное время — от нескольких часов до нескольких суток в зависимости от вычислительных ресурсов сервера, в особенности сервера БД. Поэтому слишком частые интервалы запуска не имеют смысла: если предыдущий импорт еще не завершен, новый все равно не будет запущен.
Work with plugin
Перейдите в раздел «Модули/Расширения» → «Модули/Расширения»
- Нажмите кнопку «Редактировать» для модуля «OT API Import». (Доступен также более короткий путь к настройкам модуля через «Каталог» → «OT API Импорт».
- Задайте необходимые параметры настроек и нажмите кнопку «Сохранить настройки».
- Для быстрого наполнения каталогов товарами рекомендуется установить галочку «Test category filling» (тестовое наполнение каталогов) и задать параметр «Frame size» — размер фрейма 5-10 товаров. Именно столько товаров загрузится для каждой категории.
- Совершите первичную загрузку каталога товаров: перейдите в настройки модуля во вкладку «Импорт каталога» и нажмите кнопку «Импорт каталога».
- После завершения тестового импорта проверить, что все каталоги загрузились и содержат товары. После этого уберите галочку «Test category filling», установите «Frame size» в размере 200-500 и произведите полный импорт каталога.
- По окончании импорта отобразится сообщение об успешной загрузке каталога.
Важные замечания:
Go to “Extensions” section → “Extensions”.
- Click "Edit" button for "OT API Import" module. (A shorter path to the module settings is also available through “Catalog” → “OT API Import”
- Make necessary settings and click "Save settings".
- To quickly fill catalogs with products, it is recommended to check “Test category filling” box and set “Frame size” parameter - 5-10 products. This is the number of uploaded products for each category.
- Make initial uploading of product catalogue: go to "Catalog" → "OT API Import" and click "Catalog import".
- After the test import is completed, check that all directories of catalog are downloaded and contain goods. Remove check mark «Test category filling» after that, set «Frame size» 200-500 and make full import of catalog.
- Once the import is complete, a message that catalog has been successfully loaded will be displayed.
Important notes:
- Import will continue as long as the page is open in the browser.
- If you refresh the page or log in again, you must click "Catalog import" button again to resume importing.
- In this case system will prompt you to select “New import” (Start import from the beginning) or “Continue import” (continue work from the point where the import was suspended).
- In some cases, “Failed
- Импорт будет продолжаться до тех пор пока открыта страница в браузере.
- При обновлении страницы или повторном входе в систему для возобновления импорта нужно заново нажать кнопку «Catalog import» (Импорт каталога).
- При этом система предложит выбрать «New import» (Начать импорт сначала) или «Continue import» (продолжить работу с того места на котором импорт был приостановлен).
- В некоторых случаях при запуске импорта может появиться сообщение «Failed to get "otapi_import_lock" on sql connection, another import is running» — это значит импорт уже был запущен другим процессом, например, через cron, или был запущен ранее в другой вкладке браузера.
- Импорт через cron работает циклично, т.е. по завершении импорт будет запущен снова. Еcли такое поведение не нужно, можно после полного импорта каталога отключить импорт в настройках модуля: поле status, или же просто задать для cron больший интервал, например, 1 неделя.
Удаление
- running" message may appear when import starts - this means that import has already started by another process, for example, via cron, or was launched earlier in another browser tab.
- Import via cron works cyclically, i.e. once completed, import will be started again. If you don’t need this behavior, you can disable import in module settings after a complete catalogue import: status field or simply set cron to a larger interval, for example, 1 week.
Removal
- Remove the task to run product updates from cron.
- Go to “Extensions” section → “Extensions” and click "Uninstall" button for "OT API Import" module.
- Go to “Extensions” section → “Installer" and click "Uninstall" button for "OT API Import" module.
- Go to “Extensions” section → “Modifications" and click "Update" button.
- Delete cli directory if you added it.
- Удалите из cron задание на запуск обновления товаров.
- Перейдите в раздел «Модули/Расширения» и нажмите кнопку «Деактивировать» для модуля «OT API Import».
- Перейдите в раздел «Модули/Расширения» → «Установка расширений» и нажмите кнопку «Деактивировать» для модуля «OT API Import».
- Перейдите в раздел «Модули/Расширения» → «Модификаторы» и нажмите кнопку «Обновить».
- Удалите каталог cli, если вы его размещали