+step in installer
This commit is contained in:
parent
edcadcd052
commit
6f97c22b54
File diff suppressed because it is too large
Load Diff
@ -2,168 +2,30 @@
|
||||
if (!check_bitrix_sessid())
|
||||
return;
|
||||
IncludeModuleLangFile(__FILE__);
|
||||
|
||||
$defaultOrderProps = array(
|
||||
'fio' => 'FIO',
|
||||
'index' => 'ZIP',
|
||||
'text' => 'ADDRESS',
|
||||
'phone' => 'PHONE',
|
||||
'email' => 'EMAIL'
|
||||
);
|
||||
|
||||
?>
|
||||
|
||||
<style type="text/css">
|
||||
.instal-load-block { /* */ }
|
||||
|
||||
.instal-load-label {
|
||||
color: #000;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.instal-progress-bar-outer {
|
||||
height: 32px;
|
||||
border:1px solid;
|
||||
border-color:#9ba6a8 #b1bbbe #bbc5c9 #b1bbbe;
|
||||
-webkit-box-shadow: 1px 1px 0 #fff, inset 0 2px 2px #c0cbce;
|
||||
box-shadow: 1px 1px 0 #fff, inset 0 2px 2px #c0cbce;
|
||||
background-color:#cdd8da;
|
||||
background-image:-webkit-linear-gradient(top, #cdd8da, #c3ced1);
|
||||
background-image:-moz-linear-gradient(top, #cdd8da, #c3ced1);
|
||||
background-image:-ms-linear-gradient(top, #cdd8da, #c3ced1);
|
||||
background-image:-o-linear-gradient(top, #cdd8da, #c3ced1);
|
||||
background-image:linear-gradient(top, #ced9db, #c3ced1);
|
||||
border-radius: 2px;
|
||||
text-align: center;
|
||||
color: #6a808e;
|
||||
text-shadow: 0 1px rgba(255,255,255,0.85);
|
||||
font-size: 18px;
|
||||
line-height: 35px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.instal-progress-bar-alignment {
|
||||
height: 28px;
|
||||
margin: 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.instal-progress-bar-inner {
|
||||
height: 28px;
|
||||
border-radius: 2px;
|
||||
border-top: solid 1px #52b9df;
|
||||
background-color:#2396ce;
|
||||
background-image:-webkit-linear-gradient(top, #27a8d7, #2396ce, #1c79c0);
|
||||
background-image:-moz-linear-gradient(top, #27a8d7, #2396ce, #1c79c0);
|
||||
background-image:-ms-linear-gradient(top, #27a8d7, #2396ce, #1c79c0);
|
||||
background-image:-o-linear-gradient(top, #27a8d7, #2396ce, #1c79c0);
|
||||
background-image:linear-gradient(top, #27a8d7, #2396ce, #1c79c0);
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
top: 1px;
|
||||
left:0;
|
||||
}
|
||||
|
||||
.instal-progress-bar-inner-text {
|
||||
color: #fff;
|
||||
text-shadow: 0 1px rgba(0,0,0,0.2);
|
||||
font-size: 18px;
|
||||
line-height: 32px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
left: -2px;
|
||||
top: -2px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript" src="/bitrix/js/main/jquery/jquery-1.7.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
var globStop = false;
|
||||
$('input[name="address-detail"]').change(function(){
|
||||
if(parseInt($(this).val()) === 1)
|
||||
$('tr.address-detail').show('slow');
|
||||
else if(parseInt($(this).val()) === 0)
|
||||
$('tr.address-detail').hide('slow');
|
||||
|
||||
$('#percent').width($('.instal-progress-bar-outer').width());
|
||||
|
||||
$(window).resize(function(){ // strechin progress bar
|
||||
$('#percent').width($('.instal-progress-bar-outer').width());
|
||||
});
|
||||
|
||||
// orderUpload function
|
||||
function orderUpload(finish) {
|
||||
if(globStop)
|
||||
return false;
|
||||
|
||||
if(finish == 1) {
|
||||
$('#status').text('<?php echo GetMessage("MESS_3"); ?>');
|
||||
BX.closeWait();
|
||||
$('input[name="inst"]').css('opacity', '1').removeAttr('disabled');
|
||||
$('input[name="stop"]').css('opacity', '0.5').attr('disabled', 'disabled');
|
||||
$('input[name="stop"]').attr('value', '<?php echo GetMessage("START_1"); ?>');
|
||||
return true; // exit from function, end recursion
|
||||
}
|
||||
|
||||
var handlerUrl = $(this).parents('form').attr('action');
|
||||
var step = $('input[name="continue"]').val();
|
||||
var id = $('input[name="id"]').val();
|
||||
var install = $('input[name="install"]').val();
|
||||
var sessid = BX.bitrix_sessid();
|
||||
|
||||
var data = 'install=' + install +'&step=' + step + '&sessid=' + sessid +
|
||||
'&id=' + id + '&ajax=1&finish=' + finish;
|
||||
|
||||
// ajax request
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: handlerUrl,
|
||||
data: data,
|
||||
dataType: 'json',
|
||||
success: function(response) {
|
||||
$('#indicator').css('width', response.percent + '%');
|
||||
$('#percent').html(response.percent + '%');
|
||||
$('#percent2').html(response.percent + '%');
|
||||
|
||||
orderUpload(response.finish); // wait until next response
|
||||
|
||||
},
|
||||
error: function () {
|
||||
BX.closeWait();
|
||||
$('input[name="inst"]').css('opacity', '1').removeAttr('disabled');
|
||||
$('input[name="stop"]').attr('name', 'start');
|
||||
$('input[name="stop"]').attr('value', '<?php echo GetMessage("START_3"); ?>');
|
||||
$('#status').text('<?php echo GetMessage('MESS_4'); ?>');
|
||||
globStop = true;
|
||||
|
||||
alert('<?php echo GetMessage('MESS_5'); ?>');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$('input[name="start"]').live('click', function() {
|
||||
BX.showWait();
|
||||
|
||||
$(this).attr('name', 'stop');
|
||||
$(this).attr('value', '<?php echo GetMessage("START_2"); ?>');
|
||||
$('#status').text('<?php echo GetMessage('MESS_2'); ?>');
|
||||
|
||||
if(globStop)
|
||||
globStop = false;
|
||||
|
||||
// hide next step button
|
||||
$('input[name="inst"]').css('opacity', '0.5').attr('disabled', 'disabled');
|
||||
|
||||
orderUpload(0);
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$('input[name="stop"]').live('click', function() {
|
||||
BX.closeWait();
|
||||
|
||||
// show next step button
|
||||
$('input[name="inst"]').css('opacity', '1').removeAttr('disabled');
|
||||
|
||||
$(this).attr('name', 'start');
|
||||
$(this).attr('value', '<?php echo GetMessage("START_3"); ?>');
|
||||
$('#status').text('<?php echo GetMessage('MESS_4'); ?>');
|
||||
globStop = true;
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<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 ?>">
|
||||
@ -171,33 +33,53 @@ IncludeModuleLangFile(__FILE__);
|
||||
<input type="hidden" name="install" value="Y">
|
||||
<input type="hidden" name="step" value="4">
|
||||
<input type="hidden" name="continue" value="3">
|
||||
<div class="adm-detail-content-item-block">
|
||||
<table class="adm-detail-content-table edit-table" id="edit1_edit_table">
|
||||
<tbody>
|
||||
<tr class="heading">
|
||||
<td colspan="2"><b><?php echo GetMessage('STEP_NAME'); ?></b></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="instal-load-block" id="result">
|
||||
<div class="instal-load-label" id="status"><?php echo GetMessage('MESS_1'); ?></div>
|
||||
<div class="instal-progress-bar-outer">
|
||||
<div class="instal-progress-bar-alignment" style="width: 100%;">
|
||||
<div class="instal-progress-bar-inner" id="indicator" style="width: 0%;">
|
||||
<div class="instal-progress-bar-inner-text" style="width: 100%;" id="percent">0%</div>
|
||||
</div>
|
||||
<span id="percent2">0%</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="adm-detail-content-table edit-table" id="edit1_edit_table">
|
||||
<tbody>
|
||||
<tr class="heading">
|
||||
<td colspan="2"><b><?php echo GetMessage('STEP_NAME'); ?></b></td>
|
||||
</tr>
|
||||
<tr class="heading">
|
||||
<td colspan="2"><b><?php echo GetMessage('ORDER_PROPS'); ?></b></td>
|
||||
</tr>
|
||||
<?php $countProps = 0;
|
||||
foreach ($arResult['orderProps'] as $orderProp): ?>
|
||||
<?php if ($orderProp['ID'] == 'text'): ?>
|
||||
<tr class="heading">
|
||||
<td colspan="2">
|
||||
<b>
|
||||
<label><input type="radio" name="address-detail" value="0" <?php if (count($defaultOrderProps) < 6) echo "checked"; ?>><?php echo GetMessage('ADDRESS_SHORT'); ?></label>
|
||||
<label><input type="radio" name="address-detail" value="1" <?php if (count($defaultOrderProps) > 5) echo "checked"; ?>><?php echo GetMessage('ADDRESS_FULL'); ?></label>
|
||||
</b>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<tr <?php if ($countProps > 5) echo 'class="address-detail"'; if (($countProps > 5) && (count($defaultOrderProps) < 6)) echo 'style="display:none;"'; ?>>
|
||||
<td width="50%" class="adm-detail-content-cell-l" name="<?php echo $orderProp['ID']; ?>">
|
||||
<?php echo $orderProp['NAME']; ?>
|
||||
</td>
|
||||
<td width="50%" class="adm-detail-content-cell-r">
|
||||
<select name="order-prop-<?php echo $orderProp['ID']; ?>" class="typeselect">
|
||||
<option value=""></option>
|
||||
<?php foreach ($arResult['arProp'] as $arProp): ?>
|
||||
<option value="<?php echo $arProp['CODE']; ?>" <?php if ($defaultOrderProps[$orderProp['ID']] == $arProp['CODE']) echo 'selected'; ?>>
|
||||
<?php echo $arProp['NAME']; ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $countProps++; endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<br />
|
||||
<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; visible: none;">
|
||||
<input type="submit" name="start" value="<?php echo GetMessage("START_1"); ?>" class="adm-btn-save">
|
||||
<input type="submit" name="start" value="<?php echo GetMessage("MOD_PREV_STEP"); ?>" class="adm-btn-save">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
@ -1,263 +1,203 @@
|
||||
<?php
|
||||
|
||||
if(!check_bitrix_sessid()) return;
|
||||
if (!check_bitrix_sessid())
|
||||
return;
|
||||
IncludeModuleLangFile(__FILE__);
|
||||
__IncludeLang(GetLangFileName($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/intaro.intarocrm/lang/", "/icml_export_setup.php"));
|
||||
?>
|
||||
<h3><?=GetMessage("EXPORT_CATALOGS_INFO");?></h3>
|
||||
<?php
|
||||
if(isset($arResult['errCode']) && $arResult['errCode'])
|
||||
echo CAdminMessage::ShowMessage(GetMessage($arResult['errCode']));
|
||||
global $oldValues;
|
||||
if (!empty($oldValues)) {
|
||||
$IBLOCK_EXPORT = $oldValues['IBLOCK_EXPORT'];
|
||||
$IBLOCK_PROPERTY_ARTICLE = $oldValues['IBLOCK_PROPERTY_ARTICLE'];
|
||||
$SETUP_FILE_NAME = $oldValues['SETUP_FILE_NAME'];
|
||||
$SETUP_PROFILE_NAME = $oldValues['SETUP_PROFILE_NAME'];
|
||||
}
|
||||
?>
|
||||
<form method="post" action="<?php echo $APPLICATION->GetCurPage(); ?>" >
|
||||
<font class="text"><?=GetMessage("EXPORT_CATALOGS");?><br><br></font>
|
||||
<?
|
||||
if (!isset($IBLOCK_EXPORT) || !is_array($IBLOCK_EXPORT))
|
||||
{
|
||||
$IBLOCK_EXPORT = array();
|
||||
|
||||
<style type="text/css">
|
||||
.instal-load-block { /* */ }
|
||||
|
||||
.instal-load-label {
|
||||
color: #000;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
$boolAll = false;
|
||||
$intCountChecked = 0;
|
||||
$intCountAvailIBlock = 0;
|
||||
$arIBlockList = array();
|
||||
$db_res = CIBlock::GetList(Array("IBLOCK_TYPE"=>"ASC", "NAME"=>"ASC"),array('CHECK_PERMISSIONS' => 'Y','MIN_PERMISSION' => 'W'));
|
||||
while ($res = $db_res->Fetch())
|
||||
{
|
||||
if ($arCatalog = CCatalog::GetByIDExt($res["ID"]))
|
||||
{
|
||||
if($arCatalog['CATALOG_TYPE'] == "D" || $arCatalog['CATALOG_TYPE'] == "X" || $arCatalog['CATALOG_TYPE'] == "P")
|
||||
{
|
||||
$arSiteList = array();
|
||||
$rsSites = CIBlock::GetSite($res["ID"]);
|
||||
while ($arSite = $rsSites->Fetch())
|
||||
{
|
||||
$arSiteList[] = $arSite["SITE_ID"];
|
||||
}
|
||||
$db_properties = CIBlock::GetProperties($res['ID'], Array());
|
||||
.instal-progress-bar-outer {
|
||||
height: 32px;
|
||||
border:1px solid;
|
||||
border-color:#9ba6a8 #b1bbbe #bbc5c9 #b1bbbe;
|
||||
-webkit-box-shadow: 1px 1px 0 #fff, inset 0 2px 2px #c0cbce;
|
||||
box-shadow: 1px 1px 0 #fff, inset 0 2px 2px #c0cbce;
|
||||
background-color:#cdd8da;
|
||||
background-image:-webkit-linear-gradient(top, #cdd8da, #c3ced1);
|
||||
background-image:-moz-linear-gradient(top, #cdd8da, #c3ced1);
|
||||
background-image:-ms-linear-gradient(top, #cdd8da, #c3ced1);
|
||||
background-image:-o-linear-gradient(top, #cdd8da, #c3ced1);
|
||||
background-image:linear-gradient(top, #ced9db, #c3ced1);
|
||||
border-radius: 2px;
|
||||
text-align: center;
|
||||
color: #6a808e;
|
||||
text-shadow: 0 1px rgba(255,255,255,0.85);
|
||||
font-size: 18px;
|
||||
line-height: 35px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
$properties = Array();
|
||||
while($prop = $db_properties->Fetch())
|
||||
$properties[] = $prop;
|
||||
.instal-progress-bar-alignment {
|
||||
height: 28px;
|
||||
margin: 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
if (count($IBLOCK_EXPORT) != 0)
|
||||
$boolExport = (in_array($res['ID'], $IBLOCK_EXPORT));
|
||||
else
|
||||
$boolExport = true;
|
||||
.instal-progress-bar-inner {
|
||||
height: 28px;
|
||||
border-radius: 2px;
|
||||
border-top: solid 1px #52b9df;
|
||||
background-color:#2396ce;
|
||||
background-image:-webkit-linear-gradient(top, #27a8d7, #2396ce, #1c79c0);
|
||||
background-image:-moz-linear-gradient(top, #27a8d7, #2396ce, #1c79c0);
|
||||
background-image:-ms-linear-gradient(top, #27a8d7, #2396ce, #1c79c0);
|
||||
background-image:-o-linear-gradient(top, #27a8d7, #2396ce, #1c79c0);
|
||||
background-image:linear-gradient(top, #27a8d7, #2396ce, #1c79c0);
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
top: 1px;
|
||||
left:0;
|
||||
}
|
||||
|
||||
$arIBlockList[] = array(
|
||||
'ID' => $res['ID'],
|
||||
'NAME' => $res['NAME'],
|
||||
'IBLOCK_TYPE_ID' => $res['IBLOCK_TYPE_ID'],
|
||||
'IBLOCK_EXPORT' => $boolExport,
|
||||
'PROPERTIES' => $properties,
|
||||
'OLD_PROPERTY_SELECT' => $IBLOCK_PROPERTY_ARTICLE[$res['ID']] != "" ? $IBLOCK_PROPERTY_ARTICLE[$res['ID']] : null,
|
||||
'SITE_LIST' => '('.implode(' ',$arSiteList).')',
|
||||
);
|
||||
.instal-progress-bar-inner-text {
|
||||
color: #fff;
|
||||
text-shadow: 0 1px rgba(0,0,0,0.2);
|
||||
font-size: 18px;
|
||||
line-height: 32px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
left: -2px;
|
||||
top: -2px;
|
||||
}
|
||||
</style>
|
||||
|
||||
if ($boolExport)
|
||||
$intCountChecked++;
|
||||
$intCountAvailIBlock++;
|
||||
}
|
||||
<script type="text/javascript" src="/bitrix/js/main/jquery/jquery-1.7.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
var globStop = false;
|
||||
|
||||
$('#percent').width($('.instal-progress-bar-outer').width());
|
||||
|
||||
$(window).resize(function(){ // strechin progress bar
|
||||
$('#percent').width($('.instal-progress-bar-outer').width());
|
||||
});
|
||||
|
||||
// orderUpload function
|
||||
function orderUpload(finish) {
|
||||
if(globStop)
|
||||
return false;
|
||||
|
||||
if(finish == 1) {
|
||||
$('#status').text('<?php echo GetMessage("MESS_3"); ?>');
|
||||
BX.closeWait();
|
||||
$('input[name="inst"]').css('opacity', '1').removeAttr('disabled');
|
||||
$('input[name="stop"]').css('opacity', '0.5').attr('disabled', 'disabled');
|
||||
$('input[name="stop"]').attr('value', '<?php echo GetMessage("START_1"); ?>');
|
||||
return true; // exit from function, end recursion
|
||||
}
|
||||
}
|
||||
if (count($IBLOCK_EXPORT) != 0) {
|
||||
if ($intCountChecked == $intCountAvailIBlock)
|
||||
$boolAll = true;
|
||||
} else {
|
||||
$intCountChecked = $intCountAvailIBlock;
|
||||
$boolAll = true;
|
||||
}
|
||||
|
||||
?>
|
||||
var handlerUrl = $(this).parents('form').attr('action');
|
||||
var step = $('input[name="continue"]').val();
|
||||
var id = $('input[name="id"]').val();
|
||||
var install = $('input[name="install"]').val();
|
||||
var sessid = BX.bitrix_sessid();
|
||||
|
||||
var data = 'install=' + install +'&step=' + step + '&sessid=' + sessid +
|
||||
'&id=' + id + '&ajax=1&finish=' + finish;
|
||||
|
||||
// ajax request
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: handlerUrl,
|
||||
data: data,
|
||||
dataType: 'json',
|
||||
success: function(response) {
|
||||
$('#indicator').css('width', response.percent + '%');
|
||||
$('#percent').html(response.percent + '%');
|
||||
$('#percent2').html(response.percent + '%');
|
||||
|
||||
<table class="adm-list-table" id="export_setup">
|
||||
<thead>
|
||||
<tr class="adm-list-table-header">
|
||||
<td class="adm-list-table-cell">
|
||||
<div class="adm-list-table-cell-inner"><?echo GetMessage("CATALOG");?></div>
|
||||
</td>
|
||||
<td class="adm-list-table-cell">
|
||||
<div class="adm-list-table-cell-inner">
|
||||
<?echo GetMessage("EXPORT2INTAROCML");?>
|
||||
</div>
|
||||
</td>
|
||||
<td class="adm-list-table-cell">
|
||||
<div class="adm-list-table-cell-inner"><?echo GetMessage("PROPERTY");?></div>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="adm-list-table-row">
|
||||
<td class="adm-list-table-cell">
|
||||
<?echo GetMessage("ALL_CATALOG");?>
|
||||
</td>
|
||||
<td class="adm-list-table-cell">
|
||||
<input style="vertical-align: middle;" type="checkbox" name="icml_export_all" id="icml_export_all" value="Y" onclick="checkAll(this,<? echo $intCountAvailIBlock; ?>);"<? echo ($boolAll ? ' checked' : ''); ?>>
|
||||
orderUpload(response.finish); // wait until next response
|
||||
|
||||
</td>
|
||||
<td class="adm-list-table-cell">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?
|
||||
foreach ($arIBlockList as $key => $arIBlock)
|
||||
{
|
||||
?>
|
||||
<tr class="adm-list-table-row">
|
||||
<td class="adm-list-table-cell" style="padding-left: 5em">
|
||||
<? echo htmlspecialcharsex("[".$arIBlock["IBLOCK_TYPE_ID"]."] ".$arIBlock["NAME"]." ".$arIBlock['SITE_LIST']); ?>
|
||||
</td>
|
||||
<td class="adm-list-table-cell">
|
||||
<font class="tablebodytext">
|
||||
<input
|
||||
type="checkbox"
|
||||
name="IBLOCK_EXPORT[<?=$arIBlock["ID"]?>]"
|
||||
id="IBLOCK_EXPORT<?=$arIBlock["ID"]?>"
|
||||
value="<?=$arIBlock["ID"]?>"
|
||||
<? if ($arIBlock['IBLOCK_EXPORT']) echo " checked"; ?>
|
||||
onclick="checkOne(this,<? echo $intCountAvailIBlock; ?>);"
|
||||
>
|
||||
</font>
|
||||
</td>
|
||||
<td class="adm-list-table-cell">
|
||||
<select
|
||||
style="width: 200px;"
|
||||
id="IBLOCK_PROPERTY_ARTICLE<?=$arIBlock["ID"]?>"
|
||||
name="IBLOCK_PROPERTY_ARTICLE[<?=$arIBlock["ID"]?>]"
|
||||
class="property-export">
|
||||
<option value=""></option>
|
||||
<?
|
||||
foreach ($arIBlock['PROPERTIES'] as $prop)
|
||||
{
|
||||
?>
|
||||
<option value="<?=$prop['CODE'] ?>"
|
||||
<?
|
||||
if ($arIBlock['OLD_PROPERTY_SELECT'] == $prop["CODE"]){
|
||||
echo " selected";
|
||||
} else {
|
||||
if ($prop["CODE"] == "ARTICLE" ||
|
||||
$prop["CODE"] == "ART" ||
|
||||
$prop["CODE"] == "ARTNUMBER" )
|
||||
echo " selected";
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
BX.closeWait();
|
||||
$('input[name="inst"]').css('opacity', '1').removeAttr('disabled');
|
||||
$('input[name="stop"]').attr('name', 'start');
|
||||
$('input[name="stop"]').attr('value', '<?php echo GetMessage("START_3"); ?>');
|
||||
$('#status').text('<?php echo GetMessage('MESS_4'); ?>');
|
||||
globStop = true;
|
||||
|
||||
alert('<?php echo GetMessage('MESS_5'); ?>');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
?>
|
||||
>
|
||||
<?=$prop["NAME"];?>
|
||||
</option>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<input type="hidden" name="count_checked" id="count_checked" value="<? echo $intCountChecked; ?>">
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
$('input[name="start"]').live('click', function() {
|
||||
BX.showWait();
|
||||
|
||||
<font class="text"><?=GetMessage("FILENAME");?><br><br></font>
|
||||
<input type="text" name="SETUP_FILE_NAME"
|
||||
value="<?=htmlspecialcharsbx(strlen($SETUP_FILE_NAME) > 0 ?
|
||||
$SETUP_FILE_NAME :
|
||||
(COption::GetOptionString(
|
||||
'catalog',
|
||||
'export_default_path',
|
||||
'/bitrix/catalog_export/'))
|
||||
.'intarocrm'/* .mt_rand(0, 999999) */.'.xml'
|
||||
); ?>" size="50">
|
||||
$(this).attr('name', 'stop');
|
||||
$(this).attr('value', '<?php echo GetMessage("START_2"); ?>');
|
||||
$('#status').text('<?php echo GetMessage('MESS_2'); ?>');
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
if(globStop)
|
||||
globStop = false;
|
||||
|
||||
<font class="text"><?=GetMessage("LOAD_PERIOD");?><br><br></font>
|
||||
<input type="radio" name="TYPE_LOADING" value="none" onclick="checkProfile(this);"><?=GetMessage("NOT_LOADING");?><Br>
|
||||
<input type="radio" name="TYPE_LOADING" value="cron" onclick="checkProfile(this);"><?=GetMessage("CRON_LOADING");?><Br>
|
||||
<input type="radio" name="TYPE_LOADING" value="agent" checked onclick="checkProfile(this);"><?=GetMessage("AGENT_LOADING");?><Br>
|
||||
<br>
|
||||
<br>
|
||||
<font class="text"><?=GetMessage("LOAD_NOW");?> </font>
|
||||
<input id="load-now" type="checkbox" name="LOAD_NOW" value="now" checked >
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
// hide next step button
|
||||
$('input[name="inst"]').css('opacity', '0.5').attr('disabled', 'disabled');
|
||||
|
||||
<div id="profile-field" >
|
||||
<font class="text"><?=GetMessage("PROFILE_NAME");?> </font>
|
||||
<input
|
||||
type="text"
|
||||
name="SETUP_PROFILE_NAME"
|
||||
value="<?= ($SETUP_PROFILE_NAME ? $SETUP_PROFILE_NAME: GetMessage("PROFILE_NAME_EXAMPLE"));?>"
|
||||
size="30">
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
</div>
|
||||
orderUpload(0);
|
||||
|
||||
<script type="text/javascript" src="/bitrix/js/main/jquery/jquery-1.7.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
function checkAll(obj,cnt)
|
||||
{
|
||||
var boolCheck = obj.checked;
|
||||
for (i = 0; i < cnt; i++)
|
||||
{
|
||||
BX('IBLOCK_EXPORT'+i).checked = boolCheck;
|
||||
}
|
||||
BX('count_checked').value = (boolCheck ? cnt : 0);
|
||||
};
|
||||
function checkOne(obj,cnt)
|
||||
{
|
||||
var boolCheck = obj.checked;
|
||||
var intCurrent = parseInt(BX('count_checked').value);
|
||||
intCurrent += (boolCheck ? 1 : -1);
|
||||
BX('icml_export_all').checked = (intCurrent < cnt ? false : true);
|
||||
BX('count_checked').value = intCurrent;
|
||||
if (!boolCheck)
|
||||
BX(obj.id.replace('IBLOCK_EXPORT','IBLOCK_PROPERTY_ARTICLE')).value = 'none';
|
||||
};
|
||||
function checkProfile(obj)
|
||||
{
|
||||
if (obj.value !== 'none')
|
||||
$('#profile-field').show();
|
||||
else
|
||||
$('#profile-field').hide();
|
||||
};
|
||||
</script>
|
||||
return false;
|
||||
});
|
||||
|
||||
$('input[name="stop"]').live('click', function() {
|
||||
BX.closeWait();
|
||||
|
||||
<?//Следующие переменные должны быть обязательно установлены?>
|
||||
<?=bitrix_sessid_post();?>
|
||||
// show next step button
|
||||
$('input[name="inst"]').css('opacity', '1').removeAttr('disabled');
|
||||
|
||||
<input type="hidden" name="lang" value="<?php echo LANG; ?>">
|
||||
$(this).attr('name', 'start');
|
||||
$(this).attr('value', '<?php echo GetMessage("START_3"); ?>');
|
||||
$('#status').text('<?php echo GetMessage('MESS_4'); ?>');
|
||||
globStop = true;
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<form action="<?php echo $APPLICATION->GetCurPage() ?>" method="POST">
|
||||
<?php echo bitrix_sessid_post(); ?>
|
||||
<input type="hidden" name="lang" value="<?php echo LANGUAGE_ID ?>">
|
||||
<input type="hidden" name="id" value="intaro.intarocrm">
|
||||
<input type="hidden" name="install" value="Y">
|
||||
<input type="hidden" name="step" value="5">
|
||||
<input type="hidden" name="continue" value="4">
|
||||
<div class="adm-detail-content-item-block">
|
||||
<table class="adm-detail-content-table edit-table" id="edit1_edit_table">
|
||||
<tbody>
|
||||
<tr class="heading">
|
||||
<td colspan="2"><b><?php echo GetMessage('STEP_NAME'); ?></b></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="instal-load-block" id="result">
|
||||
<div class="instal-load-label" id="status"><?php echo GetMessage('MESS_1'); ?></div>
|
||||
<div class="instal-progress-bar-outer">
|
||||
<div class="instal-progress-bar-alignment" style="width: 100%;">
|
||||
<div class="instal-progress-bar-inner" id="indicator" style="width: 0%;">
|
||||
<div class="instal-progress-bar-inner-text" style="width: 100%;" id="percent">0%</div>
|
||||
</div>
|
||||
<span id="percent2">0%</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<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 align="left" style="float:right; width:50%; position:relative; visible: none;">
|
||||
<input type="submit" name="start" value="<?php echo GetMessage("START_1"); ?>" class="adm-btn-save">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
|
@ -1,11 +1,263 @@
|
||||
<?php
|
||||
if(!check_bitrix_sessid()) return;
|
||||
echo CAdminMessage::ShowNote(GetMessage("MOD_INST_OK"));
|
||||
echo GetMessage("INTAROCRM_INFO"); ?>
|
||||
|
||||
<form action="<?php echo $APPLICATION->GetCurPage(); ?>">
|
||||
<input type="hidden" name="lang" value="<?php echo LANG; ?>">
|
||||
<input type="hidden" name="id" value="intaro.intarocrm">
|
||||
<input type="hidden" name="install" value="Y">
|
||||
<input type="submit" name="" value="<?php echo GetMessage("MOD_BACK"); ?>">
|
||||
<form>
|
||||
if(!check_bitrix_sessid()) return;
|
||||
IncludeModuleLangFile(__FILE__);
|
||||
__IncludeLang(GetLangFileName($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/intaro.intarocrm/lang/", "/icml_export_setup.php"));
|
||||
?>
|
||||
<h3><?=GetMessage("EXPORT_CATALOGS_INFO");?></h3>
|
||||
<?php
|
||||
if(isset($arResult['errCode']) && $arResult['errCode'])
|
||||
echo CAdminMessage::ShowMessage(GetMessage($arResult['errCode']));
|
||||
global $oldValues;
|
||||
if (!empty($oldValues)) {
|
||||
$IBLOCK_EXPORT = $oldValues['IBLOCK_EXPORT'];
|
||||
$IBLOCK_PROPERTY_ARTICLE = $oldValues['IBLOCK_PROPERTY_ARTICLE'];
|
||||
$SETUP_FILE_NAME = $oldValues['SETUP_FILE_NAME'];
|
||||
$SETUP_PROFILE_NAME = $oldValues['SETUP_PROFILE_NAME'];
|
||||
}
|
||||
?>
|
||||
<form method="post" action="<?php echo $APPLICATION->GetCurPage(); ?>" >
|
||||
<font class="text"><?=GetMessage("EXPORT_CATALOGS");?><br><br></font>
|
||||
<?
|
||||
if (!isset($IBLOCK_EXPORT) || !is_array($IBLOCK_EXPORT))
|
||||
{
|
||||
$IBLOCK_EXPORT = array();
|
||||
}
|
||||
|
||||
$boolAll = false;
|
||||
$intCountChecked = 0;
|
||||
$intCountAvailIBlock = 0;
|
||||
$arIBlockList = array();
|
||||
$db_res = CIBlock::GetList(Array("IBLOCK_TYPE"=>"ASC", "NAME"=>"ASC"),array('CHECK_PERMISSIONS' => 'Y','MIN_PERMISSION' => 'W'));
|
||||
while ($res = $db_res->Fetch())
|
||||
{
|
||||
if ($arCatalog = CCatalog::GetByIDExt($res["ID"]))
|
||||
{
|
||||
if($arCatalog['CATALOG_TYPE'] == "D" || $arCatalog['CATALOG_TYPE'] == "X" || $arCatalog['CATALOG_TYPE'] == "P")
|
||||
{
|
||||
$arSiteList = array();
|
||||
$rsSites = CIBlock::GetSite($res["ID"]);
|
||||
while ($arSite = $rsSites->Fetch())
|
||||
{
|
||||
$arSiteList[] = $arSite["SITE_ID"];
|
||||
}
|
||||
$db_properties = CIBlock::GetProperties($res['ID'], Array());
|
||||
|
||||
$properties = Array();
|
||||
while($prop = $db_properties->Fetch())
|
||||
$properties[] = $prop;
|
||||
|
||||
if (count($IBLOCK_EXPORT) != 0)
|
||||
$boolExport = (in_array($res['ID'], $IBLOCK_EXPORT));
|
||||
else
|
||||
$boolExport = true;
|
||||
|
||||
$arIBlockList[] = array(
|
||||
'ID' => $res['ID'],
|
||||
'NAME' => $res['NAME'],
|
||||
'IBLOCK_TYPE_ID' => $res['IBLOCK_TYPE_ID'],
|
||||
'IBLOCK_EXPORT' => $boolExport,
|
||||
'PROPERTIES' => $properties,
|
||||
'OLD_PROPERTY_SELECT' => $IBLOCK_PROPERTY_ARTICLE[$res['ID']] != "" ? $IBLOCK_PROPERTY_ARTICLE[$res['ID']] : null,
|
||||
'SITE_LIST' => '('.implode(' ',$arSiteList).')',
|
||||
);
|
||||
|
||||
if ($boolExport)
|
||||
$intCountChecked++;
|
||||
$intCountAvailIBlock++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (count($IBLOCK_EXPORT) != 0) {
|
||||
if ($intCountChecked == $intCountAvailIBlock)
|
||||
$boolAll = true;
|
||||
} else {
|
||||
$intCountChecked = $intCountAvailIBlock;
|
||||
$boolAll = true;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<table class="adm-list-table" id="export_setup">
|
||||
<thead>
|
||||
<tr class="adm-list-table-header">
|
||||
<td class="adm-list-table-cell">
|
||||
<div class="adm-list-table-cell-inner"><?echo GetMessage("CATALOG");?></div>
|
||||
</td>
|
||||
<td class="adm-list-table-cell">
|
||||
<div class="adm-list-table-cell-inner">
|
||||
<?echo GetMessage("EXPORT2INTAROCML");?>
|
||||
</div>
|
||||
</td>
|
||||
<td class="adm-list-table-cell">
|
||||
<div class="adm-list-table-cell-inner"><?echo GetMessage("PROPERTY");?></div>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="adm-list-table-row">
|
||||
<td class="adm-list-table-cell">
|
||||
<?echo GetMessage("ALL_CATALOG");?>
|
||||
</td>
|
||||
<td class="adm-list-table-cell">
|
||||
<input style="vertical-align: middle;" type="checkbox" name="icml_export_all" id="icml_export_all" value="Y" onclick="checkAll(this,<? echo $intCountAvailIBlock; ?>);"<? echo ($boolAll ? ' checked' : ''); ?>>
|
||||
|
||||
</td>
|
||||
<td class="adm-list-table-cell">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?
|
||||
foreach ($arIBlockList as $key => $arIBlock)
|
||||
{
|
||||
?>
|
||||
<tr class="adm-list-table-row">
|
||||
<td class="adm-list-table-cell" style="padding-left: 5em">
|
||||
<? echo htmlspecialcharsex("[".$arIBlock["IBLOCK_TYPE_ID"]."] ".$arIBlock["NAME"]." ".$arIBlock['SITE_LIST']); ?>
|
||||
</td>
|
||||
<td class="adm-list-table-cell">
|
||||
<font class="tablebodytext">
|
||||
<input
|
||||
type="checkbox"
|
||||
name="IBLOCK_EXPORT[<?=$arIBlock["ID"]?>]"
|
||||
id="IBLOCK_EXPORT<?=$arIBlock["ID"]?>"
|
||||
value="<?=$arIBlock["ID"]?>"
|
||||
<? if ($arIBlock['IBLOCK_EXPORT']) echo " checked"; ?>
|
||||
onclick="checkOne(this,<? echo $intCountAvailIBlock; ?>);"
|
||||
>
|
||||
</font>
|
||||
</td>
|
||||
<td class="adm-list-table-cell">
|
||||
<select
|
||||
style="width: 200px;"
|
||||
id="IBLOCK_PROPERTY_ARTICLE<?=$arIBlock["ID"]?>"
|
||||
name="IBLOCK_PROPERTY_ARTICLE[<?=$arIBlock["ID"]?>]"
|
||||
class="property-export">
|
||||
<option value=""></option>
|
||||
<?
|
||||
foreach ($arIBlock['PROPERTIES'] as $prop)
|
||||
{
|
||||
?>
|
||||
<option value="<?=$prop['CODE'] ?>"
|
||||
<?
|
||||
if ($arIBlock['OLD_PROPERTY_SELECT'] == $prop["CODE"]){
|
||||
echo " selected";
|
||||
} else {
|
||||
if ($prop["CODE"] == "ARTICLE" ||
|
||||
$prop["CODE"] == "ART" ||
|
||||
$prop["CODE"] == "ARTNUMBER" )
|
||||
echo " selected";
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
>
|
||||
<?=$prop["NAME"];?>
|
||||
</option>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<input type="hidden" name="count_checked" id="count_checked" value="<? echo $intCountChecked; ?>">
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<font class="text"><?=GetMessage("FILENAME");?><br><br></font>
|
||||
<input type="text" name="SETUP_FILE_NAME"
|
||||
value="<?=htmlspecialcharsbx(strlen($SETUP_FILE_NAME) > 0 ?
|
||||
$SETUP_FILE_NAME :
|
||||
(COption::GetOptionString(
|
||||
'catalog',
|
||||
'export_default_path',
|
||||
'/bitrix/catalog_export/'))
|
||||
.'intarocrm'/* .mt_rand(0, 999999) */.'.xml'
|
||||
); ?>" size="50">
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<font class="text"><?=GetMessage("LOAD_PERIOD");?><br><br></font>
|
||||
<input type="radio" name="TYPE_LOADING" value="none" onclick="checkProfile(this);"><?=GetMessage("NOT_LOADING");?><Br>
|
||||
<input type="radio" name="TYPE_LOADING" value="cron" onclick="checkProfile(this);"><?=GetMessage("CRON_LOADING");?><Br>
|
||||
<input type="radio" name="TYPE_LOADING" value="agent" checked onclick="checkProfile(this);"><?=GetMessage("AGENT_LOADING");?><Br>
|
||||
<br>
|
||||
<br>
|
||||
<font class="text"><?=GetMessage("LOAD_NOW");?> </font>
|
||||
<input id="load-now" type="checkbox" name="LOAD_NOW" value="now" checked >
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<div id="profile-field" >
|
||||
<font class="text"><?=GetMessage("PROFILE_NAME");?> </font>
|
||||
<input
|
||||
type="text"
|
||||
name="SETUP_PROFILE_NAME"
|
||||
value="<?= ($SETUP_PROFILE_NAME ? $SETUP_PROFILE_NAME: GetMessage("PROFILE_NAME_EXAMPLE"));?>"
|
||||
size="30">
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="/bitrix/js/main/jquery/jquery-1.7.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
function checkAll(obj,cnt)
|
||||
{
|
||||
var boolCheck = obj.checked;
|
||||
for (i = 0; i < cnt; i++)
|
||||
{
|
||||
BX('IBLOCK_EXPORT'+i).checked = boolCheck;
|
||||
}
|
||||
BX('count_checked').value = (boolCheck ? cnt : 0);
|
||||
};
|
||||
function checkOne(obj,cnt)
|
||||
{
|
||||
var boolCheck = obj.checked;
|
||||
var intCurrent = parseInt(BX('count_checked').value);
|
||||
intCurrent += (boolCheck ? 1 : -1);
|
||||
BX('icml_export_all').checked = (intCurrent < cnt ? false : true);
|
||||
BX('count_checked').value = intCurrent;
|
||||
if (!boolCheck)
|
||||
BX(obj.id.replace('IBLOCK_EXPORT','IBLOCK_PROPERTY_ARTICLE')).value = 'none';
|
||||
};
|
||||
function checkProfile(obj)
|
||||
{
|
||||
if (obj.value !== 'none')
|
||||
$('#profile-field').show();
|
||||
else
|
||||
$('#profile-field').hide();
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
<?//Следующие переменные должны быть обязательно установлены?>
|
||||
<?=bitrix_sessid_post();?>
|
||||
|
||||
<input type="hidden" name="lang" value="<?php echo LANG; ?>">
|
||||
<input type="hidden" name="id" value="intaro.intarocrm">
|
||||
<input type="hidden" name="install" value="Y">
|
||||
<input type="hidden" name="step" value="6">
|
||||
<input type="hidden" name="continue" value="5">
|
||||
<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>
|
||||
</form>
|
||||
|
||||
|
||||
|
11
intaro.intarocrm/install/step6.php
Normal file
11
intaro.intarocrm/install/step6.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
if(!check_bitrix_sessid()) return;
|
||||
echo CAdminMessage::ShowNote(GetMessage("MOD_INST_OK"));
|
||||
echo GetMessage("INTAROCRM_INFO"); ?>
|
||||
|
||||
<form action="<?php echo $APPLICATION->GetCurPage(); ?>">
|
||||
<input type="hidden" name="lang" value="<?php echo LANG; ?>">
|
||||
<input type="hidden" name="id" value="intaro.intarocrm">
|
||||
<input type="hidden" name="install" value="Y">
|
||||
<input type="submit" name="" value="<?php echo GetMessage("MOD_BACK"); ?>">
|
||||
<form>
|
@ -13,3 +13,22 @@ $MESS ['ERR_CATALOG'] = 'Отсутствует модуль catalog! Дальн
|
||||
$MESS ['INTAROCRM_CURL_ERR'] = 'Для работы модуля интеграции с IntaroCRM требуется PHP-расширение CURL.';
|
||||
$MESS ['ERR_ARTICLE_IBLOCK'] = 'Не установлены артикулы';
|
||||
$MESS ['DATE_TIMEZONE_ERR'] = 'Не указана временная зона в настройках php.';
|
||||
|
||||
$MESS ['ORDER_PROPS'] = 'Настройки соответствия полей заказа IntaroCRM свойствам заказа 1С-Битрикс';
|
||||
$MESS ['FIO'] = 'ф.И.О.';
|
||||
$MESS ['ZIP'] = 'Индекс';
|
||||
$MESS ['ADDRESS'] = 'Адрес (строкой)';
|
||||
$MESS ['PHONE'] = 'Телефон';
|
||||
$MESS ['EMAIL'] = 'E-mail';
|
||||
$MESS ['COUNTRY'] = 'Страна';
|
||||
$MESS ['REGION'] = 'Область / Край';
|
||||
$MESS ['CITY'] = 'Город';
|
||||
$MESS ['STREET'] = 'Улица';
|
||||
$MESS ['BUILDING'] = 'Строение';
|
||||
$MESS ['FLAT'] = 'Квартира';
|
||||
$MESS ['INTERCOMCODE'] = 'Домофон';
|
||||
$MESS ['FLOOR'] = 'Этаж';
|
||||
$MESS ['BLOCK'] = 'Подъезд';
|
||||
$MESS ['HOUSE'] = 'Строение / корпус';
|
||||
$MESS ['ADDRESS_SHORT'] = 'Краткий адрес';
|
||||
$MESS ['ADDRESS_FULL'] = 'Детальный адрес';
|
@ -10,3 +10,23 @@ $MESS ['START_1'] = 'Начать выгрузку';
|
||||
$MESS ['START_2'] = 'Приостановить выгрузку';
|
||||
$MESS ['START_3'] = 'Возобновить выгрузку';
|
||||
$MESS ['MOD_NEXT_STEP'] = 'Следующий шаг';
|
||||
$MESS ['MOD_PREV_STEP'] = 'Предыдущий шаг';
|
||||
|
||||
$MESS ['ORDER_PROPS'] = 'Настройки соответствия полей заказа IntaroCRM свойствам заказа 1С-Битрикс';
|
||||
$MESS ['FIO'] = 'ф.И.О.';
|
||||
$MESS ['ZIP'] = 'Индекс';
|
||||
$MESS ['ADDRESS'] = 'Адрес (строкой)';
|
||||
$MESS ['PHONE'] = 'Телефон';
|
||||
$MESS ['EMAIL'] = 'E-mail';
|
||||
$MESS ['COUNTRY'] = 'Страна';
|
||||
$MESS ['REGION'] = 'Область / Край';
|
||||
$MESS ['CITY'] = 'Город';
|
||||
$MESS ['STREET'] = 'Улица';
|
||||
$MESS ['BUILDING'] = 'Строение';
|
||||
$MESS ['FLAT'] = 'Квартира';
|
||||
$MESS ['INTERCOMCODE'] = 'Домофон';
|
||||
$MESS ['FLOOR'] = 'Этаж';
|
||||
$MESS ['BLOCK'] = 'Подъезд';
|
||||
$MESS ['HOUSE'] = 'Строение / корпус';
|
||||
$MESS ['ADDRESS_SHORT'] = 'Краткий адрес';
|
||||
$MESS ['ADDRESS_FULL'] = 'Детальный адрес';
|
32
intaro.intarocrm/lang/ru/install/step4.php
Executable file → Normal file
32
intaro.intarocrm/lang/ru/install/step4.php
Executable file → Normal file
@ -1,24 +1,12 @@
|
||||
<?php
|
||||
$MESS ['STEP_NAME'] = 'Шаг 4';
|
||||
$MESS ['MOD_NEXT_STEP'] = 'Завершить установку';
|
||||
$MESS ['MOD_PREV_STEP'] = 'Предыдущий шаг';
|
||||
$MESS ['DELIVERY_TYPES_LIST'] = 'Способы доставки';
|
||||
$MESS ['PAYMENT_TYPES_LIST'] = 'Способы оплаты';
|
||||
$MESS ['PAYMENT_STATUS_LIST'] = 'Статусы';
|
||||
$MESS ['ORDER_TYPES_LIST'] = 'Типы заказа';
|
||||
$MESS ['PAYMENT_LIST'] = 'Оплата';
|
||||
$MESS ['PAYMENT_Y'] = 'Оплачен';
|
||||
$MESS ['PAYMENT_N'] = 'Не оплачен';
|
||||
$MESS ['CANCELED'] = 'Флаг «Отменен»';
|
||||
$MESS ['INFO_1'] = ' Задайте соответствие между справочниками 1C-Битрикс и справочниками IntaroCRM.';
|
||||
$MESS ['LOAD_PERIOD'] = 'Выгружать каталог периодически';
|
||||
$MESS ['NOT_LOADING'] = 'Нет';
|
||||
$MESS ['CRON_LOADING'] = 'С помощью CRON каждые 24 часа';
|
||||
$MESS ['AGENT_LOADING'] = 'Агентом каждые 24 часа (по умолчанию)';
|
||||
$MESS ['LOAD_NOW'] = 'Выгрузить сейчас';
|
||||
$MESS ['PROFILE_NAME'] = 'Имя профиля:';
|
||||
$MESS ['PROFILE_NAME_EXAMPLE'] = 'Выгрузка каталога IntaroCRM';
|
||||
$MESS ['ERR_FIELDS_PROFILE'] = 'Неверно заполнено поле имени профиля';
|
||||
$MESS ['ERR_FIELDS_IBLOCK'] = 'Не выбрано ни одного информационного блока';
|
||||
$MESS ['ERR_FIELDS_ARTICLE'] = 'Не выбраны артикулы';
|
||||
$MESS ['ERR_FIELDS_FILE'] = 'Не указано имя файла';
|
||||
$MESS ['MESS_1'] = 'На данном шаге вы можете выгрузить ранее оформленные заказы в IntaroCRM. Для запуска выгрузки нажмите кнопку «Начать выгрузку».';
|
||||
$MESS ['MESS_2'] = 'Экспорт...';
|
||||
$MESS ['MESS_3'] = 'Экспорт заказов успешно завершён.';
|
||||
$MESS ['MESS_4'] = 'Экспорт заказов приостановлен.';
|
||||
$MESS ['MESS_5'] = 'Произошла ошибка сервера, обратитесь в Интаро Софт.';
|
||||
$MESS ['STOP'] = 'Приостановить выгрузку';
|
||||
$MESS ['START_1'] = 'Начать выгрузку';
|
||||
$MESS ['START_2'] = 'Приостановить выгрузку';
|
||||
$MESS ['START_3'] = 'Возобновить выгрузку';
|
||||
$MESS ['MOD_NEXT_STEP'] = 'Следующий шаг';
|
@ -1,18 +1,24 @@
|
||||
<?php
|
||||
$MESS ['INTAROCRM_INFO'] = '
|
||||
<h2>Дальнейшие действия<h2>
|
||||
<p>
|
||||
Если вы произвели выгрузку заказов на шаге 3, то эти заказы уже доступны в вашей CRM и
|
||||
через некоторое время по этим заказам будет подготовлены аналитические отчеты в Панели KPI.
|
||||
</p>
|
||||
<p>
|
||||
Новые заказы будут отправляться агентом <span style="font-family: Courier New;">ICrmOrderActions::uploadOrdersAgent();</span>
|
||||
в IntaroCRM каждые 10 минут (интервал можно изменить в разделе <a href="/bitrix/admin/agent_list.php">Агенты</a>).
|
||||
</p>
|
||||
<p>
|
||||
Если вы выбрали опцию «Выгрузить каталог сейчас» на шаге 4, то ваш каталог уже загружается в IntaroCRM.
|
||||
Загрузка длится, как правило, не более 10 минут. Если вы не выбирали эту опцию, то генерацию файла с каталогом
|
||||
можно произвести экспортом «IntaroCRM» в разделе Магазин > Настройки > <a href="/bitrix/admin/cat_export_setup.php">Экспорт данных</a>.
|
||||
IntaroCRM проверяет и загружает данный файл с каталогом каждые 3 часа.
|
||||
</p>
|
||||
';
|
||||
$MESS ['STEP_NAME'] = 'Шаг 5';
|
||||
$MESS ['MOD_NEXT_STEP'] = 'Завершить установку';
|
||||
$MESS ['MOD_PREV_STEP'] = 'Предыдущий шаг';
|
||||
$MESS ['DELIVERY_TYPES_LIST'] = 'Способы доставки';
|
||||
$MESS ['PAYMENT_TYPES_LIST'] = 'Способы оплаты';
|
||||
$MESS ['PAYMENT_STATUS_LIST'] = 'Статусы';
|
||||
$MESS ['ORDER_TYPES_LIST'] = 'Типы заказа';
|
||||
$MESS ['PAYMENT_LIST'] = 'Оплата';
|
||||
$MESS ['PAYMENT_Y'] = 'Оплачен';
|
||||
$MESS ['PAYMENT_N'] = 'Не оплачен';
|
||||
$MESS ['CANCELED'] = 'Флаг «Отменен»';
|
||||
$MESS ['INFO_1'] = ' Задайте соответствие между справочниками 1C-Битрикс и справочниками IntaroCRM.';
|
||||
$MESS ['LOAD_PERIOD'] = 'Выгружать каталог периодически';
|
||||
$MESS ['NOT_LOADING'] = 'Нет';
|
||||
$MESS ['CRON_LOADING'] = 'С помощью CRON каждые 24 часа';
|
||||
$MESS ['AGENT_LOADING'] = 'Агентом каждые 24 часа (по умолчанию)';
|
||||
$MESS ['LOAD_NOW'] = 'Выгрузить сейчас';
|
||||
$MESS ['PROFILE_NAME'] = 'Имя профиля:';
|
||||
$MESS ['PROFILE_NAME_EXAMPLE'] = 'Выгрузка каталога IntaroCRM';
|
||||
$MESS ['ERR_FIELDS_PROFILE'] = 'Неверно заполнено поле имени профиля';
|
||||
$MESS ['ERR_FIELDS_IBLOCK'] = 'Не выбрано ни одного информационного блока';
|
||||
$MESS ['ERR_FIELDS_ARTICLE'] = 'Не выбраны артикулы';
|
||||
$MESS ['ERR_FIELDS_FILE'] = 'Не указано имя файла';
|
18
intaro.intarocrm/lang/ru/install/step6.php
Executable file
18
intaro.intarocrm/lang/ru/install/step6.php
Executable file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
$MESS ['INTAROCRM_INFO'] = '
|
||||
<h2>Дальнейшие действия<h2>
|
||||
<p>
|
||||
Если вы произвели выгрузку заказов на шаге 3, то эти заказы уже доступны в вашей CRM и
|
||||
через некоторое время по этим заказам будет подготовлены аналитические отчеты в Панели KPI.
|
||||
</p>
|
||||
<p>
|
||||
Новые заказы будут отправляться агентом <span style="font-family: Courier New;">ICrmOrderActions::uploadOrdersAgent();</span>
|
||||
в IntaroCRM каждые 10 минут (интервал можно изменить в разделе <a href="/bitrix/admin/agent_list.php">Агенты</a>).
|
||||
</p>
|
||||
<p>
|
||||
Если вы выбрали опцию «Выгрузить каталог сейчас» на шаге 4, то ваш каталог уже загружается в IntaroCRM.
|
||||
Загрузка длится, как правило, не более 10 минут. Если вы не выбирали эту опцию, то генерацию файла с каталогом
|
||||
можно произвести экспортом «IntaroCRM» в разделе Магазин > Настройки > <a href="/bitrix/admin/cat_export_setup.php">Экспорт данных</a>.
|
||||
IntaroCRM проверяет и загружает данный файл с каталогом каждые 3 часа.
|
||||
</p>
|
||||
';
|
@ -26,37 +26,77 @@ if($_GET['ok'] && $_GET['ok'] == 'Y') echo CAdminMessage::ShowNote(GetMessage('I
|
||||
|
||||
$arResult = array();
|
||||
|
||||
$arResult['orderProps'][0]['NAME'] = GetMessage('FIO');
|
||||
$arResult['orderProps'][0]['ID'] = 'fio';
|
||||
$arResult['orderProps'][1]['NAME'] = GetMessage('ZIP');
|
||||
$arResult['orderProps'][1]['ID'] = 'index';
|
||||
$arResult['orderProps'][2]['NAME'] = GetMessage('PHONE');
|
||||
$arResult['orderProps'][2]['ID'] = 'phone';
|
||||
$arResult['orderProps'][3]['NAME'] = GetMessage('EMAIL');
|
||||
$arResult['orderProps'][3]['ID'] = 'email';
|
||||
// address
|
||||
$arResult['orderProps'][4]['NAME'] = GetMessage('ADDRESS');
|
||||
$arResult['orderProps'][4]['ID'] = 'text';
|
||||
//$arResult['orderProps'][5]['NAME'] = GetMessage('COUNTRY');
|
||||
//$arResult['orderProps'][5]['ID'] = 'country';
|
||||
//$arResult['orderProps'][6]['NAME'] = GetMessage('REGION');
|
||||
//$arResult['orderProps'][6]['ID'] = 'region';
|
||||
//$arResult['orderProps'][7]['NAME'] = GetMessage('CITY');
|
||||
//$arResult['orderProps'][7]['ID'] = 'city';
|
||||
$arResult['orderProps'][8]['NAME'] = GetMessage('STREET');
|
||||
$arResult['orderProps'][8]['ID'] = 'street';
|
||||
$arResult['orderProps'][9]['NAME'] = GetMessage('BUILDING');
|
||||
$arResult['orderProps'][9]['ID'] = 'building';
|
||||
$arResult['orderProps'][10]['NAME'] = GetMessage('FLAT');
|
||||
$arResult['orderProps'][10]['ID'] = 'flat';
|
||||
$arResult['orderProps'][11]['NAME'] = GetMessage('INTERCOMCODE');
|
||||
$arResult['orderProps'][11]['ID'] = 'intercomecode';
|
||||
$arResult['orderProps'][12]['NAME'] = GetMessage('FLOOR');
|
||||
$arResult['orderProps'][12]['ID'] = 'floor';
|
||||
$arResult['orderProps'][13]['NAME'] = GetMessage('BLOCK');
|
||||
$arResult['orderProps'][13]['ID'] = 'block';
|
||||
$arResult['orderProps'][14]['NAME'] = GetMessage('HOUSE');
|
||||
$arResult['orderProps'][14]['ID'] = 'house';
|
||||
$arResult['orderProps'] = array(
|
||||
array(
|
||||
'NAME' => GetMessage('FIO'),
|
||||
'ID' => 'fio'
|
||||
),
|
||||
array(
|
||||
'NAME' => GetMessage('ZIP'),
|
||||
'ID' => 'index'
|
||||
),
|
||||
array(
|
||||
'NAME' => GetMessage('PHONE'),
|
||||
'ID' => 'phone'
|
||||
),
|
||||
array(
|
||||
'NAME' => GetMessage('EMAIL'),
|
||||
'ID' => 'email'
|
||||
),
|
||||
array(
|
||||
'NAME' => GetMessage('ZIP'),
|
||||
'ID' => 'index'
|
||||
),
|
||||
array(
|
||||
'NAME' => GetMessage('ADDRESS'),
|
||||
'ID' => 'text'
|
||||
),
|
||||
// address
|
||||
/* array(
|
||||
'NAME' => GetMessage('COUNTRY'),
|
||||
'ID' => 'country'
|
||||
),
|
||||
array(
|
||||
'NAME' => GetMessage('REGION'),
|
||||
'ID' => 'region'
|
||||
),
|
||||
array(
|
||||
'NAME' => GetMessage('CITY'),
|
||||
'ID' => 'city'
|
||||
),*/
|
||||
array(
|
||||
'NAME' => GetMessage('ZIP'),
|
||||
'ID' => 'index'
|
||||
),
|
||||
array(
|
||||
'NAME' => GetMessage('STREET'),
|
||||
'ID' => 'street'
|
||||
),
|
||||
array(
|
||||
'NAME' => GetMessage('BUILDING'),
|
||||
'ID' => 'building'
|
||||
),
|
||||
array(
|
||||
'NAME' => GetMessage('FLAT'),
|
||||
'ID' => 'flat'
|
||||
),
|
||||
array(
|
||||
'NAME' => GetMessage('INTERCOMECODE'),
|
||||
'ID' => 'intercomecode'
|
||||
),
|
||||
array(
|
||||
'NAME' => GetMessage('FLOOR'),
|
||||
'ID' => 'floor'
|
||||
),
|
||||
array(
|
||||
'NAME' => GetMessage('BLOCK'),
|
||||
'ID' => 'block'
|
||||
),
|
||||
array(
|
||||
'NAME' => GetMessage('HOUSE'),
|
||||
'ID' => 'house'
|
||||
)
|
||||
);
|
||||
|
||||
//update connection settings
|
||||
if (isset($_POST['Update']) && ($_POST['Update'] == 'Y')) {
|
||||
@ -175,7 +215,7 @@ if (isset($_POST['Update']) && ($_POST['Update'] == 'Y')) {
|
||||
$propsCount = 0;
|
||||
$orderPropsArr = array();
|
||||
foreach($arResult['orderProps'] as $orderProp) {
|
||||
if((!(int) htmlspecialchars(trim($_POST['address-detail']))) && $propsCount > 4)
|
||||
if((!(int) htmlspecialchars(trim($_POST['address-detail']))) && $propsCount > 5)
|
||||
break;
|
||||
$orderPropsArr[$orderProp['ID']] = htmlspecialchars(trim($_POST['order-prop-' . $orderProp['ID']]));
|
||||
$propsCount++;
|
||||
@ -501,7 +541,7 @@ if (isset($_POST['Update']) && ($_POST['Update'] == 'Y')) {
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<tr <?php if ($countProps > 4) echo 'class="address-detail"'; if(($countProps > 4) && (count($optionsOrderProps) < 6)) echo 'style="display:none;"';?>>
|
||||
<tr <?php if ($countProps > 5) echo 'class="address-detail"'; if(($countProps > 5) && (count($optionsOrderProps) < 6)) echo 'style="display:none;"';?>>
|
||||
<td width="50%" class="adm-detail-content-cell-l" name="<?php echo $orderProp['ID']; ?>">
|
||||
<?php echo $orderProp['NAME']; ?>
|
||||
</td>
|
||||
|
Loading…
Reference in New Issue
Block a user