mirror of
https://github.com/retailcrm/opencart-module.git
synced 2025-01-23 03:01:41 +03:00
fix customer externalId
This commit is contained in:
parent
c5f691b8bf
commit
cce894f8b6
@ -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'] : (microtime(true) * 10000) . mt_rand(1, 1000);
|
$order['customerId'] = ($data['customer_id'] != '') ? $data['customer_id'] : (int) substr((microtime(true) * 10000) . mt_rand(1, 1000), 10, -1);
|
||||||
$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…
x
Reference in New Issue
Block a user