2014-08-19 07:56:17 +04:00
|
|
|
Installation
|
|
|
|
============
|
|
|
|
|
|
|
|
### Clone module.
|
|
|
|
```
|
|
|
|
git clone git@github.com:/intarocrm/opencart-module.git
|
|
|
|
```
|
|
|
|
|
|
|
|
### Install Rest API Client.
|
|
|
|
|
|
|
|
```
|
|
|
|
cd opencart-module/system/library/intarocrm
|
|
|
|
./composer.phar install
|
|
|
|
```
|
|
|
|
|
|
|
|
### Install module
|
|
|
|
```
|
|
|
|
cp -r opencart-module/* /path/to/opecart/instance
|
|
|
|
```
|
|
|
|
|
|
|
|
### Activate via Admin interface.
|
|
|
|
|
|
|
|
Go to Modules -> Intstall module. Before running exchange you must configure module.
|
|
|
|
|
|
|
|
### Export
|
|
|
|
|
|
|
|
Setup cron job for periodically catalog export
|
|
|
|
|
|
|
|
```
|
2014-08-20 00:19:54 +04:00
|
|
|
* */12 * * * /usr/bin/php /path/to/opencart/cli/cli_export.php >> /path/to/opencart/system/logs/cronjob_export.log 2>&1
|
2014-08-19 07:56:17 +04:00
|
|
|
```
|
|
|
|
|
2014-08-21 15:04:46 +04:00
|
|
|
Into your CRM settings set path to exported file
|
|
|
|
|
|
|
|
```
|
2014-08-21 15:05:33 +04:00
|
|
|
/download/intarocrm.xml
|
2014-08-21 15:04:46 +04:00
|
|
|
```
|
|
|
|
|
2014-08-19 07:56:17 +04:00
|
|
|
### Exchange setup
|
|
|
|
|
|
|
|
|
|
|
|
#### Export new order from shop to CRM
|
|
|
|
|
|
|
|
```
|
2014-08-28 02:13:37 +04:00
|
|
|
$this->load->model('intarocrm/order');
|
|
|
|
$this->model_intarocrm_order->send($data, $order_id);
|
2014-08-19 07:56:17 +04:00
|
|
|
```
|
|
|
|
|
2014-08-28 18:39:02 +04:00
|
|
|
Add this lines into:
|
|
|
|
* /catalog/controller/checkout/confirm.php script, into index method before setOutput call
|
|
|
|
* /admin/model/sale/order.php script, into addOrder & editOrder methods at the end of these methods
|
2014-08-19 07:56:17 +04:00
|
|
|
|
|
|
|
#### Export new order from CRM to shop
|
|
|
|
|
|
|
|
Setup cron job for exchange between CRM & your shop
|
|
|
|
|
|
|
|
```
|
2014-08-20 00:19:54 +04:00
|
|
|
*/5 * * * * /usr/bin/php /path/to/opencart/cli/cli_export.php >> /path/to/opencart/system/logs/cronjob_history.log 2>&1
|
2014-08-19 08:03:30 +04:00
|
|
|
```
|