mirror of
https://github.com/retailcrm/opencart-module.git
synced 2024-11-25 22:56:07 +03:00
fix customer externalID
This commit is contained in:
parent
fe6779e567
commit
c5f691b8bf
@ -47,7 +47,7 @@ class ApiHelper
|
|||||||
if(count($customers) > 0 && isset($customers[0]['externalId'])) {
|
if(count($customers) > 0 && isset($customers[0]['externalId'])) {
|
||||||
$order['customerId'] = $customers[0]['externalId'];
|
$order['customerId'] = $customers[0]['externalId'];
|
||||||
} else {
|
} else {
|
||||||
$order['customerId'] = ($data['customer_id'] != '') ? $data['customer_id'] : 0;
|
$order['customerId'] = ($data['customer_id'] != '') ? $data['customer_id'] : (microtime(true) * 10000) . mt_rand(1, 1000);
|
||||||
$customer['externalId'] = $order['customerId'];
|
$customer['externalId'] = $order['customerId'];
|
||||||
$customer['firstName'] = $data['firstname'];
|
$customer['firstName'] = $data['firstname'];
|
||||||
$customer['lastName'] = $data['lastname'];
|
$customer['lastName'] = $data['lastname'];
|
||||||
|
Loading…
Reference in New Issue
Block a user