fix customer externalID

This commit is contained in:
Alex Lushpai 2014-09-03 13:16:30 +04:00
parent fe6779e567
commit c5f691b8bf

View File

@ -47,7 +47,7 @@ class ApiHelper
if(count($customers) > 0 && isset($customers[0]['externalId'])) {
$order['customerId'] = $customers[0]['externalId'];
} 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['firstName'] = $data['firstname'];
$customer['lastName'] = $data['lastname'];