opencart-module/README.md

75 lines
2.7 KiB
Markdown
Raw Normal View History

2020-11-24 10:15:27 +03:00
[![Build Status](https://github.com/retailcrm/opencart-module/workflows/ci/badge.svg)](https://github.com/retailcrm/opencart-module/actions)
[![Coverage](https://img.shields.io/codecov/c/gh/retailcrm/opencart-module/master.svg?logo=codecov&logoColor=white)](https://codecov.io/gh/retailcrm/opencart-module)
[![GitHub release](https://img.shields.io/github/release/retailcrm/opencart-module.svg?logo=github&logoColor=white)](https://github.com/retailcrm/opencart-module/releases)
[![PHP version](https://img.shields.io/badge/PHP->=5.4-blue.svg?logo=php&logoColor=white)](https://php.net/)
2018-06-18 14:05:15 +03:00
2014-08-19 08:00:13 +04:00
Opencart module
2016-01-29 18:04:48 +03:00
===============
2014-08-15 13:35:22 +04:00
2021-05-18 12:11:19 +03:00
This module allows to integrate CMS Opencart >= 2.3 with [RetailCRM](https://retailcrm.pro).
### Previous versions:
[v1.x](https://github.com/retailcrm/opencart-module/tree/v1.x)
[v2.x (2.0, 2.1, 2.2)](https://github.com/retailcrm/opencart-module/tree/v2.2)
2014-08-15 13:35:22 +04:00
2016-03-14 23:00:43 +03:00
#### Features:
2014-08-15 13:35:22 +04:00
2021-05-18 12:11:19 +03:00
* Export orders to RetailCRM & receive changes from RetailCRM.
* Export product catalog to the [ICML](https://help.retailcrm.pro/Developers/ICML) format.
2014-08-15 13:35:22 +04:00
2016-03-10 02:07:25 +03:00
#### Install
2014-08-19 23:53:11 +04:00
2021-05-18 12:11:19 +03:00
**Note:** `/path/to/your/site` is just a placeholder. You should replace it with the actual path to your site root in the examples below. The module won't work if you'll use those examples without changing the path placeholder.
Copy module files to the site root (replace `/path/to/your/site` with the actual path to your site):
2016-01-29 18:04:48 +03:00
```
unzip master.zip
2021-05-18 12:11:19 +03:00
cp -r opencart-module/src/* /path/to/your/site
2016-01-29 18:04:48 +03:00
```
2016-03-10 02:07:25 +03:00
#### Setup
2016-01-29 18:04:48 +03:00
* Go to Admin -> Extensions -> Modules -> RetailCRM
2021-05-18 12:11:19 +03:00
* Fill you API URL & API key
2016-03-10 02:07:25 +03:00
* Specify directories matching
2016-01-29 18:04:48 +03:00
2020-08-07 14:04:05 +03:00
#### Migrating to 4.* from early modules versions
2021-05-18 12:11:19 +03:00
It's necessary to remove the `/path/to/your/site/system/library/retailcrm` before copying current module into your site.
2020-08-07 14:04:05 +03:00
2016-03-10 02:07:25 +03:00
#### Getting changes in orders
2016-01-29 18:04:48 +03:00
2021-05-18 12:11:19 +03:00
Add to cron (replace `/path/to/your/site` with the actual path to your site):
2016-01-29 18:04:48 +03:00
```
2021-05-18 12:11:19 +03:00
*/5 * * * * /usr/bin/php /path/to/your/site/system/library/retailcrm/cron/history.php >> /path/to/your/site/system/storage/logs/cronjob_history.log 2>&1
2016-01-29 18:04:48 +03:00
```
2016-03-10 02:07:25 +03:00
#### Setting product catalog export
2016-01-29 18:04:48 +03:00
2021-05-18 12:11:19 +03:00
Add to cron (replace `/path/to/your/site` with the actual path to your site):
2016-01-29 18:04:48 +03:00
```
2021-05-18 12:11:19 +03:00
* */4 * * * /usr/bin/php /path/to/your/site/system/library/retailcrm/cron/icml.php >> /path/to/your/site/system/storage/logs/cronjob_icml.log 2>&1
2016-01-29 18:04:48 +03:00
```
2021-05-18 12:11:19 +03:00
Your export file should be available by following url:
2016-01-29 18:04:48 +03:00
```
2016-03-10 02:07:25 +03:00
http://youropencartsite.com/retailcrm.xml
2016-01-29 18:04:48 +03:00
```
2016-08-31 17:28:11 +03:00
2021-05-18 12:11:19 +03:00
Replace `youropencartsite.com` with your site domain and `http` with your site scheme.
2016-08-31 17:28:11 +03:00
#### Export existing orders and customers
2021-05-18 12:11:19 +03:00
Run this command (replace `/path/to/your/site` with the actual path to your site):
```sh
/usr/bin/php /path/to/your/site/system/library/retailcrm/cron/export.php
```
You should run this command only once.