1
0
mirror of synced 2024-11-25 14:56:09 +03:00
This commit is contained in:
Grisha Pomadchin 2014-01-31 20:20:37 +04:00
parent 8910c7ef37
commit 1fdd539252
3 changed files with 10 additions and 6 deletions

View File

@ -380,7 +380,7 @@ class ICrmOrderActions
// we dont need new orders without any customers (can check only for externalId)
if(!isset($order['customer']['externalId']) && !$order['customer']['externalId']) {
if (!$order['customer']['email']) {
$login = 'user_' . (microtime(true) * 100);
$login = 'user_' . (microtime(true) * 1000) . mt_rand(1, 1000);
$server_name = 0 < strlen(SITE_SERVER_NAME)?
SITE_SERVER_NAME : 'server.com';
$order['customer']['email'] = $login . '@' . $server_name;
@ -395,7 +395,7 @@ class ICrmOrderActions
$arUser = $dbUser->Fetch();
$registeredUserID = $arUser['ID'];
} else {
$login = 'user_' . (microtime(true) * 100);
$login = 'user_' . (microtime(true) * 1000) . mt_rand(1, 1000);
$registerNewUser = true;
}
}

View File

@ -383,6 +383,8 @@ class intaro_intarocrm extends CModule {
'<optgroup label="' . $orderStatusGroup['name'] . '">';
foreach ($orderStatusGroup['statuses'] as $payment) {
if(!isset($arResult['paymentList'][$payment])) continue;
if ($paymentStatusesArr[$bitrixPaymentStatus['ID']] == $arResult['paymentList'][$payment]['code']) {
$input['payment-status-' . $bitrixPaymentStatus['ID']] .=
'<option value="' . $arResult['paymentList'][$payment]['code'] . '" selected>';

View File

@ -191,10 +191,12 @@ $defaultPayment = array(
<?php foreach($arResult['paymentGroupList'] as $orderStatusGroup): if(!empty($orderStatusGroup['statuses'])) : ?>
<optgroup label="<?php echo $APPLICATION->ConvertCharset($orderStatusGroup['name'], 'utf-8', SITE_CHARSET); ?>">
<?php foreach($orderStatusGroup['statuses'] as $payment): ?>
<option value="<?php echo $arResult['paymentList'][$payment]['code']; ?>"
<?php if ($defaultPayStatuses[$bitrixPaymentStatus['ID']] == $arResult['paymentList'][$payment]['code']) echo 'selected'; ?>>
<?php echo $APPLICATION->ConvertCharset($arResult['paymentList'][$payment]['name'], 'utf-8', SITE_CHARSET); ?>
</option>
<?php if(isset($arResult['paymentList'][$payment])): ?>
<option value="<?php echo $arResult['paymentList'][$payment]['code']; ?>"
<?php if ($defaultPayStatuses[$bitrixPaymentStatus['ID']] == $arResult['paymentList'][$payment]['code']) echo 'selected'; ?>>
<?php echo $APPLICATION->ConvertCharset($arResult['paymentList'][$payment]['name'], 'utf-8', SITE_CHARSET); ?>
</option>
<?php endif; ?>
<?php endforeach; ?>
</optgroup>
<?php endif; endforeach; ?>