diff --git a/intaro.intarocrm/install/index.php b/intaro.intarocrm/install/index.php
index 221b13b7..eac1604f 100755
--- a/intaro.intarocrm/install/index.php
+++ b/intaro.intarocrm/install/index.php
@@ -261,16 +261,10 @@ class intaro_intarocrm extends CModule {
);
//form delivery services ids arr
- $deliveryServicesArr = array();
if ($arDeliveryServicesList = $dbDeliveryServicesList->Fetch()) {
do {
//auto delivery types
$deliveryTypesArr[$arDeliveryServicesList['SID']] = htmlspecialchars(trim($_POST['delivery-type-' . $arDeliveryServicesList['SID']]));
- foreach($arDeliveryServicesList['PROFILES'] as $id => $profile) {
- if(!$profile['TITLE']) continue; // services without name ?
- $deliveryServicesArr[$arDeliveryServicesList['SID']][$id] = htmlspecialchars(trim($_POST['delivery-service-' . $arDeliveryServicesList['SID'] . '-' . $id]));
- }
- $arResult['bitrixDeliveryServicesList'][] = $arDeliveryServicesList;
} while ($arDeliveryServicesList = $dbDeliveryServicesList->Fetch());
}
@@ -325,7 +319,6 @@ class intaro_intarocrm extends CModule {
COption::SetOptionString($this->MODULE_ID, $this->CRM_ORDER_TYPES_ARR, serialize($orderTypesArr));
COption::SetOptionString($this->MODULE_ID, $this->CRM_DELIVERY_TYPES_ARR, serialize($deliveryTypesArr));
- COption::SetOptionString($this->MODULE_ID, $this->CRM_DELIVERY_TYPES_ARR, serialize($deliveryServicesArr));
COption::SetOptionString($this->MODULE_ID, $this->CRM_PAYMENT_TYPES, serialize($paymentTypesArr));
COption::SetOptionString($this->MODULE_ID, $this->CRM_PAYMENT_STATUSES, serialize($paymentStatusesArr));
COption::SetOptionString($this->MODULE_ID, $this->CRM_PAYMENT, serialize($paymentArr));
@@ -355,43 +348,6 @@ class intaro_intarocrm extends CModule {
$input['delivery-type-' . $bitrixDeliveryType['ID']] .= '';
}
- foreach ($arResult['bitrixDeliveryServicesList'] as $bitrixDeliveryService) {
- foreach($bitrixDeliveryService['PROFILES'] as $id => $profile) {
- if(!$profile['TITLE']) continue;
-
- $input['delivery-service-' . $bitrixDeliveryService['SID'] . '-' . $id] =
- '';
- }
- }
-
foreach ($arResult['bitrixPaymentTypesList'] as $bitrixPaymentType) {
$input['payment-type-' . $bitrixPaymentType['ID']] =
'';
}
+
+
$APPLICATION->RestartBuffer();
header('Content-Type: application/x-javascript; charset=' . LANG_CHARSET);
die(json_encode(array("success" => true, "result" => $input)));
@@ -593,7 +551,6 @@ class intaro_intarocrm extends CModule {
if ($arDeliveryServicesList = $dbDeliveryServicesList->Fetch()) {
do {
$arResult['bitrixDeliveryTypesList'][] = array('ID' => $arDeliveryServicesList['SID'], 'NAME' => $arDeliveryServicesList['NAME']);
- $arResult['bitrixDeliveryServicesList'][] = $arDeliveryServicesList;
} while ($arDeliveryServicesList = $dbDeliveryServicesList->Fetch());
}
@@ -699,7 +656,6 @@ class intaro_intarocrm extends CModule {
//form delivery types / services ids arr
$deliveryTypesArr = array();
- $deliveryServicesArr = array();
if (htmlspecialchars(trim($_POST['delivery-types-export'])) == 'false') {
if ($arDeliveryTypesList = $dbDeliveryTypesList->Fetch()) {
@@ -712,11 +668,6 @@ class intaro_intarocrm extends CModule {
do {
//auto delivery types
$deliveryTypesArr[$arDeliveryServicesList['SID']] = htmlspecialchars(trim($_POST['delivery-type-' . $arDeliveryServicesList['SID']]));
- foreach($arDeliveryServicesList['PROFILES'] as $id => $profile) {
- if(!$profile['TITLE']) continue; // services without name ?
- $deliveryServicesArr[$arDeliveryServicesList['SID']][$id] = htmlspecialchars(trim($_POST['delivery-service-' . $arDeliveryServicesList['SID'] . '-' . $id]));
- }
- $arResult['bitrixDeliveryServicesList'][] = $arDeliveryServicesList;
} while ($arDeliveryServicesList = $dbDeliveryServicesList->Fetch());
}
} elseif (htmlspecialchars(trim($_POST['delivery-types-export'])) == 'true') {
@@ -778,11 +729,10 @@ class intaro_intarocrm extends CModule {
}
foreach($arDeliveryServicesList['PROFILES'] as $id => $profile) {
- $deliveryServicesArr[$arDeliveryServicesList['SID']][$id] = $id;
// send to crm
$this->INTARO_CRM_API->deliveryServiceEdit(ICrmOrderActions::clearArr(array(
- 'code' => $id,
+ 'code' => $arDeliveryServicesList['SID'] . '-' . $id,
'name' => ICrmOrderActions::toJSON($profile['TITLE']),
'deliveryType' => $arDeliveryServicesList['SID']
)));
diff --git a/intaro.intarocrm/install/step2.php b/intaro.intarocrm/install/step2.php
index c8be2175..c3a83e72 100755
--- a/intaro.intarocrm/install/step2.php
+++ b/intaro.intarocrm/install/step2.php
@@ -94,15 +94,10 @@ $defaultPayment = array(
});
$('input[name="delivery-types-export"]').click(function() {
- if($(this).val() === 'true') {
+ if($(this).val() === 'true')
$('tr.delivery-types').hide('slow');
- $('tr[name="delivery-services"]').hide('slow');
- $('tr.delivery-services').hide('slow');
- } else if($(this).val() === 'false') {
+ else if($(this).val() === 'false')
$('tr.delivery-types').show('slow');
- $('tr[name="delivery-services"]').show('slow');
- $('tr.delivery-services').show('slow');
- }
});
});
@@ -161,34 +156,6 @@ $defaultPayment = array(
-
- |
-
-
- $profile): if(!$profile['TITLE']) continue; ?>
-
-
- [' . $bitrixDeliveryService['NAME'] . ']: ' . $profile['TITLE']; ?>
- |
-
-
- |
-
-
-
|
diff --git a/intaro.intarocrm/lang/ru/install/step2.php b/intaro.intarocrm/lang/ru/install/step2.php
index f54c607d..9a2caf28 100755
--- a/intaro.intarocrm/lang/ru/install/step2.php
+++ b/intaro.intarocrm/lang/ru/install/step2.php
@@ -3,7 +3,6 @@ $MESS ['STEP_NAME'] = 'Шаг 2';
$MESS ['MOD_NEXT_STEP'] = 'Следующий шаг';
$MESS ['MOD_PREV_STEP'] = 'Предыдущий шаг';
$MESS ['DELIVERY_TYPES_LIST'] = 'Способы доставки';
-$MESS ['DELIVERY_SERVICES_LIST'] = 'Автоматизированные службы доставок';
$MESS ['PAYMENT_TYPES_LIST'] = 'Способы оплаты';
$MESS ['PAYMENT_STATUS_LIST'] = 'Статусы';
$MESS ['ORDER_TYPES_LIST'] = 'Типы заказа';
diff --git a/intaro.intarocrm/lang/ru/options.php b/intaro.intarocrm/lang/ru/options.php
index 5b5be09f..442fccdb 100755
--- a/intaro.intarocrm/lang/ru/options.php
+++ b/intaro.intarocrm/lang/ru/options.php
@@ -52,6 +52,4 @@ $MESS ['HOUSE'] = 'Строение / корпус';
$MESS ['ADDRESS_SHORT'] = 'Краткий адрес';
$MESS ['ADDRESS_FULL'] = 'Детальный адрес';
-$MESS ['ORDER_TYPE_INFO'] = 'Тип заказа:';
-
-$MESS ['DELIVERY_SERVICES_LIST'] = 'Автоматизированные службы доставок';
\ No newline at end of file
+$MESS ['ORDER_TYPE_INFO'] = 'Тип заказа:';
\ No newline at end of file
diff --git a/intaro.intarocrm/options.php b/intaro.intarocrm/options.php
index 7b444d1d..8965a4ac 100755
--- a/intaro.intarocrm/options.php
+++ b/intaro.intarocrm/options.php
@@ -176,16 +176,10 @@ if (isset($_POST['Update']) && ($_POST['Update'] == 'Y')) {
);
//form delivery services ids arr
- $deliveryServicesArr = array();
if ($arDeliveryServicesList = $dbDeliveryServicesList->Fetch()) {
do {
//auto delivery types
$deliveryTypesArr[$arDeliveryServicesList['SID']] = htmlspecialchars(trim($_POST['delivery-type-' . $arDeliveryServicesList['SID']]));
- foreach($arDeliveryServicesList['PROFILES'] as $id => $profile) {
- if(!$profile['TITLE']) continue; // services without name ?
- $deliveryServicesArr[$arDeliveryServicesList['SID']][$id] = htmlspecialchars(trim($_POST['delivery-service-' . $arDeliveryServicesList['SID'] . '-' . $id]));
- }
- $arResult['bitrixDeliveryServicesList'][] = $arDeliveryServicesList;
} while ($arDeliveryServicesList = $dbDeliveryServicesList->Fetch());
}
@@ -269,7 +263,6 @@ if (isset($_POST['Update']) && ($_POST['Update'] == 'Y')) {
COption::SetOptionString($mid, $CRM_ORDER_TYPES_ARR, serialize($orderTypesArr));
COption::SetOptionString($mid, $CRM_DELIVERY_TYPES_ARR, serialize($deliveryTypesArr));
- COption::SetOptionString($mid, $CRM_DELIVERY_SERVICES_ARR, serialize($deliveryServicesArr));
COption::SetOptionString($mid, $CRM_PAYMENT_TYPES, serialize($paymentTypesArr));
COption::SetOptionString($mid, $CRM_PAYMENT_STATUSES, serialize($paymentStatusesArr));
COption::SetOptionString($mid, $CRM_PAYMENT, serialize($paymentArr));
@@ -357,7 +350,6 @@ if (isset($_POST['Update']) && ($_POST['Update'] == 'Y')) {
if ($arDeliveryServicesList = $dbDeliveryServicesList->Fetch()) {
do {
$arResult['bitrixDeliveryTypesList'][] = array('ID' => $arDeliveryServicesList['SID'], 'NAME' => $arDeliveryServicesList['NAME']);
- $arResult['bitrixDeliveryServicesList'][] = $arDeliveryServicesList;
} while ($arDeliveryServicesList = $dbDeliveryServicesList->Fetch());
}
@@ -414,7 +406,6 @@ if (isset($_POST['Update']) && ($_POST['Update'] == 'Y')) {
//saved cat params
$optionsOrderTypes = unserialize(COption::GetOptionString($mid, $CRM_ORDER_TYPES_ARR, 0));
$optionsDelivTypes = unserialize(COption::GetOptionString($mid, $CRM_DELIVERY_TYPES_ARR, 0));
- $optionsDelivServices = unserialize(COption::GetOptionString($mid, $CRM_DELIVERY_SERVICES_ARR, 0));
$optionsPayTypes = unserialize(COption::GetOptionString($mid, $CRM_PAYMENT_TYPES, 0));
$optionsPayStatuses = unserialize(COption::GetOptionString($mid, $CRM_PAYMENT_STATUSES, 0)); // --statuses
$optionsPayment = unserialize(COption::GetOptionString($mid, $CRM_PAYMENT, 0));
@@ -518,34 +509,6 @@ if (isset($_POST['Update']) && ($_POST['Update'] == 'Y')) {
-
- |
-
-
- $profile): if(!$profile['TITLE']) continue; ?>
-
-
- [' . $bitrixDeliveryService['NAME'] . ']: ' . $profile['TITLE']; ?>
- |
-
-
- |
-
-
-
|