mirror of
https://github.com/retailcrm/opencart-module.git
synced 2024-11-27 23:56:05 +03:00
Merge pull request #116 from iyzoer/v2.2
Добавлена передача внешнего кода клиента при создании заказа
This commit is contained in:
commit
6ba09d3ac5
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
.env
|
||||
bin/
|
||||
vendor/
|
||||
www/
|
@ -22,6 +22,9 @@ class ModelRetailcrmOrder extends Model {
|
||||
|
||||
$order = array();
|
||||
|
||||
if ($order_data['customer_id']) {
|
||||
$order['customer']['externalId'] = $order_data['customer_id'];
|
||||
} else {
|
||||
$customers = $this->retailcrm->customersList(
|
||||
array(
|
||||
'name' => $order_data['telephone'],
|
||||
@ -38,6 +41,7 @@ class ModelRetailcrmOrder extends Model {
|
||||
}
|
||||
|
||||
unset($customers);
|
||||
}
|
||||
|
||||
$order['externalId'] = $order_id;
|
||||
$order['firstName'] = $order_data['firstname'];
|
||||
|
Loading…
Reference in New Issue
Block a user