diff --git a/intaro.intarocrm/lang/ru/icml_export_setup.php b/intaro.intarocrm/lang/ru/icml_export_setup.php index 7dc07010..22becf48 100644 --- a/intaro.intarocrm/lang/ru/icml_export_setup.php +++ b/intaro.intarocrm/lang/ru/icml_export_setup.php @@ -23,6 +23,20 @@ $MESS["PROPERTY_OFFER_HEADER_NAME"] = "Свойство торгового пр $MESS["PROPERTY_ARTICLE_HEADER_NAME"] = "Артикул"; $MESS["PROPERTY_MANUFACTURER_HEADER_NAME"] = "Производитель"; $MESS["PROPERTY_COLOR_HEADER_NAME"] = "Цвет"; -$MESS["PROPERTY_WEIGHT_HEADER_NAME"] = "Вес"; +$MESS["PROPERTY_WEIGHT_HEADER_NAME"] = "Вес (габариты)"; +$MESS["PROPERTY_LENGTH_HEADER_NAME"] = "Длина (габариты)"; +$MESS["PROPERTY_WIDTH_HEADER_NAME"] = "Ширина (габариты)"; +$MESS["PROPERTY_HEIGHT_HEADER_NAME"] = "Высота (габариты)"; $MESS["PROPERTY_SIZE_HEADER_NAME"] = "Размер"; -?> \ No newline at end of file +$MESS["SELECT_FIELD_NAME"] = "Поле"; +$MESS["SELECT_PROPERTY_NAME"] = "Свойства"; +$MESS["SELECT_WEIGHT_PROPERTY_NAME"] = "Вec (грамм)"; +$MESS["SELECT_LENGTH_PROPERTY_NAME"] = "Длина (мм.)"; +$MESS["SELECT_WIDTH_PROPERTY_NAME"] = "Ширина (мм.)"; +$MESS["SELECT_HEIGHT_PROPERTY_NAME"] = "Высота (мм.)"; +$MESS["UNIT_MEASUREMENT_MM"] = "мм."; +$MESS["UNIT_MEASUREMENT_CM"] = "см."; +$MESS["UNIT_MEASUREMENT_M"] = "м."; +$MESS["UNIT_MEASUREMENT_MG"] = "мг."; +$MESS["UNIT_MEASUREMENT_G"] = "г."; +$MESS["UNIT_MEASUREMENT_KG"] = "кг."; \ No newline at end of file diff --git a/intaro.intarocrm/lang/ru/options.php b/intaro.intarocrm/lang/ru/options.php index 0eed5b14..dfb341ba 100755 --- a/intaro.intarocrm/lang/ru/options.php +++ b/intaro.intarocrm/lang/ru/options.php @@ -50,4 +50,10 @@ $MESS ['FLOOR'] = 'Этаж'; $MESS ['BLOCK'] = 'Подъезд'; $MESS ['HOUSE'] = 'Строение / корпус'; $MESS ['ADDRESS_SHORT'] = 'Краткий адрес'; -$MESS ['ADDRESS_FULL'] = 'Детальный адрес'; \ No newline at end of file +$MESS ['ADDRESS_FULL'] = 'Детальный адрес'; + +$MESS ['UPDATE_DELIVERY_SERVICES'] = 'Выгрузка служб доставок'; + +$MESS ['MESS_1'] = 'Произошла ошибка при выгрузке одной или нескольких служб доставок, попробуйте еще раз. Если проблема повторилась, обратитесь в Интаро Софт.'; +$MESS ['MESS_2'] = 'Произошла ошибка сервера, обратитесь в Интаро Софт.'; + diff --git a/intaro.intarocrm/options.php b/intaro.intarocrm/options.php index fcc7a5a8..44708b42 100755 --- a/intaro.intarocrm/options.php +++ b/intaro.intarocrm/options.php @@ -101,6 +101,8 @@ if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && (strtolower($_SERVER['HTTP_X_RE $api = new IntaroCrm\RestApi($api_host, $api_key); + $api->paymentStatusesList(); + //check connection & apiKey valid if ((int) $api->getStatusCode() != 200) { $APPLICATION->RestartBuffer(); @@ -125,24 +127,24 @@ if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && (strtolower($_SERVER['HTTP_X_RE do { if(!$optionsDelivTypes[$arDeliveryServicesList['SID']]) { - self::eventLog('options.php', 'No delivery type relations established', $arDeliveryServicesList['SID'] . ':' . $id); + ICrmOrderActions::eventLog('options.php', 'No delivery type relations established', $arDeliveryServicesList['SID'] . ':' . $id); continue; } foreach($arDeliveryServicesList['PROFILES'] as $id => $profile) { // send to crm - $this->INTARO_CRM_API->deliveryServiceEdit(ICrmOrderActions::clearArr(array( + $api->deliveryServiceEdit(ICrmOrderActions::clearArr(array( 'code' => $arDeliveryServicesList['SID'] . '-' . $id, 'name' => ICrmOrderActions::toJSON($profile['TITLE']), 'deliveryType' => $arDeliveryServicesList['SID'] ))); // error pushing dt - if ($this->INTARO_CRM_API->getStatusCode() != 200) { - if ($this->INTARO_CRM_API->getStatusCode() != 201) { + if ($api->getStatusCode() != 200) { + if ($api->getStatusCode() != 201) { //handle err - self::eventLog('options.php', 'IntaroCrm\RestApi::deliveryServiceEdit', $this->INTARO_CRM_API->getLastError()); + ICrmOrderActions::eventLog('options.php', 'IntaroCrm\RestApi::deliveryServiceEdit', $api->getLastError()); } } } @@ -518,10 +520,42 @@ if (isset($_POST['Update']) && ($_POST['Update'] == 'Y')) { $('tr.address-detail-' + orderType).hide('slow'); }); }); + + $('input[name="update-delivery-services"]').live('click', function() { + BX.showWait(); + var updButton = this; + // hide next step button + $(updButton).css('opacity', '0.5').attr('disabled', 'disabled'); + + var handlerUrl = $(this).parents('form').attr('action'); + var data = 'ajax=1'; + + $.ajax({ + type: 'POST', + url: handlerUrl, + data: data, + dataType: 'json', + success: function(response) { + BX.closeWait(); + $(updButton).css('opacity', '1').removeAttr('disabled'); + + if(!response.success) + alert(''); + }, + error: function () { + BX.closeWait(); + $(updButton).css('opacity', '1').removeAttr('disabled'); + + alert(''); + } + }); + + return false; + });
-BeginNextTab(); ?> @@ -572,6 +606,11 @@ if (isset($_POST['Update']) && ($_POST['Update'] == 'Y')) { + + + + +