2013-07-08 15:08:14 +04:00
|
|
|
<?php
|
2021-09-08 10:19:29 +03:00
|
|
|
|
|
|
|
use RetailCrm\ApiClient;
|
|
|
|
|
|
|
|
/** @var $APPLICATION */
|
|
|
|
|
2013-07-08 15:08:14 +04:00
|
|
|
IncludeModuleLangFile(__FILE__);
|
|
|
|
|
2016-09-15 16:42:10 +03:00
|
|
|
$MODULE_ID = 'intaro.retailcrm';
|
2013-08-07 14:45:25 +04:00
|
|
|
$CRM_API_HOST_OPTION = 'api_host';
|
2020-04-24 13:18:18 +03:00
|
|
|
$CRM_API_KEY_OPTION = 'api_key';
|
|
|
|
$CRM_SITES_LIST= 'sites_list';
|
|
|
|
$CRM_PAYMENT_TYPES = 'pay_types_arr';
|
|
|
|
$CRM_DELIVERY_TYPES_ARR = 'deliv_types_arr';
|
|
|
|
$CRM_PAYMENT_TYPES = 'pay_types_arr';
|
|
|
|
$CRM_PAYMENT_STATUSES = 'pay_statuses_arr';
|
|
|
|
$CRM_PAYMENT = 'payment_arr';
|
|
|
|
$CRM_ORDER_TYPES_ARR = 'order_types_arr';
|
2013-08-07 14:45:25 +04:00
|
|
|
$api_host = COption::GetOptionString($MODULE_ID, $CRM_API_HOST_OPTION, 0);
|
2020-04-24 13:18:18 +03:00
|
|
|
$api_key = COption::GetOptionString($MODULE_ID, $CRM_API_KEY_OPTION, 0);
|
2021-09-08 10:19:29 +03:00
|
|
|
$arResult['arSites'] = RCrmActions::getSitesList();
|
2020-04-24 13:18:18 +03:00
|
|
|
|
2021-09-08 10:19:29 +03:00
|
|
|
$RETAIL_CRM_API = new ApiClient($api_host, $api_key);
|
2020-04-24 13:18:18 +03:00
|
|
|
COption::SetOptionString($MODULE_ID, $CRM_API_HOST_OPTION, $api_host);
|
|
|
|
COption::SetOptionString($MODULE_ID, $CRM_API_KEY_OPTION, $api_key);
|
2021-09-08 10:19:29 +03:00
|
|
|
COption::SetOptionString($MODULE_ID, $CRM_SITES_LIST, serialize([]));
|
2020-04-24 13:18:18 +03:00
|
|
|
|
|
|
|
if (!isset($arResult['PAYMENT'])) {
|
|
|
|
$arResult['PAYMENT'] = unserialize(COption::GetOptionString($MODULE_ID, $CRM_PAYMENT, 0));
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!isset($arResult['ORDER_TYPES'])) {
|
|
|
|
$arResult['ORDER_TYPES'] = unserialize(COption::GetOptionString($MODULE_ID, $CRM_ORDER_TYPES_ARR, 0));
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!isset($arResult['paymentTypesList'])) {
|
|
|
|
$arResult['bitrixPaymentTypesList'] = RCrmActions::PaymentList();
|
|
|
|
$arResult['paymentTypesList'] = $RETAIL_CRM_API->paymentTypesList()->paymentTypes;
|
|
|
|
$arResult['PAYMENT_TYPES'] = unserialize(COption::GetOptionString($MODULE_ID, $CRM_PAYMENT_TYPES, 0));
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!isset($arResult['bitrixStatusesList'])) {
|
|
|
|
$arResult['bitrixStatusesList'] = RCrmActions::StatusesList();
|
|
|
|
$arResult['paymentList'] = $RETAIL_CRM_API->statusesList()->statuses;
|
|
|
|
$arResult['paymentGroupList'] = $RETAIL_CRM_API->statusGroupsList()->statusGroups;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!isset($arResult['orderTypesList'])) {
|
|
|
|
$arResult['bitrixOrderTypesList'] = RCrmActions::OrderTypesList($arResult['arSites']);
|
|
|
|
$arResult['orderTypesList'] = $RETAIL_CRM_API->orderTypesList()->orderTypes;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!isset($arResult['paymentStatusesList'])) {
|
|
|
|
$arResult['paymentStatusesList'] = $RETAIL_CRM_API->paymentStatusesList()->paymentStatuses;
|
|
|
|
$arResult['PAYMENT_STATUSES'] = unserialize(COption::GetOptionString($MODULE_ID, $CRM_PAYMENT_STATUSES, 0));
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!isset($arResult['bitrixDeliveryTypesList'])) {
|
|
|
|
$arResult['bitrixDeliveryTypesList'] = RCrmActions::DeliveryList();
|
|
|
|
$arResult['deliveryTypesList'] = $RETAIL_CRM_API->deliveryTypesList()->deliveryTypes;
|
|
|
|
$arResult['DELIVERY_TYPES'] = unserialize(COption::GetOptionString($MODULE_ID, $CRM_DELIVERY_TYPES_ARR, 0));
|
|
|
|
}
|
2013-08-07 14:45:25 +04:00
|
|
|
|
2013-07-08 15:08:14 +04:00
|
|
|
//bitrix pyament Y/N
|
|
|
|
$arResult['bitrixPaymentList'][0]['NAME'] = GetMessage('PAYMENT_Y');
|
|
|
|
$arResult['bitrixPaymentList'][0]['ID'] = 'Y';
|
|
|
|
$arResult['bitrixPaymentList'][1]['NAME'] = GetMessage('PAYMENT_N');
|
|
|
|
$arResult['bitrixPaymentList'][1]['ID'] = 'N';
|
2013-07-18 14:32:10 +04:00
|
|
|
|
2021-09-08 10:19:29 +03:00
|
|
|
if (isset($arResult['ORDER_TYPES'])) {
|
2016-09-15 16:42:10 +03:00
|
|
|
$defaultOrderTypes = $arResult['ORDER_TYPES'];
|
2021-09-08 10:19:29 +03:00
|
|
|
} else {
|
|
|
|
$defaultOrderTypes = [
|
2016-09-15 16:42:10 +03:00
|
|
|
1 => 'eshop-individual',
|
2021-09-08 10:19:29 +03:00
|
|
|
2 => 'eshop-legal',
|
|
|
|
];
|
2016-09-15 16:42:10 +03:00
|
|
|
}
|
|
|
|
|
2021-09-08 10:19:29 +03:00
|
|
|
if (isset($arResult['DELIVERY_TYPES'])) {
|
2016-09-15 16:42:10 +03:00
|
|
|
$defaultDelivTypes = $arResult['DELIVERY_TYPES'];
|
2021-09-08 10:19:29 +03:00
|
|
|
} else {
|
|
|
|
$defaultDelivTypes = [
|
2016-09-15 16:42:10 +03:00
|
|
|
1 => 'courier',
|
2021-09-08 10:19:29 +03:00
|
|
|
2 => 'self-delivery',
|
|
|
|
];
|
2016-09-15 16:42:10 +03:00
|
|
|
}
|
|
|
|
|
2021-09-08 10:19:29 +03:00
|
|
|
if (isset($arResult['PAYMENT_TYPES'])) {
|
2016-09-15 16:42:10 +03:00
|
|
|
$defaultPayTypes = $arResult['PAYMENT_TYPES'];
|
2021-09-08 10:19:29 +03:00
|
|
|
} else {
|
|
|
|
$defaultPayTypes = [
|
2016-09-15 16:42:10 +03:00
|
|
|
1 => 'cash',
|
|
|
|
4 => 'e-money',
|
|
|
|
5 => 'bank-card',
|
2021-09-08 10:19:29 +03:00
|
|
|
9 => 'bank-transfer',
|
|
|
|
];
|
2016-09-15 16:42:10 +03:00
|
|
|
}
|
|
|
|
|
2021-09-08 10:19:29 +03:00
|
|
|
if (isset($arResult['PAYMENT_STATUSES'])) {
|
2016-09-15 16:42:10 +03:00
|
|
|
$defaultPayStatuses = $arResult['PAYMENT_STATUSES'];
|
2021-09-08 10:19:29 +03:00
|
|
|
} else {
|
|
|
|
$defaultPayStatuses = [
|
2016-09-15 16:42:10 +03:00
|
|
|
'N' => 'new',
|
|
|
|
'P' => 'prepayed',
|
|
|
|
'F' => 'complete',
|
2021-09-08 10:19:29 +03:00
|
|
|
];
|
2016-09-15 16:42:10 +03:00
|
|
|
}
|
|
|
|
|
2021-09-08 10:19:29 +03:00
|
|
|
if (isset($arResult['PAYMENT'])) {
|
2016-09-15 16:42:10 +03:00
|
|
|
$defaultPayment = $arResult['PAYMENT'];
|
2021-09-08 10:19:29 +03:00
|
|
|
} else {
|
|
|
|
$defaultPayment = [
|
2016-09-15 16:42:10 +03:00
|
|
|
'Y' => 'paid',
|
2021-09-08 10:19:29 +03:00
|
|
|
'N' => 'not-paid',
|
|
|
|
];
|
2016-09-15 16:42:10 +03:00
|
|
|
}
|
2013-07-08 15:08:14 +04:00
|
|
|
?>
|
2013-07-05 18:19:42 +04:00
|
|
|
|
2013-08-07 14:45:25 +04:00
|
|
|
<style type="text/css">
|
|
|
|
input[name="update"] {
|
|
|
|
right:2px;
|
|
|
|
position: absolute !important;
|
|
|
|
top:3px;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
|
|
|
<script type="text/javascript" src="/bitrix/js/main/jquery/jquery-1.7.min.js"></script>
|
|
|
|
<script type="text/javascript">
|
2014-11-01 14:52:40 +03:00
|
|
|
$(document).ready(function() {
|
|
|
|
$('input[name="update"]').live('click', function() {
|
2013-08-07 14:45:25 +04:00
|
|
|
$('input[name="step"]').val(2);
|
|
|
|
BX.showWait();
|
|
|
|
var updButton = this;
|
|
|
|
// hide next step button
|
|
|
|
$(updButton).css('opacity', '0.5').attr('disabled', 'disabled');
|
2014-11-01 14:52:40 +03:00
|
|
|
|
2013-08-07 14:45:25 +04:00
|
|
|
var handlerUrl = $(this).parents('form').attr('action');
|
|
|
|
var data = $(this).parents('form').serialize() + '&ajax=1';
|
2014-11-01 14:52:40 +03:00
|
|
|
|
2013-08-07 14:45:25 +04:00
|
|
|
$.ajax({
|
|
|
|
type: 'POST',
|
|
|
|
url: handlerUrl,
|
|
|
|
data: data,
|
|
|
|
dataType: 'json',
|
|
|
|
success: function(response) {
|
|
|
|
if(response.success) {
|
|
|
|
$.each(response.result, function(i,item){
|
|
|
|
$('select[name="' + i + '"]').replaceWith(item);
|
|
|
|
});
|
2014-11-01 14:52:40 +03:00
|
|
|
}
|
|
|
|
|
2013-08-07 14:45:25 +04:00
|
|
|
BX.closeWait();
|
|
|
|
$(updButton).css('opacity', '1').removeAttr('disabled');
|
|
|
|
$('input[name="step"]').val(3);
|
2014-11-01 14:52:40 +03:00
|
|
|
|
2013-08-07 14:45:25 +04:00
|
|
|
if(!response.success)
|
|
|
|
alert('<?php echo GetMessage('MESS_5'); ?>');
|
|
|
|
},
|
|
|
|
error: function () {
|
|
|
|
BX.closeWait();
|
|
|
|
$(updButton).css('opacity', '1').removeAttr('disabled');
|
|
|
|
$('input[name="step"]').val(3);
|
2014-11-01 14:52:40 +03:00
|
|
|
|
2013-08-07 14:45:25 +04:00
|
|
|
alert('<?php echo GetMessage('MESS_5'); ?>');
|
|
|
|
}
|
|
|
|
});
|
2014-11-01 14:52:40 +03:00
|
|
|
|
2013-08-07 14:45:25 +04:00
|
|
|
return false;
|
2014-01-23 17:50:58 +04:00
|
|
|
});
|
|
|
|
|
2013-08-15 18:49:08 +04:00
|
|
|
$('input[name="delivery-types-export"]').click(function() {
|
2014-01-24 17:57:49 +04:00
|
|
|
if($(this).val() === 'true')
|
2013-08-15 18:49:08 +04:00
|
|
|
$('tr.delivery-types').hide('slow');
|
2014-01-24 17:57:49 +04:00
|
|
|
else if($(this).val() === 'false')
|
2014-01-23 17:50:58 +04:00
|
|
|
$('tr.delivery-types').show('slow');
|
2013-08-15 18:49:08 +04:00
|
|
|
});
|
2013-08-07 14:45:25 +04:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2013-07-05 18:19:42 +04:00
|
|
|
<div class="adm-detail-content-item-block">
|
|
|
|
<form action="<?php echo $APPLICATION->GetCurPage() ?>" method="POST">
|
|
|
|
<?php echo bitrix_sessid_post(); ?>
|
|
|
|
<input type="hidden" name="lang" value="<?php echo LANGUAGE_ID ?>">
|
2016-09-15 16:42:10 +03:00
|
|
|
<input type="hidden" name="id" value="intaro.retailcrm">
|
2013-07-05 18:19:42 +04:00
|
|
|
<input type="hidden" name="install" value="Y">
|
|
|
|
<input type="hidden" name="step" value="3">
|
|
|
|
|
|
|
|
<table class="adm-detail-content-table edit-table" id="edit1_edit_table">
|
|
|
|
<tbody>
|
2016-09-15 16:42:10 +03:00
|
|
|
<!--<tr class="heading">
|
2013-08-07 14:45:25 +04:00
|
|
|
<td colspan="2" style="position:relative;">
|
|
|
|
<b><?php echo GetMessage('STEP_NAME'); ?></b>
|
|
|
|
<input type="submit" name="update" value="<?php echo GetMessage('UPDATE_CATS'); ?>" class="adm-btn-save">
|
|
|
|
</td>
|
2016-09-15 16:42:10 +03:00
|
|
|
</tr>-->
|
2013-07-18 14:32:10 +04:00
|
|
|
<tr align="center">
|
|
|
|
<td colspan="2"><b><?php echo GetMessage('INFO_1'); ?></b></td>
|
|
|
|
</tr>
|
2013-08-07 14:45:25 +04:00
|
|
|
<tr align="center">
|
2020-12-15 12:39:38 +03:00
|
|
|
<td colspan="2"><?php echo GetMessage('INFO_2') . " " . "<a href='". $api_host ."/admin/statuses' target=_blank>" . GetMessage('URL_1') . "</a>" . " " . 'RetailCRM.'; ?></td>
|
2013-08-07 14:45:25 +04:00
|
|
|
</tr>
|
|
|
|
<tr align="center">
|
|
|
|
<td colspan="2"><?php echo GetMessage('INFO_3'); ?></td>
|
|
|
|
</tr>
|
2013-07-08 15:08:14 +04:00
|
|
|
<tr class="heading">
|
|
|
|
<td colspan="2"><b><?php echo GetMessage('DELIVERY_TYPES_LIST'); ?></b></td>
|
|
|
|
</tr>
|
2013-08-15 18:49:08 +04:00
|
|
|
<tr class="heading">
|
|
|
|
<td width="50%" class="adm-detail-content-cell-l">
|
|
|
|
<label><input type="radio" name="delivery-types-export" value="true" checked> <?php echo GetMessage('DELIV_TYPES_EXPORT'); ?></label>
|
|
|
|
</td>
|
|
|
|
<td width="50%" class="adm-detail-content-cell-r">
|
|
|
|
<label><input type="radio" name="delivery-types-export" value="false"> <?php echo GetMessage('DELIV_TYPES_EXPORT_F'); ?></label>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2013-07-08 15:08:14 +04:00
|
|
|
<?php foreach($arResult['bitrixDeliveryTypesList'] as $bitrixDeliveryType): ?>
|
2013-08-15 18:49:08 +04:00
|
|
|
<tr class="delivery-types" style="display: none;">
|
2013-07-08 15:08:14 +04:00
|
|
|
<td width="50%" class="adm-detail-content-cell-l" name="<?php echo $bitrixDeliveryType['ID']; ?>">
|
2014-01-23 17:50:58 +04:00
|
|
|
<?php echo $bitrixDeliveryType['NAME']; ?>
|
2013-07-08 15:08:14 +04:00
|
|
|
</td>
|
|
|
|
<td width="50%" class="adm-detail-content-cell-r">
|
|
|
|
<select name="delivery-type-<?php echo $bitrixDeliveryType['ID']; ?>" class="typeselect">
|
2013-07-18 14:32:10 +04:00
|
|
|
<option value=""></option>
|
2013-07-05 18:19:42 +04:00
|
|
|
<?php foreach($arResult['deliveryTypesList'] as $deliveryType): ?>
|
2014-11-01 14:52:40 +03:00
|
|
|
<option value="<?php echo $deliveryType['code']; ?>"
|
2013-07-18 14:32:10 +04:00
|
|
|
<?php if($defaultDelivTypes[$bitrixDeliveryType['ID']] == $deliveryType['code']) echo 'selected'; ?>>
|
2013-07-08 15:08:14 +04:00
|
|
|
<?php echo $APPLICATION->ConvertCharset($deliveryType['name'], 'utf-8', SITE_CHARSET); ?>
|
|
|
|
</option>
|
2013-07-05 18:19:42 +04:00
|
|
|
<?php endforeach; ?>
|
|
|
|
</select>
|
2013-07-08 15:08:14 +04:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
<tr class="heading">
|
2021-04-19 15:38:09 +03:00
|
|
|
<td colspan="2"><b><?php echo GetMessage('PAYMENT_TYPES_LIST'); ?></b>
|
|
|
|
<p><small><?php echo GetMessage('INTEGRATION_PAYMENT_LIST');?></small></p></td>
|
2013-07-08 15:08:14 +04:00
|
|
|
</tr>
|
|
|
|
<?php foreach($arResult['bitrixPaymentTypesList'] as $bitrixPaymentType): ?>
|
|
|
|
<tr>
|
|
|
|
<td width="50%" class="adm-detail-content-cell-l" name="<?php echo $bitrixPaymentType['ID']; ?>">
|
|
|
|
<?php echo $bitrixPaymentType['NAME']; ?>
|
|
|
|
</td>
|
|
|
|
<td width="50%" class="adm-detail-content-cell-r">
|
|
|
|
<select name="payment-type-<?php echo $bitrixPaymentType['ID']; ?>" class="typeselect">
|
2013-07-18 14:32:10 +04:00
|
|
|
<option value=""></option>
|
2013-07-05 18:19:42 +04:00
|
|
|
<?php foreach($arResult['paymentTypesList'] as $paymentType): ?>
|
2014-11-01 14:52:40 +03:00
|
|
|
<option value="<?php echo $paymentType['code']; ?>"
|
2013-07-18 14:32:10 +04:00
|
|
|
<?php if($defaultPayTypes[$bitrixPaymentType['ID']] == $paymentType['code']) echo 'selected'; ?>>
|
2021-04-19 15:38:09 +03:00
|
|
|
<?php
|
|
|
|
$nameType = isset($paymentType['integrationModule']) ? $APPLICATION->ConvertCharset($paymentType['name'] . GetMessage('INTEGRATIONS'), 'utf-8', SITE_CHARSET) : $APPLICATION->ConvertCharset($paymentType['name'], 'utf-8', SITE_CHARSET);
|
|
|
|
echo $nameType;?>
|
2013-07-08 15:08:14 +04:00
|
|
|
</option>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
<tr class="heading">
|
|
|
|
<td colspan="2"><b><?php echo GetMessage('PAYMENT_STATUS_LIST'); ?></b></td>
|
|
|
|
</tr>
|
2020-11-23 17:54:39 +03:00
|
|
|
|
|
|
|
<? if (empty($arResult['bitrixStatusesList'])) :?>
|
|
|
|
<td colspan="2" class="option-head option-other-top option-other-bottom" style="text-align: center;">
|
|
|
|
<b><label><?echo GetMessage('STATUS_NOT_SETTINGS');?></label></b>
|
2016-09-15 16:42:10 +03:00
|
|
|
</td>
|
2020-11-23 17:54:39 +03:00
|
|
|
<?else:?>
|
|
|
|
<tr>
|
|
|
|
<td width="50%"></td>
|
|
|
|
<td width="50%">
|
|
|
|
<table width="100%">
|
|
|
|
<tr>
|
|
|
|
<td width="50%"></td>
|
|
|
|
<td width="50%" style="text-align: center;">
|
|
|
|
<?php echo GetMessage('CANCELED'); ?>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2021-09-08 10:19:29 +03:00
|
|
|
<?php endif;?>
|
2020-11-23 17:54:39 +03:00
|
|
|
|
2016-09-15 16:42:10 +03:00
|
|
|
<?php foreach($arResult['bitrixStatusesList'] as $bitrixStatus): ?>
|
|
|
|
<tr>
|
|
|
|
<td width="50%" class="adm-detail-content-cell-l" name="<?php echo $bitrixStatus['ID']; ?>">
|
|
|
|
<?php echo $bitrixStatus['NAME']; ?>
|
2013-07-08 15:08:14 +04:00
|
|
|
</td>
|
|
|
|
<td width="50%" class="adm-detail-content-cell-r">
|
2016-09-15 16:42:10 +03:00
|
|
|
<table width="100%">
|
|
|
|
<tr>
|
|
|
|
<td width="70%">
|
|
|
|
<select name="payment-status-<?php echo $bitrixStatus['ID']; ?>" class="typeselect">
|
|
|
|
<option value="" selected=""></option>
|
|
|
|
<?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): ?>
|
|
|
|
<?php if(isset($arResult['paymentList'][$payment])): ?>
|
|
|
|
<option value="<?php echo $arResult['paymentList'][$payment]['code']; ?>"
|
|
|
|
<?php if ($defaultPayStatuses[$bitrixStatus['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; ?>
|
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
<td width="30%">
|
|
|
|
<input name="order-cansel-<?php echo $bitrixStatus['ID']; ?>" value="Y" type="checkbox" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2013-07-08 15:08:14 +04:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
<tr class="heading">
|
|
|
|
<td colspan="2"><b><?php echo GetMessage('PAYMENT_LIST'); ?></b></td>
|
|
|
|
</tr>
|
|
|
|
<?php foreach($arResult['bitrixPaymentList'] as $bitrixPayment): ?>
|
|
|
|
<tr>
|
|
|
|
<td width="50%" class="adm-detail-content-cell-l" name="<?php echo $bitrixPayment['ID']; ?>">
|
|
|
|
<?php echo $bitrixPayment['NAME']; ?>
|
|
|
|
</td>
|
|
|
|
<td width="50%" class="adm-detail-content-cell-r">
|
|
|
|
<select name="payment-<?php echo $bitrixPayment['ID']; ?>" class="typeselect">
|
2013-07-18 14:32:10 +04:00
|
|
|
<option value=""></option>
|
2013-07-05 18:19:42 +04:00
|
|
|
<?php foreach($arResult['paymentStatusesList'] as $paymentStatus): ?>
|
2014-11-01 14:52:40 +03:00
|
|
|
<option value="<?php echo $paymentStatus['code']; ?>"
|
2013-07-18 14:32:10 +04:00
|
|
|
<?php if($defaultPayment[$bitrixPayment['ID']] == $paymentStatus['code']) echo 'selected'; ?>>
|
2013-07-08 15:08:14 +04:00
|
|
|
<?php echo $APPLICATION->ConvertCharset($paymentStatus['name'], 'utf-8', SITE_CHARSET); ?>
|
|
|
|
</option>
|
2013-07-05 18:19:42 +04:00
|
|
|
<?php endforeach; ?>
|
|
|
|
</select>
|
2013-07-08 15:08:14 +04:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
<tr class="heading">
|
|
|
|
<td colspan="2"><b><?php echo GetMessage('ORDER_TYPES_LIST'); ?></b></td>
|
|
|
|
</tr>
|
|
|
|
<?php foreach($arResult['bitrixOrderTypesList'] as $bitrixOrderType): ?>
|
|
|
|
<tr>
|
|
|
|
<td width="50%" class="adm-detail-content-cell-l" name="<?php echo $bitrixOrderType['ID']; ?>">
|
|
|
|
<?php echo $bitrixOrderType['NAME']; ?>
|
|
|
|
</td>
|
|
|
|
<td width="50%" class="adm-detail-content-cell-r">
|
|
|
|
<select name="order-type-<?php echo $bitrixOrderType['ID']; ?>" class="typeselect">
|
2013-07-18 14:32:10 +04:00
|
|
|
<option value=""></option>
|
2013-07-05 21:15:23 +04:00
|
|
|
<?php foreach($arResult['orderTypesList'] as $orderType): ?>
|
2014-11-01 14:52:40 +03:00
|
|
|
<option value="<?php echo $orderType['code']; ?>"
|
2013-07-18 14:32:10 +04:00
|
|
|
<?php if($defaultOrderTypes[$bitrixOrderType['ID']] == $orderType['code']) echo 'selected'; ?>>
|
2013-07-08 15:08:14 +04:00
|
|
|
<?php echo $APPLICATION->ConvertCharset($orderType['name'], 'utf-8', SITE_CHARSET); ?>
|
|
|
|
</option>
|
2013-07-05 21:15:23 +04:00
|
|
|
<?php endforeach; ?>
|
|
|
|
</select>
|
2013-07-08 15:08:14 +04:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2013-07-05 18:19:42 +04:00
|
|
|
<br />
|
2013-07-18 14:32:10 +04:00
|
|
|
<div style="padding: 1px 13px 2px; height:28px;">
|
|
|
|
<div align="right" style="float:right; width:50%; position:relative;">
|
|
|
|
<input type="submit" name="inst" value="<?php echo GetMessage("MOD_NEXT_STEP"); ?>" class="adm-btn-save">
|
|
|
|
</div>
|
|
|
|
<div align="left" style="float:right; width:50%; position:relative;">
|
|
|
|
<input type="submit" name="back" value="<?php echo GetMessage("MOD_PREV_STEP"); ?>" class="adm-btn-save">
|
|
|
|
</div>
|
|
|
|
</div>
|
2013-07-05 18:19:42 +04:00
|
|
|
</form>
|
2021-04-19 15:38:09 +03:00
|
|
|
</div>
|