Merge branch 'master' of https://github.com/merelendor/evoleasing-site
This commit is contained in:
commit
0281bc479e
428
api/index.php
428
api/index.php
@ -80,6 +80,16 @@ use Bitrix\Main\Context,
|
||||
Bitrix\Main\Loader,
|
||||
Bitrix\Iblock;
|
||||
|
||||
function checkRequestIsLocal()
|
||||
{
|
||||
if(strpos($_SERVER['HTTP_X_FORWARDED_FOR'], SELF_IP) > -1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if($_SERVER['REMOTE_USER'] && strpos($_SERVER['REMOTE_USER'], "Bearer") > -1)
|
||||
{
|
||||
$token = str_replace("Bearer ", "", $_SERVER['REMOTE_USER']);
|
||||
@ -298,6 +308,9 @@ switch($PARAM_1)
|
||||
if(CModule::IncludeModule('iblock'))
|
||||
{
|
||||
$filter = [ "ACTIVE" => "Y", "IBLOCK_ID" => 1 ];
|
||||
|
||||
if(!empty($REQ['PROGRAM'])) { $filter['PROPERTY_LEASING_PROGRAMS'] = $REQ['PROGRAM']; }
|
||||
|
||||
if(!empty($REQ['BRAND_ID'])) { $filter["PROPERTY_BRAND"] = $REQ['BRAND_ID']; }
|
||||
if(!empty($REQ['MODEL_ID'])) { $filter["PROPERTY_MODEL"] = $REQ['MODEL_ID']; }
|
||||
if(!empty($REQ['MODIFICATION'])) { $filter["PROPERTY_MODIFICATION"] = $REQ['MODIFICATION']; }
|
||||
@ -422,6 +435,7 @@ switch($PARAM_1)
|
||||
sort($ENGINE_POWER);
|
||||
sort($ENGINE_VOLUME);
|
||||
|
||||
sort($BODY);
|
||||
print json_encode([
|
||||
"bodies" => $BODY,
|
||||
"gears" => $GEAR,
|
||||
@ -530,7 +544,7 @@ switch($PARAM_1)
|
||||
$ipAddress = GeoIp\Manager::getRealIp();
|
||||
$result = GeoIp\Manager::getDataResult($ipAddress, "ru");
|
||||
|
||||
$REQ['FORM_FIELD_REGION'] = $result->getGeoData()->regionName.", ".$result->getGeoData()->cityName;
|
||||
$_REQUEST['FORM_FIELD_REGION'] = $result->getGeoData()->regionName.", ".$result->getGeoData()->cityName;
|
||||
|
||||
$error = "";
|
||||
$arr = Array();
|
||||
@ -735,6 +749,234 @@ switch($PARAM_1)
|
||||
}
|
||||
break;
|
||||
|
||||
case "recovery":
|
||||
{
|
||||
switch($PARAM_3)
|
||||
{
|
||||
case "email":
|
||||
{
|
||||
if(checkRequestIsLocal())
|
||||
{
|
||||
$rs_user = \CUser::GetByLogin($REQ['email']);
|
||||
$ar_user = $rs_user->Fetch();
|
||||
|
||||
if(is_array($ar_user))
|
||||
{
|
||||
\Bitrix\Main\Mail\Event::send([
|
||||
"EVENT_NAME" => "USER_PASSWORD_RECOVERY_CODE",
|
||||
"LID" => "s1",
|
||||
"C_FIELDS" => Array(
|
||||
"EMAIL" => $REQ['email'],
|
||||
"CODE" => $REQ['code'],
|
||||
)
|
||||
]);
|
||||
|
||||
print json_encode([
|
||||
"status" => "success",
|
||||
]);
|
||||
}
|
||||
else
|
||||
{
|
||||
print json_encode([
|
||||
"status" => "error",
|
||||
"error" => "wrong_email",
|
||||
"message" => "Wrong email",
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case "password":
|
||||
{
|
||||
if(checkRequestIsLocal())
|
||||
{
|
||||
$rs_user = \CUser::GetByLogin($REQ['email']);
|
||||
$ar_user = $rs_user->Fetch();
|
||||
|
||||
if(is_array($ar_user))
|
||||
{
|
||||
$user = new \CUser;
|
||||
$profile = [
|
||||
"PASSWORD" => $REQ['password'],
|
||||
"CONFIRM_PASSWORD" => $REQ['password'],
|
||||
];
|
||||
|
||||
$user->Update($ar_user['ID'], $profile);
|
||||
|
||||
if($user->LAST_ERROR)
|
||||
{
|
||||
print json_encode([
|
||||
"status" => "error",
|
||||
"error" => "wrong_payload",
|
||||
"message" => $user->LAST_ERROR,
|
||||
]);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
\Bitrix\Main\Mail\Event::send([
|
||||
"EVENT_NAME" => "USER_INFO",
|
||||
"LID" => "s1",
|
||||
"C_FIELDS" => Array(
|
||||
"EMAIL" => $REQ['email'],
|
||||
"ORG_NAME" => $ar_user['UF_ORG_TITLE'],
|
||||
"LOGIN" => $REQ['email'],
|
||||
"PASS" => $REQ['password'],
|
||||
)
|
||||
]);
|
||||
*/
|
||||
|
||||
print json_encode([
|
||||
"status" => "success",
|
||||
]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print json_encode([
|
||||
"status" => "error",
|
||||
"error" => "wrong_email",
|
||||
"message" => "Wrong email",
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case "change":
|
||||
{
|
||||
switch($PARAM_3)
|
||||
{
|
||||
case "password":
|
||||
{
|
||||
if(checkRequestIsLocal())
|
||||
{
|
||||
$user = new \CUser;
|
||||
$login_result = $user->Login($REQ['email'], $REQ['password'], "N");
|
||||
|
||||
if($login_result == 1)
|
||||
{
|
||||
$existed_user_res = \CUser::GetByLogin($REQ['email']);
|
||||
$existed_user = $existed_user_res->Fetch();
|
||||
|
||||
if(is_array($existed_user))
|
||||
{
|
||||
$profile = [
|
||||
"PASSWORD" => $REQ['new_password'],
|
||||
"CONFIRM_PASSWORD" => $REQ['new_password_repeat'],
|
||||
];
|
||||
|
||||
$user->Update($existed_user['ID'], $profile);
|
||||
|
||||
if($user->LAST_ERROR)
|
||||
{
|
||||
print json_encode([
|
||||
"status" => "error",
|
||||
"error" => "wrong_payload",
|
||||
"message" => $user->LAST_ERROR,
|
||||
]);
|
||||
}
|
||||
else
|
||||
{
|
||||
print json_encode([
|
||||
"status" => "success",
|
||||
]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print json_encode([
|
||||
"status" => "error",
|
||||
"error" => "unknow_user",
|
||||
"message" => "Unknown user",
|
||||
]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print json_encode([
|
||||
"status" => "error",
|
||||
"error" => "wrong_email",
|
||||
"message" => "Wrong email",
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case "phone":
|
||||
{
|
||||
if(checkRequestIsLocal())
|
||||
{
|
||||
$token = str_replace("Bearer ", "", $_SERVER['REMOTE_USER']);
|
||||
$auth = (array) \Bitrix\Main\Web\JWT::decode($token, $secret, ["HS256"]);
|
||||
|
||||
$user = new \CUser;
|
||||
|
||||
$existed_user_res = \CUser::GetByLogin($REQ['email']);
|
||||
$existed_user = $existed_user_res->Fetch();
|
||||
|
||||
if(is_array($existed_user))
|
||||
{
|
||||
if($existed_user['XML_ID'] == $auth['acc_number'])
|
||||
{
|
||||
$existed_phone_users_res = \CUser::GetList(["ID" => "ASC"], false, [ "UF_PHONE_NUMBER" => $REQ['phone'] ], []);
|
||||
while($existed_phone_user = $existed_phone_users_res->Fetch())
|
||||
{
|
||||
$user->Update($existed_user['ID'], [
|
||||
"UF_PHONE_NUMBER" => "",
|
||||
]);
|
||||
}
|
||||
|
||||
$profile = [
|
||||
"UF_PHONE_NUMBER" => $REQ['phone'],
|
||||
];
|
||||
|
||||
$user->Update($existed_user['ID'], $profile);
|
||||
|
||||
if($user->LAST_ERROR)
|
||||
{
|
||||
print json_encode([
|
||||
"status" => "error",
|
||||
"error" => "wrong_payload",
|
||||
"message" => $user->LAST_ERROR,
|
||||
]);
|
||||
}
|
||||
else
|
||||
{
|
||||
print json_encode([
|
||||
"status" => "success",
|
||||
]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print json_encode([
|
||||
"status" => "error",
|
||||
"error" => "wrong_company",
|
||||
"message" => "Wrong company",
|
||||
]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print json_encode([
|
||||
"status" => "error",
|
||||
"error" => "wrong_email",
|
||||
"message" => "Wrong email",
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case "auth":
|
||||
{
|
||||
switch($PARAM_3)
|
||||
@ -749,14 +991,12 @@ switch($PARAM_1)
|
||||
$rs_user = \CUser::GetByLogin($REQ['email']);
|
||||
$ar_user = $rs_user->Fetch();
|
||||
|
||||
//print_r($ar_user);
|
||||
|
||||
$user_data = [
|
||||
"email" => $ar_user['LOGIN'],
|
||||
"name" => $ar_user['NAME'],
|
||||
"secondname" => $ar_user['SECOND_NAME'],
|
||||
"lastname" => $ar_user['LAST_NAME'],
|
||||
"phone" => $ar_user['UF_PHONE'],
|
||||
"phone" => $ar_user['UF_PHONE_NUMBER'],
|
||||
"phone_verified" => $ar_user['UF_PHONE_VERIFIED'],
|
||||
];
|
||||
|
||||
@ -782,64 +1022,11 @@ switch($PARAM_1)
|
||||
"message" => "Wrong username or password",
|
||||
]);
|
||||
}
|
||||
|
||||
print $arAuthResult;
|
||||
}
|
||||
break;
|
||||
|
||||
case "phone":
|
||||
{
|
||||
/*
|
||||
$oUserTypeEntity = new CUserTypeEntity();
|
||||
//$oUserTypeEntity->Delete(12);
|
||||
|
||||
$aUserFields = array(
|
||||
'ENTITY_ID' => 'USER',
|
||||
'FIELD_NAME' => 'UF_PHONE_NUMBER',
|
||||
'USER_TYPE_ID' => 'string',
|
||||
'XML_ID' => 'XML_USER_PHONE_NUMBER',
|
||||
'SORT' => 500,
|
||||
'MULTIPLE' => 'N',
|
||||
'MANDATORY' => 'N',
|
||||
'SHOW_FILTER' => 'N',
|
||||
'SHOW_IN_LIST' => '',
|
||||
'EDIT_IN_LIST' => '',
|
||||
'IS_SEARCHABLE' => 'N',
|
||||
'SETTINGS' => array(
|
||||
'DEFAULT_VALUE' => '',
|
||||
'SIZE' => '20',
|
||||
'ROWS' => '1',
|
||||
'MIN_LENGTH' => '0',
|
||||
'MAX_LENGTH' => '0',
|
||||
'REGEXP' => '',
|
||||
),
|
||||
'EDIT_FORM_LABEL' => array(
|
||||
'ru' => 'Номер телефона',
|
||||
'en' => 'Phone number',
|
||||
),
|
||||
'LIST_COLUMN_LABEL' => array(
|
||||
'ru' => 'Номер телефона',
|
||||
'en' => 'Phone number',
|
||||
),
|
||||
'LIST_FILTER_LABEL' => array(
|
||||
'ru' => 'Номер телефона',
|
||||
'en' => 'Phone number',
|
||||
),
|
||||
'ERROR_MESSAGE' => array(
|
||||
'ru' => 'Ошибка при заполнении пользовательского свойства',
|
||||
'en' => 'An error in completing the user field',
|
||||
),
|
||||
'HELP_MESSAGE' => array(
|
||||
'ru' => '',
|
||||
'en' => '',
|
||||
),
|
||||
);
|
||||
|
||||
$iUserFieldId = $oUserTypeEntity->Add( $aUserFields ); // int
|
||||
print $iUserFieldId;
|
||||
die();
|
||||
*/
|
||||
|
||||
if(!empty($REQ['phone']))
|
||||
{
|
||||
$user = new \CUser;
|
||||
@ -850,7 +1037,6 @@ switch($PARAM_1)
|
||||
while($arUser = $rsUsers->Fetch())
|
||||
{
|
||||
array_push($numbers, $arUser);
|
||||
//echo $arUser['ID'].' '.$arUser['LOGIN']."\n";
|
||||
}
|
||||
|
||||
if(count($numbers) > 0)
|
||||
@ -935,117 +1121,34 @@ switch($PARAM_1)
|
||||
}
|
||||
break;
|
||||
|
||||
case "contracts":
|
||||
case "materials":
|
||||
{
|
||||
if($auth['acc_number'])
|
||||
if(CModule::IncludeModule('iblock'))
|
||||
{
|
||||
$token = \Bitrix\Main\Web\JWT::encode(["acc_number" => $auth['acc_number']], $secret_crm, 'HS256', null, null);
|
||||
$parameters = ["acc_number" => $auth['acc_number']];
|
||||
$sort = ["ACTIVE_FROM" => "DESC", "SORT" => "DESC"];
|
||||
$filter = ["ACTIVE" => "Y", "IBLOCK_ID" => 21];
|
||||
$options = [];
|
||||
|
||||
$url = API_HOST."/lk/Account/GetContracts/?".http_build_query($parameters);
|
||||
|
||||
$c = curl_init();
|
||||
curl_setopt($c, CURLOPT_URL, $url);
|
||||
curl_setopt($c, CURLOPT_CONNECTTIMEOUT, 30);
|
||||
curl_setopt($c, CURLOPT_TIMEOUT, 30);
|
||||
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($c, CURLOPT_SSL_VERIFYPEER, 0);
|
||||
curl_setopt($c, CURLOPT_SSL_VERIFYHOST, 0);
|
||||
curl_setopt($c, CURLOPT_POST, 0);
|
||||
curl_setopt($c, CURLOPT_HTTPHEADER, [
|
||||
"Content-Type: application/json",
|
||||
"Authorization: Bearer ".$token."",
|
||||
]);
|
||||
|
||||
$response = curl_exec($c);
|
||||
curl_close($c);
|
||||
|
||||
print json_encode([
|
||||
"status" => "success",
|
||||
"contracts" => $response,
|
||||
]);
|
||||
}
|
||||
else
|
||||
{ header('HTTP/1.0 401 Unauthorized'); print json_encode(["status" => "error", "error" => "unauthorized", "message" => "Unauthorized"]); }
|
||||
die();
|
||||
}
|
||||
break;
|
||||
|
||||
case "calendar":
|
||||
{
|
||||
if($auth['acc_number'])
|
||||
{
|
||||
$token = \Bitrix\Main\Web\JWT::encode(["acc_number" => $auth['acc_number']], $secret, 'HS256', null, null);
|
||||
$parameters = ["acc_number" => $auth['acc_number']];
|
||||
|
||||
$url = API_HOST."/lk/Account/GetPaymentCalendar/?".http_build_query($parameters);
|
||||
|
||||
$c = curl_init();
|
||||
curl_setopt($c, CURLOPT_URL, $url);
|
||||
curl_setopt($c, CURLOPT_CONNECTTIMEOUT, 30);
|
||||
curl_setopt($c, CURLOPT_TIMEOUT, 30);
|
||||
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($c, CURLOPT_SSL_VERIFYPEER, 0);
|
||||
curl_setopt($c, CURLOPT_SSL_VERIFYHOST, 0);
|
||||
curl_setopt($c, CURLOPT_POST, 0);
|
||||
curl_setopt($c, CURLOPT_HTTPHEADER, [
|
||||
"Content-Type: application/json",
|
||||
"Authorization: Bearer ".$token."",
|
||||
]);
|
||||
|
||||
$response = curl_exec($c);
|
||||
curl_close($c);
|
||||
|
||||
print json_encode([
|
||||
"status" => "success",
|
||||
"contracts" => $response,
|
||||
]);
|
||||
}
|
||||
else
|
||||
{ header('HTTP/1.0 401 Unauthorized'); print json_encode(["status" => "error", "error" => "unauthorized", "message" => "Unauthorized"]); }
|
||||
die();
|
||||
}
|
||||
break;
|
||||
|
||||
case "contract":
|
||||
{
|
||||
switch($PARAM_4)
|
||||
{
|
||||
case "osago":
|
||||
$materials = [];
|
||||
$materials_res = CIBlockElement::GetList($sort, $filter, false, $options);
|
||||
while ($materials_ob_element = $materials_res->GetNextElement())
|
||||
{
|
||||
if($auth['acc_number'])
|
||||
{
|
||||
$token = \Bitrix\Main\Web\JWT::encode(["acc_number" => $auth['acc_number']], $secret, 'HS256', null, null);
|
||||
$parameters = ["acc_number" => $auth['acc_number']];
|
||||
$materials_ar_res = $materials_ob_element->GetFields();
|
||||
$materials_ar_res['PROPERTIES'] = $materials_ob_element->GetProperties();
|
||||
|
||||
$url = API_HOST."/lk/Account/GetPaymentCalendar/?".http_build_query($parameters);
|
||||
$f = CFile::GetByID($materials_ar_res['PROPERTIES']['FILE']['VALUE']);
|
||||
|
||||
$c = curl_init();
|
||||
curl_setopt($c, CURLOPT_URL, $url);
|
||||
curl_setopt($c, CURLOPT_CONNECTTIMEOUT, 30);
|
||||
curl_setopt($c, CURLOPT_TIMEOUT, 30);
|
||||
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($c, CURLOPT_SSL_VERIFYPEER, 0);
|
||||
curl_setopt($c, CURLOPT_SSL_VERIFYHOST, 0);
|
||||
curl_setopt($c, CURLOPT_POST, 0);
|
||||
curl_setopt($c, CURLOPT_HTTPHEADER, [
|
||||
"Content-Type: application/json",
|
||||
"Authorization: Bearer ".$token."",
|
||||
]);
|
||||
|
||||
$response = curl_exec($c);
|
||||
curl_close($c);
|
||||
|
||||
print json_encode([
|
||||
"status" => "success",
|
||||
"contracts" => $response,
|
||||
]);
|
||||
}
|
||||
else
|
||||
{ header('HTTP/1.0 401 Unauthorized'); print json_encode(["status" => "error", "error" => "unauthorized", "message" => "Unauthorized"]); }
|
||||
die();
|
||||
$materials[] = [
|
||||
"name" => $materials_ar_res['NAME'],
|
||||
"description" => $materials_ar_res['PREVIEW_TEXT'],
|
||||
"filename" => $f->Fetch()['ORIGINAL_NAME'],
|
||||
"url" => CFile::GetPath($materials_ar_res['PROPERTIES']['FILE']['VALUE']),
|
||||
];
|
||||
}
|
||||
break;
|
||||
|
||||
print json_encode([
|
||||
"materials" => $materials,
|
||||
]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1073,6 +1176,7 @@ switch($PARAM_1)
|
||||
"lease_period" => $REQ['lease_period'],
|
||||
"redemption_payment" => $REQ['redemption_payment'],
|
||||
]);
|
||||
|
||||
$c = curl_init();
|
||||
curl_setopt($c, CURLOPT_URL, API_HOST."/calculator/");
|
||||
curl_setopt($c, CURLOPT_CONNECTTIMEOUT, 30);
|
||||
|
||||
@ -19,6 +19,9 @@ $APPLICATION->SetTitle("Каталог");
|
||||
"ENGINE_POWER_TO" => $_REQUEST['ENGINE_POWER_TO'],
|
||||
"ENGINE_VOLUME_FROM" => $_REQUEST['ENGINE_VOLUME_FROM'],
|
||||
"ENGINE_VOLUME_TO" => $_REQUEST['ENGINE_VOLUME_TO'],
|
||||
"SORT" => $_REQUEST['SORT'],
|
||||
"PATH" => "/catalog/",
|
||||
"PROGRAM" => null,
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
||||
17
index.php
17
index.php
@ -10,13 +10,16 @@ $APPLICATION->SetTitle("Эволюция автолизинга. Лизинг а
|
||||
|
||||
<section id="filter">
|
||||
<div class="container">
|
||||
<? $APPLICATION->IncludeComponent(
|
||||
"evolution:form.catalog.filter",
|
||||
"",
|
||||
Array(
|
||||
"SELECTED" => []
|
||||
)
|
||||
); ?>
|
||||
<? $APPLICATION->IncludeComponent(
|
||||
"evolution:form.catalog.filter",
|
||||
"",
|
||||
Array(
|
||||
"SELECTED" => [],
|
||||
"SORTING" => false,
|
||||
"PATH" => "/catalog/",
|
||||
"PROGRAM" => null,
|
||||
)
|
||||
); ?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
@ -33,6 +33,13 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
|
||||
$ar_res['PROPERTIES'] = $obElement->GetProperties();
|
||||
$ar_res['PROPERTIES']['REGION']['RELATED'] = get_related_array(15, $ar_res['PROPERTIES']['REGION']['VALUE']);
|
||||
|
||||
$regions = [];
|
||||
foreach($ar_res['PROPERTIES']['REGION']['RELATED'] AS $r)
|
||||
{
|
||||
array_push($regions, $r['NAME']);
|
||||
}
|
||||
$ar_res['REGIONS'] = $regions;
|
||||
|
||||
$arResult = $ar_res;
|
||||
}
|
||||
|
||||
|
||||
@ -47,7 +47,7 @@ $this->setFrameMode(true);
|
||||
"",
|
||||
Array(
|
||||
"VACANCY" => $arResult["NAME"],
|
||||
"VACANCY_REGION" => $arResult['PROPERTIES']['REGION']['RELATED']['NAME'],
|
||||
"VACANCY_REGIONS" => $arResult['REGIONS'],
|
||||
)
|
||||
);
|
||||
?>
|
||||
18
local/components/evolution/catalog.sort/component.php
Normal file
18
local/components/evolution/catalog.sort/component.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?
|
||||
if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
|
||||
/** @var CBitrixComponent $this */
|
||||
/** @var array $arParams */
|
||||
/** @var array $arResult */
|
||||
/** @var string $componentPath */
|
||||
/** @var string $componentName */
|
||||
/** @var string $componentTemplate */
|
||||
/** @global CDatabase $DB */
|
||||
/** @global CUser $USER */
|
||||
/** @global CMain $APPLICATION */
|
||||
|
||||
use Bitrix\Main\Context,
|
||||
Bitrix\Main\Type\DateTime,
|
||||
Bitrix\Main\Loader,
|
||||
Bitrix\Iblock;
|
||||
|
||||
$this->includeComponentTemplate();
|
||||
@ -0,0 +1,33 @@
|
||||
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
|
||||
/** @var array $arParams */
|
||||
/** @var array $arResult */
|
||||
/** @global CMain $APPLICATION */
|
||||
/** @global CUser $USER */
|
||||
/** @global CDatabase $DB */
|
||||
/** @var CBitrixComponentTemplate $this */
|
||||
/** @var string $templateName */
|
||||
/** @var string $templateFile */
|
||||
/** @var string $templateFolder */
|
||||
/** @var string $componentPath */
|
||||
/** @var CBitrixComponent $component */
|
||||
$this->setFrameMode(true);
|
||||
?>
|
||||
<div class="catalog_sort">
|
||||
<div class="sort_container sort_selector">
|
||||
<button class="i-sort">Сортировка:
|
||||
<?= $arParams['SORT'] === "" || $arParams['SORT'] === null || $arParams['SORT'] === "name" ? "По названию" : ""; ?>
|
||||
<?= $arParams['SORT'] === "low" ? "По минимальной цене" : ""; ?>
|
||||
<?= $arParams['SORT'] === "high" ? "По максимальной цене" : ""; ?>
|
||||
</button>
|
||||
<ul data-position="left">
|
||||
<li class="sort_option <?= $arParams['SORT'] === "" || $arParams['SORT'] === null || $arParams['SORT'] === "name" ? "active" : ""; ?>" data-value="name">По названию</li>
|
||||
<li class="sort_option <?= $arParams['SORT'] === "low" ? "active" : ""; ?>" data-value="low">По минимальной цене</li>
|
||||
<li class="sort_option <?= $arParams['SORT'] === "high" ? "active" : ""; ?>" data-value="high">По максимальной цене</li>
|
||||
</ul>
|
||||
</div>
|
||||
<? if($arParams['FILTER']): ?>
|
||||
<div class="sort_container filter_selector">
|
||||
<button class="i-filter">Фильтр</button>
|
||||
</div>
|
||||
<? endif; ?>
|
||||
</div>
|
||||
@ -27,16 +27,39 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
|
||||
'ITEMS' => []
|
||||
];
|
||||
|
||||
$sort = Array("SORT" => "ASC", "NAME" => "ASC");
|
||||
$filter = Array("ACTIVE" => "Y", "IBLOCK_ID" => 1);
|
||||
$options = Array("nPageSize" => 6);
|
||||
|
||||
$query = null;
|
||||
$query_arr = [];
|
||||
|
||||
$pages_url = "/catalog";
|
||||
$sort = Array("SORT" => "ASC", "NAME" => "ASC");
|
||||
if(isset($arParams['SORT']))
|
||||
{
|
||||
if($arParams['SORT'] === "name")
|
||||
{
|
||||
$sort = Array("SORT" => "ASC", "NAME" => "ASC");
|
||||
$arResult['SCROLL'] = true;
|
||||
}
|
||||
if($arParams['SORT'] === "low")
|
||||
{
|
||||
$sort = Array("SORT" => "ASC", "PROPERTY_PRICE" => "ASC");
|
||||
$query_arr['SORT'] = $arParams['SORT'];
|
||||
$arResult['SCROLL'] = true;
|
||||
}
|
||||
if($arParams['SORT'] === "high")
|
||||
{
|
||||
$sort = Array("SORT" => "ASC", "PROPERTY_PRICE" => "DESC");
|
||||
$query_arr['SORT'] = $arParams['SORT'];
|
||||
$arResult['SCROLL'] = true;
|
||||
}
|
||||
|
||||
$arResult['SELECTED']['SORT'] = $arParams['SORT'];
|
||||
}
|
||||
$filter = Array("ACTIVE" => "Y", "IBLOCK_ID" => 1);
|
||||
$options = Array("nPageSize" => 6);
|
||||
|
||||
$pages_url = $arParams['PATH'];
|
||||
|
||||
$arResult['EXTENDED'] = false;
|
||||
$arResult['FILTER_SMALL'] = $arParams['FILTER_SMALL'] ? true : false;
|
||||
|
||||
if(!empty($arParams['BRAND']))
|
||||
{
|
||||
@ -45,11 +68,13 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
|
||||
{
|
||||
$brands_ar_res = $brands_ob_element->GetFields();
|
||||
$filter['PROPERTY_BRAND'] = $brands_ar_res['ID'];
|
||||
$pages_url = $pages_url."/".$brands_ar_res['CODE'];
|
||||
$pages_url = $pages_url.$brands_ar_res['CODE']."/";
|
||||
$arResult['SELECTED']['BRAND'] = $brands_ar_res['CODE'];
|
||||
}
|
||||
|
||||
$arResult['EXTENDED'] = true;
|
||||
$arResult['FILTER_SMALL'] = false;
|
||||
$arResult['SCROLL'] = true;
|
||||
}
|
||||
|
||||
if(!empty($arParams['MODEL']))
|
||||
@ -59,11 +84,12 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
|
||||
{
|
||||
$models_ar_res = $models_ob_element->GetFields();
|
||||
$filter['PROPERTY_MODEL'] = $models_ar_res['ID'];
|
||||
$pages_url = $pages_url."/".$models_ar_res['CODE'];
|
||||
$pages_url = $pages_url.$models_ar_res['CODE']."/";
|
||||
$arResult['SELECTED']['MODEL'] = $models_ar_res['CODE'];
|
||||
}
|
||||
|
||||
$arResult['EXTENDED'] = true;
|
||||
$arResult['SCROLL'] = true;
|
||||
}
|
||||
|
||||
if(!empty($arParams['MODIFICATION']))
|
||||
@ -73,6 +99,7 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
|
||||
|
||||
$filter['PROPERTY_MODIFICATION'] = $arParams['MODIFICATION'];
|
||||
$query_arr['MODIFICATION'] = $arParams['MODIFICATION'];
|
||||
$arResult['SCROLL'] = true;
|
||||
}
|
||||
|
||||
if(!empty($arParams['DRIVE']))
|
||||
@ -82,6 +109,7 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
|
||||
$filter['=PROPERTY_DRIVE'] = $arParams['DRIVE'];
|
||||
|
||||
$query_arr['DRIVE'] = $arParams['DRIVE'];
|
||||
$arResult['SCROLL'] = true;
|
||||
}
|
||||
|
||||
if(!empty($arParams['BODY']))
|
||||
@ -91,6 +119,7 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
|
||||
$filter['=PROPERTY_BODY'] = $arParams['BODY'];
|
||||
|
||||
$query_arr['BODY'] = $arParams['BODY'];
|
||||
$arResult['SCROLL'] = true;
|
||||
}
|
||||
|
||||
if(!empty($arParams['GEAR']))
|
||||
@ -100,6 +129,7 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
|
||||
$filter['=PROPERTY_GEAR'] = $arParams['GEAR'];
|
||||
|
||||
$query_arr['GEAR'] = $arParams['GEAR'];
|
||||
$arResult['SCROLL'] = true;
|
||||
}
|
||||
|
||||
if(!empty($arParams['ENGINE_FUEL']))
|
||||
@ -109,6 +139,7 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
|
||||
$arResult['SELECTED']['ENGINE_FUEL'] = $arParams['ENGINE_FUEL'];
|
||||
|
||||
$query_arr['ENGINE_FUEL'] = $arParams['ENGINE_FUEL'];
|
||||
$arResult['SCROLL'] = true;
|
||||
}
|
||||
|
||||
if(!empty($arParams['ENGINE_POWER_FROM']) || !empty($arParams['ENGINE_POWER_TO']))
|
||||
@ -125,6 +156,7 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
|
||||
$arResult['SELECTED']['ENGINE_POWER_TO'] = $arParams['ENGINE_POWER_TO'];
|
||||
$query_arr['ENGINE_POWER_TO'] = $arParams['ENGINE_POWER_TO'];
|
||||
}
|
||||
$arResult['SCROLL'] = true;
|
||||
}
|
||||
|
||||
if(!empty($arParams['ENGINE_VOLUME_FROM']) || !empty($arParams['ENGINE_VOLUME_TO']))
|
||||
@ -141,9 +173,10 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
|
||||
$arResult['SELECTED']['ENGINE_VOLUME_TO'] = $arParams['ENGINE_VOLUME_TO'];
|
||||
$query_arr['ENGINE_VOLUME_TO'] = $arParams['ENGINE_VOLUME_TO'];
|
||||
}
|
||||
$arResult['SCROLL'] = true;
|
||||
}
|
||||
|
||||
$pages_url = $pages_url."/";
|
||||
//$pages_url = $pages_url."/";
|
||||
|
||||
if(count($query_arr) > 0)
|
||||
{
|
||||
|
||||
@ -16,7 +16,6 @@ $this->setFrameMode(true);
|
||||
<div class="container">
|
||||
<div id="view"></div>
|
||||
<h1 class="section_title">Каталог автомобилей</h1>
|
||||
|
||||
<div class="special_detail">
|
||||
<? if(!$arParams['top_banners']): ?>
|
||||
<? else: ?>
|
||||
@ -31,56 +30,47 @@ $this->setFrameMode(true);
|
||||
<img src="/images/special_offer.jpg" alt="" />
|
||||
</div>
|
||||
<? endif; ?>
|
||||
|
||||
|
||||
|
||||
|
||||
<? if($arParams['filter_small']): ?>
|
||||
<?/*
|
||||
<div class="catalog_sort">
|
||||
<div class="sort_container">
|
||||
<button class="i-sort">Сортировка</button>
|
||||
</div>
|
||||
<div class="sort_container">
|
||||
<button class="i-filter">Фильтр</button>
|
||||
</div>
|
||||
</div>
|
||||
*/?>
|
||||
<? else: ?>
|
||||
|
||||
<div id="catalog_small_filter" style="<?= $arResult['EXTENDED'] ? "display:none;" : ""; ?>">
|
||||
<form id="catalog_small_form" method="get" action="/catalog/">
|
||||
<div class="filter_body">
|
||||
<div class="form_field">
|
||||
<select name="brand" id="small_filter_brands">
|
||||
<option disabled selected value="">Марка</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form_field">
|
||||
<select name="model" id="small_filter_models">
|
||||
<option disabled selected value="">Модель</option>
|
||||
</select>
|
||||
</div>
|
||||
<button class="button-blue" id="catalog_small_find"></button>
|
||||
<button class="button button-blue" id="rich_filter_toggle">Расширенный фильтр</button>
|
||||
<div id="catalog_small_filter" style="<?= $arResult['EXTENDED'] ? "display:none;" : $arResult['FILTER_SMALL'] ? "display:none;" : ""; ?>">
|
||||
<form id="catalog_small_form" method="get" action="/catalog/">
|
||||
<div class="filter_body">
|
||||
<div class="form_field">
|
||||
<select name="brand" id="small_filter_brands">
|
||||
<option disabled selected value="">Марка</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div id="filter" class="filter_in_catalog" style="<?= $arResult['EXTENDED'] ? "display:block;" : ""; ?>">
|
||||
<div class="container">
|
||||
|
||||
<div class="form_field">
|
||||
<select name="model" id="small_filter_models">
|
||||
<option disabled selected value="">Модель</option>
|
||||
</select>
|
||||
</div>
|
||||
<button class="button-blue" id="catalog_small_find"></button>
|
||||
<button class="button button-blue" id="rich_filter_toggle">Расширенный фильтр</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div id="filter" class="filter_in_catalog" style="<?= $arResult['EXTENDED'] ? "display:block;" : ""; ?>">
|
||||
<div class="container">
|
||||
<? $APPLICATION->IncludeComponent(
|
||||
"evolution:form.catalog.filter",
|
||||
"",
|
||||
Array(
|
||||
"SELECTED" => $arResult['SELECTED']
|
||||
"SELECTED" => $arResult['SELECTED'],
|
||||
"PATH" => $arParams['PATH'],
|
||||
"SORTING" => true,
|
||||
"PROGRAM" => $arParams['PROGRAM'],
|
||||
"SCROLL" => $arResult['SCROLL'],
|
||||
)
|
||||
); ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<? endif; ?>
|
||||
|
||||
</div>
|
||||
<? $APPLICATION->IncludeComponent(
|
||||
"evolution:catalog.sort",
|
||||
"",
|
||||
Array(
|
||||
"SORT" => $arParams['SORT'],
|
||||
"FILTER" => $arResult['FILTER_SMALL'],
|
||||
)
|
||||
); ?>
|
||||
<? if(count($arResult['ITEMS']) > 0): ?>
|
||||
<div id="list" class="catalog_list">
|
||||
<? foreach($arResult['ITEMS'] AS $arItem): ?>
|
||||
|
||||
@ -22,6 +22,7 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
|
||||
{
|
||||
$arResult = [
|
||||
'SELECTED' => $arParams['SELECTED'],
|
||||
'SCROLL' => $arParams['SCROLL'],
|
||||
];
|
||||
|
||||
$this->IncludeComponentTemplate();
|
||||
|
||||
@ -1,11 +1,17 @@
|
||||
var current = {};
|
||||
var selected = {};
|
||||
var inputs = {};
|
||||
var path = "";
|
||||
var program = null;
|
||||
|
||||
function formCatalogFilter(props)
|
||||
function formCatalogFilter(p, pr, props)
|
||||
{
|
||||
console.log("props???");
|
||||
console.log(props);
|
||||
console.log("FILTER", "program", pr);
|
||||
path = p;
|
||||
selected = props;
|
||||
current = props;
|
||||
program = pr;
|
||||
|
||||
$(".filter_header .tabs .tab").on("click", function()
|
||||
{
|
||||
$(".filter_header .tabs .tab").removeClass("active");
|
||||
@ -21,6 +27,10 @@ function updateCounter(parameters)
|
||||
$("#catalog_filter_search_button_counter").hide();
|
||||
|
||||
var params = {};
|
||||
if(program !== null)
|
||||
{
|
||||
params['PROGRAM'] = program;
|
||||
}
|
||||
for(let i in parameters)
|
||||
{
|
||||
if(parameters[i] !== undefined) { params[i] = parameters[i]; }
|
||||
@ -138,6 +148,11 @@ function loadModifications(uid)
|
||||
|
||||
$(function()
|
||||
{
|
||||
$("#catalog_filter_form").on("submit", function(event)
|
||||
{
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
$.get("/api/catalog/brands/",
|
||||
{
|
||||
params: {},
|
||||
@ -183,6 +198,9 @@ $(function()
|
||||
|
||||
if($(this).val() === "")
|
||||
{
|
||||
selected['BRAND'] = undefined;
|
||||
selected['BRAND_ID'] = undefined;
|
||||
|
||||
$("#small_filter_brands").find("option").first().text("Марка").attr("disabled", "disabled");
|
||||
$("#small_filter_models").empty();
|
||||
$("#small_filter_models").append("<option value='' disabled selected>Модель</option>");
|
||||
@ -191,6 +209,8 @@ $(function()
|
||||
$("#filter_models").append("<option value='' disabled selected>Модель</option>");
|
||||
$("#filter_modifications").empty();
|
||||
$("#filter_modifications").append("<option disabled selected>Модификация</option>");
|
||||
|
||||
updateCounter(selected);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -332,28 +352,26 @@ $(function()
|
||||
|
||||
$("#catalog_small_find").on("click", function()
|
||||
{
|
||||
var path = "/catalog";
|
||||
var p = path;
|
||||
|
||||
if($("#small_filter_brands").val() !== "")
|
||||
if($("#small_filter_brands").val() !== "" && $("#small_filter_brands").val() !== null)
|
||||
{
|
||||
path = path+"/"+$("#small_filter_brands").val();
|
||||
p = p + $("#small_filter_brands").val()+"/";
|
||||
}
|
||||
if($("#small_filter_models").val() !== "")
|
||||
if($("#small_filter_models").val() !== "" && $("#small_filter_models").val() !== null)
|
||||
{
|
||||
path = path+"/"+$("#small_filter_models").val();
|
||||
p = p + $("#small_filter_models").val()+"/";
|
||||
}
|
||||
|
||||
path = path+"/";
|
||||
|
||||
window.location.href = path;
|
||||
window.location.href = p;
|
||||
//$("#catalog_small_form").submit();
|
||||
});
|
||||
|
||||
$("#rich_filter_toggle").on("click", function()
|
||||
{
|
||||
updateCounter(selected);
|
||||
$("#filter").addClass("visible");
|
||||
$("#catalog_small_filter").addClass("hidden");
|
||||
$("#filter").addClass("visible").css("display", "block");
|
||||
$("#catalog_small_filter").addClass("hidden").css("display", "none");
|
||||
});
|
||||
|
||||
$.get("/api/catalog/parameters/",
|
||||
@ -463,28 +481,28 @@ $(function()
|
||||
$("#catalog_filter_search_button").on("click", function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var path = "/catalog";
|
||||
var p = path;
|
||||
|
||||
if($("#filter_brands").val() !== undefined && $("#filter_brands").val() !== null && $("#filter_brands").val() !== "")
|
||||
{
|
||||
path = path+"/"+$("#filter_brands").val();
|
||||
p = p + $("#filter_brands").val()+"/";
|
||||
}
|
||||
if($("#filter_models").val() !== undefined && $("#filter_models").val() !== null && $("#filter_models").val() !== "")
|
||||
{
|
||||
path = path+"/"+$("#filter_models").val();
|
||||
p = p + $("#filter_models").val()+"/";
|
||||
}
|
||||
|
||||
var p = {};
|
||||
var pa = {};
|
||||
for(let i in selected)
|
||||
{
|
||||
if(i !== "BRAND" && i !== "BRAND_ID" && i !== "MODEL" && i !== "MODEL_ID")
|
||||
{
|
||||
p[i] = selected[i];
|
||||
pa[i] = selected[i];
|
||||
}
|
||||
}
|
||||
|
||||
path = path+"/?"+$.param(p);
|
||||
window.location.href = path;
|
||||
p = p + "?"+$.param(pa);
|
||||
window.location.href = p;
|
||||
});
|
||||
|
||||
$("#filter_engine_volume_from").on("change", function()
|
||||
@ -530,4 +548,47 @@ $(function()
|
||||
inputs['engine_volume_to'] = event.target.value;
|
||||
});
|
||||
*/
|
||||
|
||||
$(".sort_option").on("click", function()
|
||||
{
|
||||
console.log("path", path);
|
||||
var value = $(this).data("value");
|
||||
var p = path;
|
||||
var o = {};
|
||||
for(let i in current)
|
||||
{
|
||||
if(i !== "SORT" && i !== "BRAND" && i !== "MODEL" && i !== "BRAND_ID" && i !== "MODEL_ID")
|
||||
{
|
||||
o[i] = current[i];
|
||||
}
|
||||
}
|
||||
if(current['BRAND'] !== undefined)
|
||||
{
|
||||
p = p + current['BRAND']+"/";
|
||||
}
|
||||
if(current['MODEL'] !== undefined)
|
||||
{
|
||||
p = p + current['MODEL']+"/";
|
||||
}
|
||||
p = p+"?";
|
||||
//if(value !== "name")
|
||||
//{
|
||||
p = p + "SORT="+value;
|
||||
//}
|
||||
|
||||
var params = $.param(o);
|
||||
if(params.length > 0)
|
||||
{
|
||||
p = "&"+params;
|
||||
}
|
||||
|
||||
document.location.href = p;
|
||||
});
|
||||
|
||||
$(".i-filter").on("click", function()
|
||||
{
|
||||
$(".filter_selector").css("display", "none");
|
||||
//$(this).parent().parent().css("display", "none");
|
||||
$("#catalog_small_filter").css("display", "block");
|
||||
});
|
||||
});
|
||||
@ -15,7 +15,7 @@ $this->setFrameMode(true);
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
formCatalogFilter(<?= CUtil::PhpToJSObject($arResult['SELECTED']); ?>);
|
||||
formCatalogFilter("<?= $arParams['PATH']; ?>", "<?= $arParams['PROGRAM']; ?>", <?= CUtil::PhpToJSObject($arResult['SELECTED']); ?>);
|
||||
<? if($arResult['SCROLL']): ?>
|
||||
$('html, body').animate({
|
||||
scrollTop: $("#catalog").offset().top - 100
|
||||
|
||||
@ -1,39 +1,56 @@
|
||||
var leasing_form_submitting = false;
|
||||
|
||||
function form_leasing_request_submit()
|
||||
{
|
||||
$("#form_leasing_request").find("input").removeClass("error");
|
||||
|
||||
var formData = new FormData($("#form_leasing_request")[0]);
|
||||
formData.append("form", "FORM_LEASING_REQUESTS");
|
||||
formData.append("FORM_FIELD_PAGE_NAME", document.title);
|
||||
formData.append("FORM_FIELD_PAGE_URL", window.location.href);
|
||||
formData.append("FORM_FIELD_BRAND", $("#FORM_FIELD_BRAND").val() ? $("#FORM_FIELD_BRAND").val() : "");
|
||||
formData.append("FORM_FIELD_MODEL", $("#FORM_FIELD_MODEL").val() ? $("#FORM_FIELD_MODEL").val() : "");
|
||||
formData.append("FORM_FIELD_MODIFICATION", $("#FORM_FIELD_MODIFICATION").val() ? $("#FORM_FIELD_MODIFICATION").val() : "");
|
||||
formData.append("FORM_FIELD_PRICE", $("#FORM_FIELD_PRICE").val() ? $("#FORM_FIELD_PRICE").val() : "");
|
||||
formData.append("FORM_FIELD_PREPAID", $("#FORM_FIELD_PREPAID").val() ? $("#FORM_FIELD_PREPAID").val() : "");
|
||||
formData.append("FORM_FIELD_TERM", $("#FORM_FIELD_TERM").val() ? $("#FORM_FIELD_TERM").val() : "");
|
||||
formData.append("FORM_FIELD_REDEMPTION", $("#FORM_FIELD_REDEMPTION").val() ? $("#FORM_FIELD_REDEMPTION").val() : "");
|
||||
|
||||
$.ajax(
|
||||
var accept = $("#policy").is(':checked');
|
||||
if(!leasing_form_submitting && accept)
|
||||
{
|
||||
url: "/api/forms/", type: 'POST', success: function(response)
|
||||
leasing_form_submitting = true;
|
||||
$("#send_button_text").css("display", "none");
|
||||
$("#send_button_spinner").css("display", "block");
|
||||
|
||||
$("#form_leasing_request").find("input").removeClass("error");
|
||||
|
||||
var formData = new FormData($("#form_leasing_request")[0]);
|
||||
formData.append("form", "FORM_LEASING_REQUESTS");
|
||||
formData.append("FORM_FIELD_PAGE_NAME", document.title);
|
||||
formData.append("FORM_FIELD_PAGE_URL", window.location.href);
|
||||
formData.append("FORM_FIELD_BRAND", $("#FORM_FIELD_BRAND").val() ? $("#FORM_FIELD_BRAND").val() : "");
|
||||
formData.append("FORM_FIELD_MODEL", $("#FORM_FIELD_MODEL").val() ? $("#FORM_FIELD_MODEL").val() : "");
|
||||
formData.append("FORM_FIELD_MODIFICATION", $("#FORM_FIELD_MODIFICATION").val() ? $("#FORM_FIELD_MODIFICATION").val() : "");
|
||||
formData.append("FORM_FIELD_PRICE", $("#FORM_FIELD_PRICE").val() ? $("#FORM_FIELD_PRICE").val() : "");
|
||||
formData.append("FORM_FIELD_PREPAID", $("#FORM_FIELD_PREPAID").val() ? $("#FORM_FIELD_PREPAID").val() : "");
|
||||
formData.append("FORM_FIELD_TERM", $("#FORM_FIELD_TERM").val() ? $("#FORM_FIELD_TERM").val() : "");
|
||||
formData.append("FORM_FIELD_REDEMPTION", $("#FORM_FIELD_REDEMPTION").val() ? $("#FORM_FIELD_REDEMPTION").val() : "");
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
if(response.status == "complete")
|
||||
url: "/api/forms/", type: 'POST', success: function(response)
|
||||
{
|
||||
$("#form_leasing_process").css("display","none");
|
||||
$("#form_leasing_success").css("display","flex");
|
||||
}
|
||||
else if(response.status == "error")
|
||||
{
|
||||
for(var i in response.errors)
|
||||
if(response.status == "complete")
|
||||
{
|
||||
$("#form_leasing_request").find("*[name="+response.errors[i]+"]").addClass("error");
|
||||
$("#form_leasing_process").css("display","none");
|
||||
$("#form_leasing_success").css("display","flex");
|
||||
|
||||
$("#send_button_text").css("display", "block");
|
||||
$("#send_button_spinner").css("display", "none");
|
||||
|
||||
leasing_form_submitting = false;
|
||||
}
|
||||
}
|
||||
}, data: formData,
|
||||
dataType: "json",
|
||||
cache: false, contentType: false, processData: false
|
||||
});
|
||||
else if(response.status == "error")
|
||||
{
|
||||
for(var i in response.errors)
|
||||
{
|
||||
$("#form_leasing_request").find("*[name="+response.errors[i]+"]").addClass("error");
|
||||
|
||||
leasing_form_submitting = false;
|
||||
}
|
||||
}
|
||||
}, data: formData,
|
||||
dataType: "json",
|
||||
cache: false, contentType: false, processData: false
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$(function()
|
||||
@ -48,4 +65,16 @@ $(function()
|
||||
event.preventDefault();
|
||||
form_leasing_request_submit();
|
||||
});
|
||||
|
||||
$("#policy").on("change", function()
|
||||
{
|
||||
if($(this).is(':checked'))
|
||||
{
|
||||
$("#leasing_send_button").attr("disabled", false);
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#leasing_send_button").attr("disabled", true);
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -12,6 +12,41 @@
|
||||
/** @var CBitrixComponent $component */
|
||||
$this->setFrameMode(true);
|
||||
?>
|
||||
<style type="text/css">
|
||||
@keyframes send_button_spinner_animation {
|
||||
0% { transform: translate(-50%,-50%) rotate(0deg); }
|
||||
100% { transform: translate(-50%,-50%) rotate(360deg); }
|
||||
}
|
||||
.send_button_spinner_animation div {
|
||||
position: absolute;
|
||||
width: 65px;
|
||||
height: 65px;
|
||||
border: 5px solid #1c01a9;
|
||||
border-top-color: transparent;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.send_button_spinner_animation div {
|
||||
animation: send_button_spinner_animation 1s linear infinite;
|
||||
top: 50px;
|
||||
left: 50px
|
||||
}
|
||||
#send_button_spinner {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
background: none;
|
||||
}
|
||||
.send_button_spinner_animation {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
transform: translateZ(0) scale(0.28);
|
||||
backface-visibility: hidden;
|
||||
transform-origin: 0 0; /* see note above */
|
||||
}
|
||||
.send_button_spinner_animation div { box-sizing: content-box; }
|
||||
</style>
|
||||
<section id="order">
|
||||
<div class="container">
|
||||
<h2 class="section_title">Купить в лизинг?</h2>
|
||||
@ -37,7 +72,14 @@ $this->setFrameMode(true);
|
||||
<input type="checkbox" name="policy" id="policy" hidden checked required/>
|
||||
<label for="policy" required>Даю свое согласие на обработку <u class="personal_data_link" id="personal_data_link">моих персональных данных</u></label>
|
||||
</div>
|
||||
<button type="submit" class="button">Отправить</button>
|
||||
<button type="submit" class="button" id="leasing_send_button" style="width:110px; display: flex; justify-content: center;">
|
||||
<div id="send_button_spinner" style="display:none;">
|
||||
<div class="send_button_spinner_animation">
|
||||
<div></div>
|
||||
</div>
|
||||
</div>
|
||||
<span id="send_button_text" style="display:block;">Отправить</span>
|
||||
</button>
|
||||
</div>
|
||||
<div id="form_leasing_success" style="min-height: 400px; align-items: center; justify-content: center; display: none;">
|
||||
<p style="color: #fff; font-size: 24px; line-height: 34px;">Благодарим Вас за обращение, наши специалисты свяжутся с Вами в ближайшее время.</p>
|
||||
|
||||
@ -1,32 +1,49 @@
|
||||
var vacancy_form_submitting = false;
|
||||
|
||||
function form_vacancy_submit()
|
||||
{
|
||||
$("#form_vacancy").find("input").removeClass("error");
|
||||
|
||||
var formData = new FormData($("#form_vacancy")[0]);
|
||||
formData.append("form", "FORM_VACANCY");
|
||||
formData.append("FORM_FIELD_PAGE_NAME", document.title);
|
||||
formData.append("FORM_FIELD_PAGE_URL", window.location.href);
|
||||
|
||||
$.ajax(
|
||||
var accept = $("#policy").is(':checked');
|
||||
if(!vacancy_form_submitting && accept)
|
||||
{
|
||||
url: "/api/forms/", type: 'POST', success: function(response)
|
||||
vacancy_form_submitting = true;
|
||||
$("#send_button_text").css("display", "none");
|
||||
$("#send_button_spinner").css("display", "block");
|
||||
|
||||
$("#form_vacancy").find("input").removeClass("error");
|
||||
|
||||
var formData = new FormData($("#form_vacancy")[0]);
|
||||
formData.append("form", "FORM_VACANCY");
|
||||
formData.append("FORM_FIELD_PAGE_NAME", document.title);
|
||||
formData.append("FORM_FIELD_PAGE_URL", window.location.href);
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
if(response.status == "complete")
|
||||
url: "/api/forms/", type: 'POST', success: function(response)
|
||||
{
|
||||
$("#form_vacancy_process").css("display","none");
|
||||
$("#form_vacancy_success").css("display","flex");
|
||||
}
|
||||
else if(response.status == "error")
|
||||
{
|
||||
for(var i in response.errors)
|
||||
if(response.status == "complete")
|
||||
{
|
||||
$("#form_vacancy").find("*[name="+response.errors[i]+"]").addClass("error");
|
||||
$("#form_vacancy_process").css("display","none");
|
||||
$("#form_vacancy_success").css("display","flex");
|
||||
|
||||
$("#send_button_text").css("display", "block");
|
||||
$("#send_button_spinner").css("display", "none");
|
||||
|
||||
vacancy_form_submitting = false;
|
||||
}
|
||||
}
|
||||
}, data: formData,
|
||||
dataType: "json",
|
||||
cache: false, contentType: false, processData: false
|
||||
});
|
||||
else if(response.status == "error")
|
||||
{
|
||||
for(var i in response.errors)
|
||||
{
|
||||
$("#form_vacancy").find("*[name="+response.errors[i]+"]").addClass("error");
|
||||
|
||||
vacancy_form_submitting = false;
|
||||
}
|
||||
}
|
||||
}, data: formData,
|
||||
dataType: "json",
|
||||
cache: false, contentType: false, processData: false
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$(function()
|
||||
@ -48,4 +65,16 @@ $(function()
|
||||
$(".filename").text(filename);
|
||||
$(this).next("label").text("Заменить файл")
|
||||
});
|
||||
|
||||
$("#policy").on("change", function()
|
||||
{
|
||||
if($(this).is(':checked'))
|
||||
{
|
||||
$("#vacancy_send_button").attr("disabled", false);
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#vacancy_send_button").attr("disabled", true);
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -12,6 +12,41 @@
|
||||
/** @var CBitrixComponent $component */
|
||||
$this->setFrameMode(true);
|
||||
?>
|
||||
<style type="text/css">
|
||||
@keyframes send_button_spinner_animation {
|
||||
0% { transform: translate(-50%,-50%) rotate(0deg); }
|
||||
100% { transform: translate(-50%,-50%) rotate(360deg); }
|
||||
}
|
||||
.send_button_spinner_animation div {
|
||||
position: absolute;
|
||||
width: 65px;
|
||||
height: 65px;
|
||||
border: 5px solid #1c01a9;
|
||||
border-top-color: transparent;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.send_button_spinner_animation div {
|
||||
animation: send_button_spinner_animation 1s linear infinite;
|
||||
top: 50px;
|
||||
left: 50px
|
||||
}
|
||||
#send_button_spinner {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
background: none;
|
||||
}
|
||||
.send_button_spinner_animation {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
transform: translateZ(0) scale(0.28);
|
||||
backface-visibility: hidden;
|
||||
transform-origin: 0 0; /* see note above */
|
||||
}
|
||||
.send_button_spinner_animation div { box-sizing: content-box; }
|
||||
</style>
|
||||
<section id="order">
|
||||
<div class="container">
|
||||
<h2 class="section_title">Хотите к нам?</h2>
|
||||
@ -21,16 +56,28 @@ $this->setFrameMode(true);
|
||||
</div>
|
||||
<form id="form_vacancy">
|
||||
<div id="form_vacancy_process">
|
||||
<input type="hidden" name="FORM_FIELD_VACANCY" value="<?= $arParams['VACANCY']; ?>"/>
|
||||
<input type="hidden" name="FORM_FIELD_VACANCY_REGION" value="<?= $arParams['VACANCY_REGION']; ?>"/>
|
||||
<input type="hidden" name="FORM_FIELD_VACANCY_REGION" value="<?= implode(", ", $arParams['VACANCY_REGIONS']); ?>"/>
|
||||
<div class="form_field">
|
||||
<input type="text" name="FORM_FIELD_FIO" value="" placeholder="Имя *" required/>
|
||||
<input type="text" name="FORM_FIELD_FIO" value="" placeholder="Фамилия, имя и отчество *" required/>
|
||||
</div>
|
||||
<div class="form_field">
|
||||
<input type="radio" name="FORM_FIELD_GENDER" value="мужской" id="gender_1" hidden checked/>
|
||||
<label for="gender_1">Мужской</label>
|
||||
<input type="radio" name="FORM_FIELD_GENDER" value="женский" id="gender_2" hidden />
|
||||
<label for="gender_2">Женский</label>
|
||||
</div>
|
||||
<div class="form_field">
|
||||
<input type="text" name="FORM_FIELD_CITY" value="" placeholder="Город проживания *" required/>
|
||||
</div>
|
||||
|
||||
<div class="form_field">
|
||||
<input type="email" name="FORM_FIELD_EMAIL" value="" placeholder="Адрес электронной почты *" required/>
|
||||
</div>
|
||||
<div class="form_field">
|
||||
<input type="tel" name="FORM_FIELD_PHONE" value="" placeholder="Телефон *" required/>
|
||||
</div>
|
||||
<div class="form_field">
|
||||
<input type="email" name="FORM_FIELD_EMAIL" value="" placeholder="E-mail *" required/>
|
||||
<input type="text" name="FORM_FIELD_VACANCY" value="<?= $arParams['VACANCY']; ?>" placeholder="Вакансия *" required/>
|
||||
</div>
|
||||
<div class="form_field">
|
||||
<div class="input_file">
|
||||
@ -43,7 +90,14 @@ $this->setFrameMode(true);
|
||||
<input type="checkbox" name="policy" id="policy" hidden checked/>
|
||||
<label for="policy" required>Даю свое согласие на обработку <u class="personal_data_link" id="personal_data_link">моих персональных данных</u></label>
|
||||
</div>
|
||||
<button class="button">Отправить</button>
|
||||
<button class="button" id="vacancy_send_button" style="width:110px; display: flex; justify-content: center;">
|
||||
<div id="send_button_spinner" style="display:none;">
|
||||
<div class="send_button_spinner_animation">
|
||||
<div></div>
|
||||
</div>
|
||||
</div>
|
||||
<span id="send_button_text" style="display:block;">Отправить</span>
|
||||
</button>
|
||||
</div>
|
||||
<div id="form_vacancy_success" style="min-height: 400px; align-items: center; justify-content: center; display: none;">
|
||||
<p style="color: #fff; font-size: 24px; line-height: 34px;">Благодарим Вас за обращение, наши специалисты свяжутся с Вами в ближайшее время.</p>
|
||||
|
||||
@ -61,9 +61,6 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
|
||||
$APPLICATION->AddChainItem($ar_res["NAME"]);
|
||||
$ipropValues = new \Bitrix\Iblock\InheritedProperty\ElementValues($ar_res['IBLOCK_ID'], $ar_res["ID"]);
|
||||
$meta = $ipropValues->getValues();
|
||||
print "<!-- META ";
|
||||
print_r($meta);
|
||||
print "-->";
|
||||
$APPLICATION->SetPageProperty("title", $meta['ELEMENT_META_TITLE']);
|
||||
$APPLICATION->SetPageProperty("keywords", $meta['ELEMENT_META_KEYWORDS']);
|
||||
$APPLICATION->SetPageProperty("description", $meta['ELEMENT_META_DESCRIPTION']);
|
||||
|
||||
@ -30,18 +30,18 @@ $this->setFrameMode(true);
|
||||
|
||||
<div class="clear"></div>
|
||||
<? if(count($arResult['PROPERTIES']['OFFERS']['~VALUE']) > 0): ?>
|
||||
<section class="gray">
|
||||
<div class="container">
|
||||
<h2>Лизинговые предложения</h2>
|
||||
<div class="leasing_offers_list">
|
||||
<? foreach($arResult['PROPERTIES']['OFFERS']['~VALUE'] AS $OFFER): ?>
|
||||
<div class="offer_item">
|
||||
<?= $OFFER['TEXT']; ?>
|
||||
</div>
|
||||
<? endforeach; ?>
|
||||
<section class="gray">
|
||||
<div class="container">
|
||||
<h2>Лизинговые предложения</h2>
|
||||
<div class="leasing_offers_list">
|
||||
<? foreach($arResult['PROPERTIES']['OFFERS']['~VALUE'] AS $OFFER): ?>
|
||||
<div class="offer_item">
|
||||
<?= $OFFER['TEXT']; ?>
|
||||
</div>
|
||||
<? endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<? endif; ?>
|
||||
<? if($arResult['PROPERTIES']['CATALOG']['VALUE_XML_ID'] != ""): ?>
|
||||
<?
|
||||
@ -51,9 +51,23 @@ $this->setFrameMode(true);
|
||||
array(
|
||||
"PAGINATION" => "Y",
|
||||
"leasing_program" => $arResult['PROPERTIES']['CATALOG']['VALUE_XML_ID'],
|
||||
"section_code" => $arResult['DETAIL_PAGE_URL'],
|
||||
//"section_code" => $arResult['DETAIL_PAGE_URL'],
|
||||
"top_banners" => false,
|
||||
"filter_small" => true,
|
||||
"FILTER_SMALL" => true,
|
||||
"BRAND" => $_REQUEST['BRAND'],
|
||||
"MODEL" => $_REQUEST['MODEL'],
|
||||
"MODIFICATION" => $_REQUEST['MODIFICATION'],
|
||||
"DRIVE" => $_REQUEST['DRIVE'],
|
||||
"BODY" => $_REQUEST['BODY'],
|
||||
"GEAR" => $_REQUEST['GEAR'],
|
||||
"ENGINE_FUEL" => $_REQUEST['ENGINE_FUEL'],
|
||||
"ENGINE_POWER_FROM" => $_REQUEST['ENGINE_POWER_FROM'],
|
||||
"ENGINE_POWER_TO" => $_REQUEST['ENGINE_POWER_TO'],
|
||||
"ENGINE_VOLUME_FROM" => $_REQUEST['ENGINE_VOLUME_FROM'],
|
||||
"ENGINE_VOLUME_TO" => $_REQUEST['ENGINE_VOLUME_TO'],
|
||||
"SORT" => $_REQUEST['SORT'],
|
||||
"PATH" => $arResult['DETAIL_PAGE_URL'],
|
||||
"PROGRAM" => $arResult['PROPERTIES']['CATALOG']['VALUE_XML_ID'],
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
||||
18
local/components/evolution/mobile.footer.menu/component.php
Normal file
18
local/components/evolution/mobile.footer.menu/component.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?
|
||||
if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
|
||||
/** @var CBitrixComponent $this */
|
||||
/** @var array $arParams */
|
||||
/** @var array $arResult */
|
||||
/** @var string $componentPath */
|
||||
/** @var string $componentName */
|
||||
/** @var string $componentTemplate */
|
||||
/** @global CDatabase $DB */
|
||||
/** @global CUser $USER */
|
||||
/** @global CMain $APPLICATION */
|
||||
|
||||
use Bitrix\Main\Context,
|
||||
Bitrix\Main\Type\DateTime,
|
||||
Bitrix\Main\Loader,
|
||||
Bitrix\Iblock;
|
||||
|
||||
$this->includeComponentTemplate();
|
||||
@ -0,0 +1,55 @@
|
||||
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
|
||||
/** @var array $arParams */
|
||||
/** @var array $arResult */
|
||||
/** @global CMain $APPLICATION */
|
||||
/** @global CUser $USER */
|
||||
/** @global CDatabase $DB */
|
||||
/** @var CBitrixComponentTemplate $this */
|
||||
/** @var string $templateName */
|
||||
/** @var string $templateFile */
|
||||
/** @var string $templateFolder */
|
||||
/** @var string $componentPath */
|
||||
/** @var CBitrixComponent $component */
|
||||
$this->setFrameMode(true);
|
||||
?>
|
||||
<div class="tapbar">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="/special/" class="<?= strpos($_SERVER['REQUEST_URI'], "/special") > -1 ? "active" : ""; ?>">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M18.75 5.25L5.25 18.75" stroke="#1C01A9" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M7.125 9.75C8.57475 9.75 9.75 8.57475 9.75 7.125C9.75 5.67525 8.57475 4.5 7.125 4.5C5.67525 4.5 4.5 5.67525 4.5 7.125C4.5 8.57475 5.67525 9.75 7.125 9.75Z" stroke="#1C01A9" stroke-width="2" stroke-miterlimit="10"/>
|
||||
<path d="M16.875 19.5C18.3247 19.5 19.5 18.3247 19.5 16.875C19.5 15.4253 18.3247 14.25 16.875 14.25C15.4253 14.25 14.25 15.4253 14.25 16.875C14.25 18.3247 15.4253 19.5 16.875 19.5Z" stroke="#1C01A9" stroke-width="2" stroke-miterlimit="10"/>
|
||||
</svg>
|
||||
<span>Специальные предложения</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#order">
|
||||
<svg width="18" height="20" viewBox="0 0 18 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M15.7502 19H2.24951C2.0506 19 1.85983 18.921 1.71918 18.7803C1.57853 18.6397 1.49951 18.4489 1.49951 18.25V1.75C1.49951 1.55109 1.57853 1.36032 1.71918 1.21967C1.85983 1.07902 2.0506 1 2.24951 1H11.2502L16.5002 6.25V18.25C16.5002 18.3485 16.4808 18.446 16.4432 18.537C16.4055 18.628 16.3502 18.7107 16.2806 18.7803C16.2109 18.85 16.1283 18.9052 16.0373 18.9429C15.9463 18.9806 15.8487 19 15.7502 19Z" stroke="#8E94A7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<span>Заявка на лизинг</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/about/contacts/" class="<?= strpos($_SERVER['REQUEST_URI'], "/about/contacts") > -1 ? "active" : ""; ?>">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14.9453 3.75C16.2167 4.09194 17.376 4.76196 18.307 5.69294C19.238 6.62392 19.908 7.78319 20.2499 9.05462" stroke="#8E94A7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M14.1689 6.64844C14.9318 6.8536 15.6274 7.25561 16.186 7.8142C16.7445 8.37279 17.1466 9.06835 17.3517 9.83121" stroke="#8E94A7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M8.66965 11.7024C9.44762 13.2929 10.7369 14.5763 12.3309 15.347C12.4475 15.4023 12.5765 15.4262 12.7052 15.4165C12.8339 15.4067 12.9579 15.3636 13.0648 15.2915L15.4119 13.7264C15.5157 13.6572 15.6352 13.6149 15.7594 13.6035C15.8837 13.5921 16.0088 13.6119 16.1235 13.661L20.5144 15.5428C20.6636 15.6062 20.7881 15.7163 20.8693 15.8566C20.9504 15.9969 20.9838 16.1598 20.9643 16.3207C20.8255 17.4067 20.2956 18.4049 19.4739 19.1283C18.6521 19.8518 17.5948 20.2509 16.5 20.2509C13.1185 20.2509 9.87548 18.9076 7.48439 16.5166C5.0933 14.1255 3.75 10.8825 3.75 7.50095C3.75006 6.40611 4.14918 5.34883 4.87264 4.52708C5.5961 3.70533 6.59428 3.17545 7.68028 3.03667C7.84117 3.0172 8.00403 3.05054 8.14432 3.13167C8.28461 3.21281 8.39473 3.33734 8.4581 3.4865L10.3416 7.8813C10.3903 7.99497 10.4101 8.11893 10.3994 8.24214C10.3886 8.36534 10.3475 8.48397 10.2798 8.58745L8.72011 10.9705C8.64912 11.0778 8.60716 11.2015 8.59831 11.3298C8.58947 11.4581 8.61405 11.5864 8.66965 11.7024V11.7024Z" stroke="#8E94A7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<span>Контакты</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://lk.evoleasing.ru/">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12 15C15.3137 15 18 12.3137 18 9C18 5.68629 15.3137 3 12 3C8.68629 3 6 5.68629 6 9C6 12.3137 8.68629 15 12 15Z" stroke="#8E94A7" stroke-width="2" stroke-miterlimit="10"/>
|
||||
<path d="M2.90527 20.2491C3.82736 18.6531 5.15322 17.3278 6.74966 16.4064C8.34611 15.485 10.1569 15 12.0002 15C13.8434 15 15.6542 15.4851 17.2506 16.4065C18.8471 17.3279 20.1729 18.6533 21.0949 20.2493" stroke="#8E94A7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<span>Личный кабинет</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@ -22,7 +22,7 @@ $arrContextOptions = [
|
||||
],
|
||||
];
|
||||
|
||||
$content = file_get_contents("https://web-api.evoleasing.ru:8443/site/Vehicle/GetModifications", false, stream_context_create($arrContextOptions));
|
||||
$content = file_get_contents(API_HOST."/site/Vehicle/GetModifications", false, stream_context_create($arrContextOptions));
|
||||
$json = json_decode($content, true);
|
||||
$brands_and_models = [];
|
||||
|
||||
|
||||
519
local/ilsa_update.php
Normal file
519
local/ilsa_update.php
Normal file
@ -0,0 +1,519 @@
|
||||
<?
|
||||
//$_SERVER["DOCUMENT_ROOT"] = __DIR__;
|
||||
define('STOP_STATISTICS', true);
|
||||
define('NO_KEEP_STATISTIC', 'Y');
|
||||
define('NO_AGENT_STATISTIC', 'Y');
|
||||
define('DisableEventsCheck', true);
|
||||
define('BX_SECURITY_SHOW_MESSAGE', true);
|
||||
define('NOT_CHECK_PERMISSIONS', true);
|
||||
|
||||
$_SERVER['DOCUMENT_ROOT'] = dirname(__DIR__, 1);
|
||||
require_once($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/prolog_before.php');
|
||||
CModule::IncludeModule('iblock');
|
||||
|
||||
print "\n\n";
|
||||
print $_SERVER['DOCUMENT_ROOT'];
|
||||
print "\n\n";
|
||||
|
||||
$arrContextOptions = [
|
||||
"ssl" => [
|
||||
"verify_peer"=>false,
|
||||
"verify_peer_name"=>false,
|
||||
],
|
||||
];
|
||||
|
||||
$bitrix_existed_brands = [];
|
||||
$bitrix_existed_models = [];
|
||||
$bitrix_existed_modifications = [];
|
||||
$bitrix_existed_cars = [];
|
||||
|
||||
$all_brands_search_res = CIBlockElement::GetList( [], [ "IBLOCK_ID" => 8, "ACTIVE" => "Y" ], false, false, [] );
|
||||
while($all_brands_search_ob = $all_brands_search_res->GetNextElement())
|
||||
{
|
||||
$brand_search = $all_brands_search_ob->GetFields();
|
||||
$brand_search['PROPERTIES'] = $all_brands_search_ob->GetProperties();
|
||||
|
||||
array_push( $bitrix_existed_brands, $brand_search['PROPERTIES']['UID']['VALUE'] );
|
||||
}
|
||||
|
||||
$all_models_search_res = CIBlockElement::GetList( [], [ "IBLOCK_ID" => 9, "ACTIVE" => "Y" ], false, false, [] );
|
||||
while($all_models_search_ob = $all_models_search_res->GetNextElement())
|
||||
{
|
||||
$model_search = $all_models_search_ob->GetFields();
|
||||
$model_search['PROPERTIES'] = $all_models_search_ob->GetProperties();
|
||||
|
||||
array_push( $bitrix_existed_models, $model_search['PROPERTIES']['UID']['VALUE'] );
|
||||
}
|
||||
|
||||
$all_modifications_search_res = CIBlockElement::GetList( [], [ "IBLOCK_ID" => 10, "ACTIVE" => "Y" ], false, false, [] );
|
||||
while($all_modifications_search_ob = $all_modifications_search_res->GetNextElement())
|
||||
{
|
||||
$modification_search = $all_modifications_search_ob->GetFields();
|
||||
|
||||
array_push( $bitrix_existed_modifications, $modification_search['CODE'] );
|
||||
}
|
||||
|
||||
$all_cars_search_res = CIBlockElement::GetList( [], [ "IBLOCK_ID" => 1, "ACTIVE" => "Y" ], false, false, [] );
|
||||
while($all_cars_search_ob = $all_cars_search_res->GetNextElement())
|
||||
{
|
||||
$car_search = $all_cars_search_ob->GetFields();
|
||||
$car_search['PROPERTIES'] = $all_cars_search_ob->GetProperties();
|
||||
|
||||
array_push( $bitrix_existed_cars, $car_search['PROPERTIES']['UID']['VALUE'] );
|
||||
}
|
||||
|
||||
print "bitrix_existed_brands = ".count($bitrix_existed_brands)."\n";
|
||||
print "bitrix_existed_models = ".count($bitrix_existed_models)."\n";
|
||||
print "bitrix_existed_modifications = ".count($bitrix_existed_modifications)."\n";
|
||||
print "bitrix_existed_cars = ".count($bitrix_existed_cars)."\n";
|
||||
|
||||
$content = file_get_contents(API_HOST."/site/Vehicle/GetModifications", false, stream_context_create($arrContextOptions));
|
||||
$json = json_decode($content, true);
|
||||
$brands_and_models = [];
|
||||
|
||||
//print "---------------\n\n";
|
||||
//print_r();
|
||||
//print "---------------\n\n";
|
||||
|
||||
$c = 0;
|
||||
foreach($json AS $entry)
|
||||
{
|
||||
if(!isset($brands_and_models[ $entry['brand']['id'] ]))
|
||||
{
|
||||
$brands_and_models[ $entry['brand']['id'] ] = [
|
||||
"name" => $entry['brand']['name'],
|
||||
"models" => [
|
||||
$entry['model']['id'] => [
|
||||
"name" => $entry['model']['name'],
|
||||
"modifications" => [ $entry['modification'] ],
|
||||
]
|
||||
],
|
||||
];
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!isset($brands_and_models[ $entry['brand']['id'] ][ 'models' ][ $entry['model']['id'] ]))
|
||||
{
|
||||
$brands_and_models[ $entry['brand']['id'] ][ 'models' ][ $entry['model']['id'] ] = [
|
||||
"name" => $entry['model']['name'],
|
||||
"modifications" => [ $entry['modification'] ],
|
||||
];
|
||||
}
|
||||
|
||||
if(!in_array($entry['modification'], $brands_and_models[ $entry['brand']['id'] ][ 'models' ][ $entry['model']['id'] ][ 'modifications' ]))
|
||||
{
|
||||
array_push($brands_and_models[ $entry['brand']['id'] ][ 'models' ][ $entry['model']['id'] ][ 'modifications' ], $entry['modification']);
|
||||
}
|
||||
}
|
||||
|
||||
if($c === 0)
|
||||
{
|
||||
print_r($entry);
|
||||
}
|
||||
$c++;
|
||||
}
|
||||
|
||||
//print_r($brands_and_models);
|
||||
//die();
|
||||
$c = 0;
|
||||
|
||||
$bitrix_brands = [];
|
||||
$bitrix_models = [];
|
||||
$bitrix_modifications = [];
|
||||
$bitrix_modifications_codes = [];
|
||||
|
||||
foreach($brands_and_models AS $brand_uid => $brand)
|
||||
{
|
||||
//print $uid." - ".$brand['name']."\n";
|
||||
|
||||
//if($c < 2)
|
||||
//{
|
||||
//добавляем новую марку
|
||||
$brand_existed = null;
|
||||
$brand_search_res = CIBlockElement::GetList( [], [ "IBLOCK_ID" => 8, "PROPERTY_UID" => $brand_uid ], false, ["nPageSize" => 1], ["ID"] );
|
||||
while($brand_search_ob = $brand_search_res->GetNextElement())
|
||||
{
|
||||
$brand_existed = $brand_search_ob->GetFields();
|
||||
$bitrix_brands[$brand_uid] = $brand_existed['ID'];
|
||||
}
|
||||
|
||||
$code = CUtil::translit( $brand['name'], "ru", [ "max_len" => 255, "change_case" => "L", "replace_space" => "-", "replace_other" => "-", ] );
|
||||
if($brand_existed !== null)
|
||||
{
|
||||
$brand_update_element = new CIBlockElement;
|
||||
$brand_update_payload = [ "IBLOCK_SECTION" => false, "PROPERTY_VALUES" => [ "UID" => $brand_uid ], "NAME" => $brand['name'], "CODE" => $code, "ACTIVE" => "Y", ];
|
||||
$brand_update_result = $brand_update_element->Update($brand_existed['ID'], $brand_update_payload);
|
||||
|
||||
$result = models_check($bitrix_models, $bitrix_modifications, $bitrix_modifications_codes, $brand_uid, $brand);
|
||||
|
||||
$bitrix_models = $result['bitrix_models'];
|
||||
$bitrix_modifications = $result['bitrix_modifications'];
|
||||
$bitrix_modifications_codes = $result['bitrix_modifications_codes'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$brand_element = new CIBlockElement;
|
||||
$brand_payload = [ "IBLOCK_SECTION_ID" => false, "IBLOCK_ID" => 8, "PROPERTY_VALUES" => [ "UID" => $brand_uid ], "NAME" => $brand['name'], "CODE" => $code, "ACTIVE" => "Y", ];
|
||||
|
||||
if($new_brand_id = $brand_element->Add($brand_payload))
|
||||
{
|
||||
$bitrix_brands[$brand_uid] = $new_brand_id;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "brand error: ".$brand_element->LAST_ERROR;
|
||||
}
|
||||
|
||||
$result = models_check($bitrix_models, $bitrix_modifications, $bitrix_modifications_codes, $brand_uid, $brand);
|
||||
|
||||
$bitrix_models = $result['bitrix_models'];
|
||||
$bitrix_modifications = $result['bitrix_modifications'];
|
||||
$bitrix_modifications_codes = $result['bitrix_modifications_codes'];
|
||||
}
|
||||
|
||||
//print "\n------------------------------\n";
|
||||
//}
|
||||
|
||||
$c++;
|
||||
}
|
||||
|
||||
//require_once("../bitrix/modules/main/include/prolog_before.php");
|
||||
//require_once("../bitrix/modules/main/include/prolog_before.php");
|
||||
//require_once("../bitrix/modules/main/include/prolog.php");
|
||||
//require_once('../bitrix/modules/main/cli/bitrix.php');
|
||||
|
||||
function set_brand_activity($brand_uid, $active = "N")
|
||||
{
|
||||
$brand_id = null;
|
||||
$brand_search_res = CIBlockElement::GetList( [], [ "IBLOCK_ID" => 8, "PROPERTY_UID" => $brand_uid ], false, false, [] );
|
||||
|
||||
while($brand_search_ob = $brand_search_res->GetNextElement())
|
||||
{
|
||||
$brand_search = $brand_search_ob->GetFields();
|
||||
$brand_id = $brand_search['ID'];
|
||||
}
|
||||
|
||||
if($brand_id !== null)
|
||||
{
|
||||
$brand_update_element = new CIBlockElement;
|
||||
$brand_update_payload = [ "ACTIVE" => $active, ];
|
||||
$brand_update_result = $brand_update_element->Update($brand_id, $brand_update_payload);
|
||||
}
|
||||
}
|
||||
|
||||
function set_model_activity($model_uid, $active = "N")
|
||||
{
|
||||
$model_id = null;
|
||||
$model_search_res = CIBlockElement::GetList( [], [ "IBLOCK_ID" => 9, "PROPERTY_UID" => $model_uid ], false, false, [] );
|
||||
|
||||
while($model_search_ob = $model_search_res->GetNextElement())
|
||||
{
|
||||
$model_search = $model_search_ob->GetFields();
|
||||
$model_id = $model_search['ID'];
|
||||
}
|
||||
|
||||
if($model_id !== null)
|
||||
{
|
||||
$model_update_element = new CIBlockElement;
|
||||
$model_update_payload = [ "ACTIVE" => $active, ];
|
||||
$model_update_result = $model_update_element->Update($model_id, $model_update_payload);
|
||||
}
|
||||
}
|
||||
|
||||
function set_modification_activity($modification_code, $active = "N")
|
||||
{
|
||||
$modification_id = null;
|
||||
$modification_search_res = CIBlockElement::GetList( [], [ "IBLOCK_ID" => 10, "CODE" => $modification_code ], false, false, [] );
|
||||
|
||||
while($modification_search_ob = $modification_search_res->GetNextElement())
|
||||
{
|
||||
$modification_search = $modification_search_ob->GetFields();
|
||||
$modification_id = $modification_search['ID'];
|
||||
}
|
||||
|
||||
if($modification_id !== null)
|
||||
{
|
||||
$modification_update_element = new CIBlockElement;
|
||||
$modification_update_payload = [ "ACTIVE" => $active, ];
|
||||
$modification_update_result = $modification_update_element->Update($modification_id, $modification_update_payload);
|
||||
}
|
||||
}
|
||||
|
||||
function set_car_activity($car_uid, $active = "N")
|
||||
{
|
||||
$car_id = null;
|
||||
$car_search_res = CIBlockElement::GetList( [], [ "IBLOCK_ID" => 1, "PROPERTY_UID" => $car_uid ], false, false, [] );
|
||||
|
||||
while($car_search_ob = $car_search_res->GetNextElement())
|
||||
{
|
||||
$car_search = $car_search_ob->GetFields();
|
||||
$car_id = $car_search['ID'];
|
||||
}
|
||||
|
||||
if($car_id !== null)
|
||||
{
|
||||
$car_update_element = new CIBlockElement;
|
||||
$car_update_payload = [ "ACTIVE" => $active, ];
|
||||
$car_update_result = $car_update_element->Update($car_id, $car_update_payload);
|
||||
}
|
||||
}
|
||||
|
||||
function models_check($bitrix_models, $bitrix_modifications, $bitrix_modifications_codes, $brand_uid, $brand)
|
||||
{
|
||||
foreach($brand['models'] AS $model_uid => $model)
|
||||
{
|
||||
$model_name = $model['name'];
|
||||
|
||||
$model_existed = null;
|
||||
$model_search_res = CIBlockElement::GetList( [], [ "IBLOCK_ID" => 9, "PROPERTY_UID" => $model_uid ], false, ["nPageSize" => 1], ["ID"] );
|
||||
while($model_search_ob = $model_search_res->GetNextElement())
|
||||
{
|
||||
$model_existed = $model_search_ob->GetFields();
|
||||
$bitrix_models[$model_uid] = $model_existed['ID'];
|
||||
}
|
||||
|
||||
$code = CUtil::translit( $model_name, "ru", [ "max_len" => 255, "change_case" => "L", "replace_space" => "-", "replace_other" => "-", ] );
|
||||
|
||||
if($model_existed !== null)
|
||||
{
|
||||
//print "MODEL ".$model_uid." EXISTED";
|
||||
|
||||
$model_update_element = new CIBlockElement;
|
||||
$model_update_payload = [ "IBLOCK_SECTION" => false, "PROPERTY_VALUES" => [ "BRAND_UID" => $brand_uid, "UID" => $model_uid, ], "NAME" => $model_name, "CODE" => $code, "ACTIVE" => "Y", ];
|
||||
$model_update_result = $model_update_element->Update($model_existed['ID'], $model_update_payload);
|
||||
}
|
||||
else
|
||||
{
|
||||
$model_element = new CIBlockElement;
|
||||
$model_payload = [ "IBLOCK_SECTION_ID" => false, "IBLOCK_ID" => 9, "PROPERTY_VALUES" => [ "BRAND_UID" => $brand_uid, "UID" => $model_uid, ], "NAME" => $model_name, "CODE" => $code, "ACTIVE" => "Y", ];
|
||||
|
||||
if($new_model_id = $model_element->Add($model_payload))
|
||||
{
|
||||
$bitrix_models[$model_uid] = $new_model_id;
|
||||
//echo "new_model_id: ".$new_model_id;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "model error: ".$model_element->LAST_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
foreach($model['modifications'] AS $modification)
|
||||
{
|
||||
print "MOD ".$modification."\n";
|
||||
$modification_existed = null;
|
||||
|
||||
$NAME = $brand['name']." ".$model_name." ".$modification;
|
||||
$CODE = CUtil::translit( $NAME, "ru", [ "max_len" => 255, "change_case" => "L", "replace_space" => "-", "replace_other" => "-", ] );
|
||||
|
||||
//"ID"
|
||||
$modification_search_res = CIBlockElement::GetList( [], [ "IBLOCK_ID" => 10, "CODE" => $CODE ], false, ["nPageSize" => 1], [] );
|
||||
while($modification_search_ob = $modification_search_res->GetNextElement())
|
||||
{
|
||||
$m_res = $modification_search_ob->GetFields();
|
||||
if(isset($m_res['ID']))
|
||||
{
|
||||
$modification_existed = $m_res['ID'];
|
||||
$bitrix_modifications[md5($brand_uid.$model_uid.$modification)] = $m_res['ID'];
|
||||
array_push($bitrix_modifications_codes, $CODE);
|
||||
}
|
||||
}
|
||||
|
||||
if($modification_existed === null)
|
||||
{
|
||||
$modification_element = new CIBlockElement;
|
||||
$modification_payload = [ "IBLOCK_SECTION_ID" => false, "IBLOCK_ID" => 10, "PROPERTY_VALUES" => [ "MODEL_UID" => $model_uid, "TITLE" => $modification ], "NAME" => $NAME, "CODE" => $CODE, "ACTIVE" => "Y", ];
|
||||
|
||||
if($new_modification_id = $modification_element->Add($modification_payload))
|
||||
{
|
||||
$bitrix_modifications[md5($brand_uid.$model_uid.$modification)] = $new_modification_id;
|
||||
array_push($bitrix_modifications_codes, $CODE);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "modification error: ".$modification_element->LAST_ERROR;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return [
|
||||
"bitrix_models" => $bitrix_models,
|
||||
"bitrix_modifications" => $bitrix_modifications,
|
||||
"bitrix_modifications_codes" => $bitrix_modifications_codes
|
||||
];
|
||||
}
|
||||
|
||||
print "bitrix brands\n\n";
|
||||
print_r($bitrix_brands);
|
||||
|
||||
print "bitrix models\n\n";
|
||||
print_r($bitrix_models);
|
||||
|
||||
print "bitrix modifications\n\n";
|
||||
print_r($bitrix_modifications);
|
||||
|
||||
//кешируем новые UID ТС
|
||||
$json_new_cars = [];
|
||||
foreach($json AS $car)
|
||||
{
|
||||
array_push($json_new_cars, $car['uid']);
|
||||
}
|
||||
|
||||
$c = 0;
|
||||
foreach($json AS $car)
|
||||
{
|
||||
//обновляем список ТС в битриксе
|
||||
if(!in_array($car['uid'], $bitrix_existed_cars))
|
||||
{
|
||||
$modification_content = file_get_contents(API_HOST."/site/Vehicle/GetCatalog?id=". $car['uid'] ."", false, stream_context_create($arrContextOptions));
|
||||
$modification_json = json_decode($modification_content, true);
|
||||
|
||||
$name = "".$car['brand']['name']." ".$car['model']['name']." ".$car['modification']."";
|
||||
$code = CUtil::translit( $name, "ru", [ "max_len" => 255, "change_case" => "L", "replace_space" => "-", "replace_other" => "-", ] );
|
||||
|
||||
$PROPERTY_VALUES = [
|
||||
"UID" => $car['uid'],
|
||||
"BRAND" => $bitrix_brands[ $car['brand']['id'] ],
|
||||
"MODEL" => $bitrix_models[ $car['model']['id'] ],
|
||||
"MODIFICATION" => $bitrix_modifications[ md5($car['brand']['id'].$car['model']['id'].$car['modification']) ],
|
||||
"MODIFICATION_YEAR" => $car['modificationYear'],
|
||||
"GEAR" => $car['gear'],
|
||||
"DRIVE" => $car['drive'],
|
||||
"BODY" => $car['body'],
|
||||
"ENGINE_POWER" => $car['engine']['power'],
|
||||
"ENGINE_VOLUME" => $car['engine']['volume'],
|
||||
"ENGINE_FUEL" => $car['engine']['fuel'],
|
||||
"PRICE" => $car['price'],
|
||||
"IMAGE_URL" => $car['url'],
|
||||
"COMPLECTATION_BODY" => json_encode($modification_json['body']),
|
||||
"COMPLECTATION_INTERIOR" => json_encode($modification_json['interior']),
|
||||
"COMPLECTATION_SECURITY" => json_encode($modification_json['security']),
|
||||
"COMPLECTATION_GUARANTEE" => json_encode($modification_json['guarantee']),
|
||||
"COMPLECTATION_TECHNICAL_DESCRIPTION" => json_encode($modification_json['technicalDescription']),
|
||||
"COMPLECTATION_FUNCTIONAL_EQUIPMENT" => json_encode($modification_json['functionalEquipment']),
|
||||
"COMPLECTATION_TOTAL_INFORMATION" => json_encode($modification_json['totalInformation']),
|
||||
"LEASING_PROGRAMS" => $car['programms'],
|
||||
];
|
||||
|
||||
//"ID"
|
||||
$car_existed = null;
|
||||
$car_search_res = CIBlockElement::GetList( [], [ "IBLOCK_ID" => 1, "PROPERTY_UID" => $car['uid'] ], false, ["nPageSize" => 1], [] );
|
||||
|
||||
while($car_search_ob = $car_search_res->GetNextElement())
|
||||
{
|
||||
$car_existed = $car_search_ob->GetFields();
|
||||
//print "CAR FOUND\n\n";
|
||||
//print_r($car_existed);
|
||||
}
|
||||
|
||||
if($car_existed !== null)
|
||||
{
|
||||
$car_update_element = new CIBlockElement;
|
||||
$car_update_payload = [ "IBLOCK_SECTION" => false, "NAME" => $name, "CODE" => $code, "PROPERTY_VALUES" => $PROPERTY_VALUES, "ACTIVE" => "Y", ];
|
||||
$car_update_result = $car_update_element->Update($car_existed['ID'], $car_update_payload);
|
||||
}
|
||||
else
|
||||
{
|
||||
//if($c === 0)
|
||||
//{
|
||||
$car_element = new CIBlockElement;
|
||||
$car_payload = [ "IBLOCK_SECTION_ID" => false, "IBLOCK_ID" => 1, "NAME" => $name, "CODE" => $code, "PROPERTY_VALUES" => $PROPERTY_VALUES, "ACTIVE" => "Y", ];
|
||||
|
||||
if($new_car_id = $car_element->Add($car_payload))
|
||||
{
|
||||
//$bitrix_brands[$brand_uid] = $new_brand_id;
|
||||
//echo "new car id: ".$new_car_id;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "brand error: ".$car_element->LAST_ERROR;
|
||||
}
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
$c++;
|
||||
}
|
||||
|
||||
print "\n\nновых ТС: ".$c."\n\n";
|
||||
|
||||
$h = 0;
|
||||
foreach($bitrix_existed_cars AS $existed_car_uid)
|
||||
{
|
||||
if(!in_array($existed_car_uid, $json_new_cars))
|
||||
{
|
||||
$h++;
|
||||
set_car_activity($existed_car_uid, "N");
|
||||
}
|
||||
}
|
||||
|
||||
print "\n\nснято с публикации ТС: ".$h."\n\n";
|
||||
|
||||
print "bitrix_existed_brands\n";
|
||||
$c = 0;
|
||||
foreach($bitrix_existed_brands AS $k => $b)
|
||||
{
|
||||
if($c < 10)
|
||||
{
|
||||
print $k." => ".$b."\n";
|
||||
$c++;
|
||||
}
|
||||
}
|
||||
|
||||
print "bitrix_brands\n";
|
||||
$c = 0;
|
||||
foreach($bitrix_brands AS $k => $b)
|
||||
{
|
||||
if($c < 10)
|
||||
{
|
||||
print $k." => ".$b."\n";
|
||||
$c++;
|
||||
}
|
||||
}
|
||||
|
||||
$md = 0;
|
||||
foreach($bitrix_existed_modifications AS $existed_modifications_code)
|
||||
{
|
||||
if(!in_array($existed_modifications_code, $bitrix_modifications_codes))
|
||||
{
|
||||
set_modification_activity($existed_modifications_code, "N");
|
||||
$md++;
|
||||
}
|
||||
}
|
||||
|
||||
print "\n\nснято с публикации модификаций: ".$md."\n";
|
||||
|
||||
$m = 0;
|
||||
foreach($bitrix_existed_models AS $existed_model_uid)
|
||||
{
|
||||
if($bitrix_models[$existed_model_uid] !== null)
|
||||
{}
|
||||
else
|
||||
{
|
||||
set_model_activity($existed_model_uid, "N");
|
||||
$m++;
|
||||
}
|
||||
}
|
||||
|
||||
print "\n\nснято с публикации моделей: ".$m."\n";
|
||||
|
||||
$b = 0;
|
||||
foreach($bitrix_existed_brands AS $existed_brand_uid)
|
||||
{
|
||||
if($bitrix_brands[$existed_brand_uid] !== null)
|
||||
{}
|
||||
else
|
||||
{
|
||||
set_brand_activity($existed_brand_uid, "N");
|
||||
$b++;
|
||||
}
|
||||
}
|
||||
|
||||
print "\n\nснято с публикации марок: ".$b."\n";
|
||||
|
||||
|
||||
die();
|
||||
|
||||
|
||||
?>
|
||||
@ -8,10 +8,10 @@ function _renderPageNumber($section, $page, $p, $query)
|
||||
{
|
||||
if($page == $p)
|
||||
{
|
||||
return "<li><a href=\"".$section.$p."/".$query."#view\"><strong>". $p ."</strong></a></li>";
|
||||
return "<li><a href=\"".$section."page-".$p."/".$query."\"><strong>". $p ."</strong></a></li>";
|
||||
}
|
||||
|
||||
return "<li><a href=\"".$section.$p."/".$query."#view\">". $p ."</a></li>";
|
||||
return "<li><a href=\"".$section."page-".$p."/".$query."\">". $p ."</a></li>";
|
||||
}
|
||||
|
||||
$pagesLinks = [];
|
||||
@ -102,13 +102,13 @@ else
|
||||
<div class="pagination">
|
||||
<ul>
|
||||
<? if($arResult["NavPageNomer"] > 1): ?>
|
||||
<li><a href="<?= $section; ?><?= ($arResult["NavPageNomer"]-1); ?>/<?= $query; ?>"><</a></li>
|
||||
<li><a href="<?= $section; ?>page-<?= ($arResult["NavPageNomer"]-1); ?>/<?= $query; ?>"><</a></li>
|
||||
<? endif; ?>
|
||||
<? foreach($pagesLinks AS $link): ?>
|
||||
<?= $link; ?>
|
||||
<? endforeach; ?>
|
||||
<? if($arResult["NavPageNomer"] + 1 < $arResult["NavPageCount"]): ?>
|
||||
<li><a href="<?= $section; ?><?=($arResult["NavPageNomer"]+1); ?>/<?= $query; ?>">></a></li>
|
||||
<li><a href="<?= $section; ?>page-<?=($arResult["NavPageNomer"]+1); ?>/<?= $query; ?>">></a></li>
|
||||
<? endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -1 +1 @@
|
||||
footer{background:#EDEFF5;padding:45px 0;box-sizing:border-box}@media all and (max-width:1600px) and (min-width:1280px){footer{padding:0}}@media all and (max-width:767px){footer{margin-top:40px;pading:25px 0}}footer .container{display:flex;justify-content:space-between;align-items:flex-start;background:transparent}@media all and (max-width:1279px){footer .container{padding:0;flex-wrap:wrap}}footer .column{width:270px;box-sizing:border-box}@media all and (max-width:1279px){footer .column{width:33.333%}footer .column:last-child{width:100%;display:flex;flex-wrap:wrap}footer .column:last-child>div,footer .column:last-child>p{width:33.333%;margin-top:35px;padding-right:30px;box-sizing:border-box;margin-bottom:0 !important}}@media all and (max-width:767px){footer .column{width:100%;margin-bottom:16px}footer .column:last-child>div,footer .column:last-child>p{width:100%;margin-top:15px;padding-right:0}}footer .column:not(:last-child){padding-right:15px}footer .column li:not(:last-child){margin-bottom:13px}@media all and (max-width:767px){footer .column li:not(:last-child){margin-bottom:8px}}footer .column li a{color:#000}footer .column p{color:#8E94A7;line-height:32px}footer .column a[href^="tel"]{display:inline-block;font-size:16px;line-height:32px;color:#000;padding-left:40px;background:url("/images/icons/icon-phone.svg") no-repeat left center}@media all and (max-width:1600px){footer .column a[href^="tel"]{font-size:13px;background-size:24px;padding-left:37px}}footer .column a[href^="mailto"]{display:inline-block;font-size:16px;line-height:24px;color:#000;padding-left:40px;background:url("/images/icons/icon-mail.svg") no-repeat left center}@media all and (max-width:1600px){footer .column a[href^="mailto"]{font-size:13px;background-size:24px;padding-left:37px}}footer .column div:nth-child(1),footer .column div:nth-child(2),footer .column div.socials{margin-bottom:40px}@media all and (max-width:1600px) and (min-width:1280px){footer .column div:nth-child(1),footer .column div:nth-child(2),footer .column div.socials{margin-bottom:20px}}footer .column div a{line-height:32px}@media all and (max-width:1279px){footer .column div a{line-height:1.45}}/*# sourceMappingURL=./style.css.map */
|
||||
footer{background:#EDEFF5;padding:45px 0;box-sizing:border-box}@media all and (max-width:1600px) and (min-width:1280px){footer{padding:0}}@media all and (max-width:767px){footer{margin-top:40px;pading:25px 0}}footer .tapbar{display:none}@media all and (max-width:1279px){footer .tapbar{display:block;position:fixed;z-index:99999;box-shadow:inset 0 .5px 0 rgba(0,0,0,0.2);background:#EDEFF5;padding-bottom:env(safe-area-inset-bottom);bottom:0;left:0;right:0}footer .tapbar ul{list-style:none;padding:10px 0;margin:0;display:flex;justify-content:space-between}footer .tapbar ul li{width:25%}footer .tapbar ul li a{display:block;padding:0 4px;box-sizing:border-box}footer .tapbar ul li a svg{height:24px;display:block;margin:auto}footer .tapbar ul li a svg path{stroke:#8E94A7}footer .tapbar ul li a span{display:block;font-weight:600;font-size:13px;line-height:130%;color:#8E94A7;margin-top:6px;text-align:center}footer .tapbar ul li a.active span{color:var(--blue)}footer .tapbar ul li a.active svg path{stroke:var(--blue)}}@media all and (max-width:768px){footer .tapbar ul li a span{font-size:10px;line-height:130%}}footer .container{display:flex;justify-content:space-between;align-items:flex-start;background:transparent}@media all and (max-width:1279px){footer .container{padding:0;flex-wrap:wrap;margin-bottom:50px}}footer .column{width:270px;box-sizing:border-box}@media all and (max-width:1279px){footer .column{width:33.333%}footer .column:last-child{width:100%;display:flex;flex-wrap:wrap}footer .column:last-child>div,footer .column:last-child>p{width:33.333%;margin-top:35px;padding-right:30px;box-sizing:border-box;margin-bottom:0 !important}}@media all and (max-width:767px){footer .column{width:100%;margin-bottom:16px}footer .column:last-child>div,footer .column:last-child>p{width:100%;margin-top:15px;padding-right:0}}footer .column:not(:last-child){padding-right:15px}footer .column li:not(:last-child){margin-bottom:13px}@media all and (max-width:767px){footer .column li:not(:last-child){margin-bottom:8px}}footer .column li a{color:#000}footer .column p{color:#8E94A7;line-height:32px}footer .column a[href^="tel"]{display:inline-block;font-size:16px;line-height:32px;color:#000;padding-left:40px;background:url("/images/icons/icon-phone.svg") no-repeat left center}@media all and (max-width:1600px){footer .column a[href^="tel"]{font-size:13px;background-size:24px;padding-left:37px}}footer .column a[href^="mailto"]{display:inline-block;font-size:16px;line-height:24px;color:#000;padding-left:40px;background:url("/images/icons/icon-mail.svg") no-repeat left center}@media all and (max-width:1600px){footer .column a[href^="mailto"]{font-size:13px;background-size:24px;padding-left:37px}}footer .column div:nth-child(1),footer .column div:nth-child(2),footer .column div.socials{margin-bottom:40px}@media all and (max-width:1600px) and (min-width:1280px){footer .column div:nth-child(1),footer .column div:nth-child(2),footer .column div.socials{margin-bottom:20px}}footer .column div a{line-height:32px}@media all and (max-width:1279px){footer .column div a{line-height:1.45}}/*# sourceMappingURL=./style.css.map */
|
||||
@ -1 +1 @@
|
||||
{"version":3,"sources":["style.less"],"names":[],"mappings":"AAAA,OACI,kBAAA,CACA,cAAA,CACA,sBAEA,gBAAmC,uBAAwB,kBAA3D,OACI,WAGJ,gBAAkC,iBAAlC,OACI,eAAA,CACA,eAXR,MAcI,YACI,YAAA,CACA,6BAAA,CACA,sBAAA,CACA,uBAEA,gBAAmC,kBAAnC,MANJ,YAOQ,SAAA,CACA,gBAtBZ,MA0BI,SACI,WAAA,CACA,sBAEA,gBAAmC,kBAAnC,MAJJ,SAKQ,cAEA,MAPR,QAOS,YACG,UAAA,CACA,YAAA,CACA,eAHJ,MAPR,QAOS,WAKG,KALJ,MAPR,QAOS,WAKU,GACH,aAAA,CACA,eAAA,CACA,kBAAA,CACA,qBAAA,CACA,4BAKZ,gBAAkC,iBAAlC,MAtBJ,SAuBQ,UAAA,CACA,mBAEA,MA1BR,QA0BS,WACG,KADJ,MA1BR,QA0BS,WACU,GACH,UAAA,CACA,eAAA,CACA,iBAKZ,MAnCJ,QAmCK,IAAI,cACD,mBAII,MAxCZ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CACA,UAAA,CACA,iBAAA,CACA,eAAgB,sDAEhB,gBAAmC,kBAAnC,MApEhB,QA2DQ,EACK,cASO,cAAA,CACA,oBAAA,CACA,mBAIR,MA3EZ,QA2DQ,EAgBK,iBACG,oBAAA,CACA,cAAA,CACA,gBAAA,CACA,UAAA,CACA,iBAAA,CACA,eAAgB,qDAEhB,gBAAmC,kBAAnC,MAnFhB,QA2DQ,EAgBK,iBASO,cAAA,CACA,oBAAA,CACA,mBAMR,MA5FZ,QA2FQ,IACK,UAAU,IACX,MA7FZ,QA2FQ,IAEK,UAAU,IACX,MA9FZ,QA2FQ,IAGK,SACG,mBAEA,gBAAmC,uBAAwB,kBAA3D,MAjGhB,QA2FQ,IACK,UAAU,IAKP,MAjGhB,QA2FQ,IAEK,UAAU,IAIP,MAjGhB,QA2FQ,IAGK,SAIO,oBAhMxB,MA8FI,QA2FQ,IAWI,GACI,iBAEA,gBAAmC,kBAAnC,MAzGhB,QA2FQ,IAWI,GAIQ"}
|
||||
@ -12,6 +12,73 @@ footer {
|
||||
pading: 25px 0;
|
||||
}
|
||||
|
||||
.tapbar {
|
||||
display: none;
|
||||
|
||||
@media all and (max-width: 1279px) {
|
||||
display: block;
|
||||
position: fixed;
|
||||
z-index: 99999;
|
||||
box-shadow: inset 0px 0.5px 0px rgba(0, 0, 0, 0.2);
|
||||
background: #EDEFF5;
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
|
||||
ul {
|
||||
list-style: none;
|
||||
padding: 10px 0;
|
||||
margin: 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
li {
|
||||
width: 25%;
|
||||
|
||||
a {
|
||||
display: block;
|
||||
padding: 0 4px;
|
||||
box-sizing: border-box;
|
||||
|
||||
svg {
|
||||
height: 24px;
|
||||
display: block;
|
||||
margin: auto;
|
||||
|
||||
path {
|
||||
stroke: #8E94A7;
|
||||
}
|
||||
}
|
||||
|
||||
span {
|
||||
display: block;
|
||||
font-weight: 600;
|
||||
font-size: 13px;
|
||||
line-height: 130%;
|
||||
color: #8E94A7;
|
||||
margin-top: 6px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&.active {
|
||||
span {color: var(--blue);}
|
||||
svg path {stroke: var(--blue);}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (max-width: 768px) {
|
||||
ul li a span {
|
||||
font-size: 10px;
|
||||
line-height: 130%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
@ -21,6 +88,7 @@ footer {
|
||||
@media all and (max-width: 1279px) {
|
||||
padding: 0;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
{"version":3,"sources":["style.less"],"names":[],"mappings":"AACI,QACI,kBADJ,OAGI,YAAY,kBAEZ,OAAC,kBAAkB,IAAI,WACnB,aAGJ,OAAC,kBACG,YACI,aAAA,CACA,gBAAA,CACA,mBAEA,gBAAmC,kBAAnC,OANP,kBACG,YAMQ,aAAA,CACA,cAAA,CACA,WAHJ,OANP,kBACG,WAUQ,eAAe,SACX,aAIR,gBAAkC,iBAAlC,OAhBP,kBACG,YAgBQ,YA1BhB,OA+BI,gBACI,YAAA,CACA,kBAAA,CACA,6BAAA,CACA,mBAnCR,OA+BI,eAMI,SACR,UAAA,CACY,MAAO,qBAEP,gBAAmC,kBAAnC,OAVR,eAMI,SAKQ,sBAAA,CACA,iBAAA,CACA,OAAA,CACA,aAGJ,gBAAmC,kBAAnC,OAjBR,eAMI,SAYQ,aAGJ,gBAAkC,iBAAlC,OArBR,eAMI,SAgBQ,aAGJ,gBAAkC,iBAAlC,OAzBR,eAMI,SAoBQ,UAAA,CACA,aA1DhB,OA+DI,cACI,YAAA,CACA,cAAA,CACA,6BAAA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A,CACA,eAAA,CACA,iBAAA,CACA,kBApBR,KAeI,OAOI,eACI,gBAAA,CACA,gBAxBZ,KAeI,OAOI,cAII,SACI,iBAOhB,QACI,cAAA,CACA,WAAA,CACA,UAAA,CACA,eAAA,CACA,WAAA,CACA,YAAA,CACA,iBAAA,CACA,eAAA,CACA,yBAEA,gBAAkC,iBAAlC,QACI,QAAA,CACA,OAAA,CACA,MAAA,CACA,WAAA,CACA,gBAhBR,OAmBI,QACI,UAAA,CACA,WAAA,CACA,QAAA,CACA,eAAgB,gDAAhB,CACA,YAAA,CACA,iBAAA,CACA,QAAA,CACA,WA3BR,OA8BI,EACI,GACI,MAAO"}
|
||||
@ -186,7 +186,7 @@
|
||||
|
||||
// Catalog smamm filter
|
||||
#catalog_small_filter {
|
||||
margin-bottom: 40px;
|
||||
margin-bottom: 0px;
|
||||
|
||||
&.hidden {
|
||||
display: none;
|
||||
@ -350,6 +350,52 @@
|
||||
}
|
||||
}
|
||||
|
||||
input[type="radio"] {
|
||||
display: none;
|
||||
visibility: hidden;
|
||||
|
||||
& + label {
|
||||
display: block;
|
||||
padding-left: 28px;
|
||||
cursor: pointer;
|
||||
color: #fff;
|
||||
margin-bottom: 5px;
|
||||
position: relative;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
&:before {
|
||||
content: "";
|
||||
display: block;
|
||||
width: 16px;
|
||||
min-width: 16px;
|
||||
height: 16px;
|
||||
background: #fff;
|
||||
box-sizing: border-box;
|
||||
border-radius: 100%;
|
||||
margin-right: 12px;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&:checked + label {
|
||||
&:before {
|
||||
background: var(--blue);
|
||||
border: 4px solid #fff;
|
||||
}
|
||||
}
|
||||
&:disabled + label {
|
||||
&:before {
|
||||
background: var(--gray);
|
||||
cursor: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.policy {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -532,6 +532,10 @@ main {
|
||||
justify-content: space-between;
|
||||
padding: 10px;
|
||||
|
||||
@media all and (max-width: 1600px) and (min-width: 1280px) {
|
||||
margin-bottom: 45px;
|
||||
}
|
||||
|
||||
output[hidden] {
|
||||
display: none;
|
||||
}
|
||||
@ -3261,11 +3265,59 @@ article #choose_region {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
margin-bottom: 65px;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 40px;
|
||||
|
||||
.sort_container {
|
||||
margin-left: 40px;
|
||||
position: relative;
|
||||
z-index: 9;
|
||||
|
||||
&:not(.open) {
|
||||
ul {display: none;}
|
||||
}
|
||||
|
||||
ul {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
width: 210px;
|
||||
left: -200px;
|
||||
right: -200px;
|
||||
text-align: left;
|
||||
background: #FFFFFF;
|
||||
list-style: none;
|
||||
padding: 16px;
|
||||
margin: auto;
|
||||
box-shadow: 0px 4px 32px rgba(0, 0, 0, 0.16);
|
||||
|
||||
li {
|
||||
cursor: pointer;
|
||||
|
||||
&:not(:last-child) {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
//&:hover {
|
||||
// color: var(--blue);
|
||||
//}
|
||||
}
|
||||
|
||||
.active {
|
||||
color: var(--blue);
|
||||
}
|
||||
|
||||
@media all and (max-width: 768px) {
|
||||
&[data-position="left"] {
|
||||
left: 0;
|
||||
right: auto;
|
||||
}
|
||||
|
||||
&[data-position="right"] {
|
||||
right: 0;
|
||||
left: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
button {
|
||||
height: 40px;
|
||||
|
||||
@ -42,6 +42,7 @@ table {
|
||||
|
||||
|
||||
/* for admin */
|
||||
/*
|
||||
.bx-core main {
|
||||
padding-top: 0;
|
||||
|
||||
@ -52,6 +53,7 @@ table {
|
||||
}
|
||||
|
||||
.bx-core header {position: relative;}
|
||||
*/
|
||||
|
||||
main #bx-panel {
|
||||
position: fixed !important;
|
||||
|
||||
@ -6,14 +6,23 @@
|
||||
?>
|
||||
</main>
|
||||
<footer>
|
||||
<?
|
||||
$APPLICATION->IncludeComponent(
|
||||
"evolution:mobile.footer.menu",
|
||||
"",
|
||||
Array()
|
||||
);
|
||||
?>
|
||||
<div class="container">
|
||||
<ul class="column">
|
||||
<li><b>Программы</b></li>
|
||||
<?$APPLICATION->IncludeComponent(
|
||||
"evolution:leasing.programs.list",
|
||||
"footer",
|
||||
Array()
|
||||
);?>
|
||||
<?
|
||||
$APPLICATION->IncludeComponent(
|
||||
"evolution:leasing.programs.list",
|
||||
"footer",
|
||||
Array()
|
||||
);
|
||||
?>
|
||||
</ul>
|
||||
<ul class="column">
|
||||
<li><b>Каталог техники</b></li>
|
||||
|
||||
@ -30,11 +30,17 @@ document.addEventListener("DOMContentLoaded", function (event) {
|
||||
|
||||
const disablePrevNextBtns = (prevBtn, nextBtn, embla) => {
|
||||
return () => {
|
||||
if (embla.canScrollPrev()) prevBtn.removeAttribute("disabled");
|
||||
else prevBtn.setAttribute("disabled", "disabled");
|
||||
if(prevBtn !== null)
|
||||
{
|
||||
if (embla.canScrollPrev()) prevBtn.removeAttribute("disabled");
|
||||
else prevBtn.setAttribute("disabled", "disabled");
|
||||
}
|
||||
|
||||
if (embla.canScrollNext()) nextBtn.removeAttribute("disabled");
|
||||
else nextBtn.setAttribute("disabled", "disabled");
|
||||
if(nextBtn !== null)
|
||||
{
|
||||
if (embla.canScrollNext()) nextBtn.removeAttribute("disabled");
|
||||
else nextBtn.setAttribute("disabled", "disabled");
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@ -192,6 +198,17 @@ document.addEventListener("DOMContentLoaded", function (event) {
|
||||
}
|
||||
|
||||
|
||||
// Фильтры
|
||||
const filterBlock = document.querySelectorAll(".sort_selector");
|
||||
if (filterBlock.length > 0) {
|
||||
for (i = 0; i < filterBlock.length; i++) {
|
||||
filterBlock[i].querySelectorAll("button").forEach((block) => {
|
||||
block.addEventListener("click", (event) => {
|
||||
block.closest(".sort_selector").classList.toggle("open");
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Cookie
|
||||
|
||||
@ -34,77 +34,109 @@ $arUrlRewrite=array (
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
'CONDITION' => '#^/programs/([a-zA-Z0-9_-]+)/([0-9]+)/\\??.*$#',
|
||||
'RULE' => 'PROGRAM=$1&PAGEN_1=$2',
|
||||
'CONDITION' => '#^/programs/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/page-([0-9]+)/\\??.*$#',
|
||||
'RULE' => 'PROGRAM=$1&BRAND=$2&MODEL=$3&PAGEN_1=$4',
|
||||
'ID' => '',
|
||||
'PATH' => '/programs/entry.php',
|
||||
'SORT' => 5,
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
'CONDITION' => '#^/programs/([a-zA-Z0-9_-]+)/\\??.*$#',
|
||||
'RULE' => 'PROGRAM=$1',
|
||||
'CONDITION' => '#^/programs/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/page-([0-9]+)/\\??.*$#',
|
||||
'RULE' => 'PROGRAM=$1&BRAND=$2&PAGEN_1=$3',
|
||||
'ID' => '',
|
||||
'PATH' => '/programs/entry.php',
|
||||
'SORT' => 6,
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
'CONDITION' => '#^/catalog/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([0-9]+)/\\??.*$#',
|
||||
'RULE' => 'BRAND=$1&MODEL=$2&PAGEN_1=$3',
|
||||
'CONDITION' => '#^/programs/([a-zA-Z0-9_-]+)/page-([0-9]+)/\\??.*$#',
|
||||
'RULE' => 'PROGRAM=$1&PAGEN_1=$2',
|
||||
'ID' => '',
|
||||
'PATH' => '/catalog/index.php',
|
||||
'PATH' => '/programs/entry.php',
|
||||
'SORT' => 7,
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
'CONDITION' => '#^/catalog/([a-zA-Z0-9_-]+)/([0-9]+)/\\??.*$#',
|
||||
'RULE' => 'BRAND=$1&PAGEN_1=$2',
|
||||
'CONDITION' => '#^/programs/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/\\??.*$#',
|
||||
'RULE' => 'PROGRAM=$1&BRAND=$2&MODEL=$3',
|
||||
'ID' => '',
|
||||
'PATH' => '/catalog/index.php',
|
||||
'PATH' => '/programs/entry.php',
|
||||
'SORT' => 8,
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
'CONDITION' => '#^/programs/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/\\??.*$#',
|
||||
'RULE' => 'PROGRAM=$1&BRAND=$2',
|
||||
'ID' => '',
|
||||
'PATH' => '/programs/entry.php',
|
||||
'SORT' => 9,
|
||||
),
|
||||
9 =>
|
||||
array (
|
||||
'CONDITION' => '#^/programs/([a-zA-Z0-9_-]+)/\\??.*$#',
|
||||
'RULE' => 'PROGRAM=$1',
|
||||
'ID' => '',
|
||||
'PATH' => '/programs/entry.php',
|
||||
'SORT' => 10,
|
||||
),
|
||||
10 =>
|
||||
array (
|
||||
'CONDITION' => '#^/catalog/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/page-([0-9]+)/\\??.*$#',
|
||||
'RULE' => 'BRAND=$1&MODEL=$2&PAGEN_1=$3',
|
||||
'ID' => '',
|
||||
'PATH' => '/catalog/index.php',
|
||||
'SORT' => 11,
|
||||
),
|
||||
11 =>
|
||||
array (
|
||||
'CONDITION' => '#^/catalog/([a-zA-Z0-9_-]+)/page-([0-9]+)/\\??.*$#',
|
||||
'RULE' => 'BRAND=$1&PAGEN_1=$2',
|
||||
'ID' => '',
|
||||
'PATH' => '/catalog/index.php',
|
||||
'SORT' => 12,
|
||||
),
|
||||
12 =>
|
||||
array (
|
||||
'CONDITION' => '#^/catalog/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/(\\?(.*))?$#',
|
||||
'RULE' => 'BRAND=$1&MODEL=$2',
|
||||
'ID' => '',
|
||||
'PATH' => '/catalog/index.php',
|
||||
'SORT' => 9,
|
||||
'SORT' => 13,
|
||||
),
|
||||
9 =>
|
||||
13 =>
|
||||
array (
|
||||
'CONDITION' => '#^/catalog/([0-9]+)/\\??.*$#',
|
||||
'CONDITION' => '#^/catalog/page-([0-9]+)/\\??.*$#',
|
||||
'RULE' => 'PAGEN_1=$1',
|
||||
'ID' => '',
|
||||
'PATH' => '/catalog/index.php',
|
||||
'SORT' => 10,
|
||||
'SORT' => 14,
|
||||
),
|
||||
10 =>
|
||||
14 =>
|
||||
array (
|
||||
'CONDITION' => '#^/catalog/([a-zA-Z0-9_-]+)/(\\?(.*))?$#',
|
||||
'RULE' => 'BRAND=$1',
|
||||
'ID' => '',
|
||||
'PATH' => '/catalog/index.php',
|
||||
'SORT' => 11,
|
||||
'SORT' => 15,
|
||||
),
|
||||
12 =>
|
||||
15 =>
|
||||
array (
|
||||
'CONDITION' => '#^/car/([a-zA-Z0-9_-]+)/(\\?(.*))?$#',
|
||||
'RULE' => 'OFFER=$1',
|
||||
'ID' => '',
|
||||
'PATH' => '/catalog/position.php',
|
||||
'SORT' => 12,
|
||||
'SORT' => 16,
|
||||
),
|
||||
13 =>
|
||||
16 =>
|
||||
array (
|
||||
'CONDITION' => '#^/about/career/([0-9]+)/\\??.*$#',
|
||||
'CONDITION' => '#^/about/career/page-([0-9]+)/\\??.*$#',
|
||||
'RULE' => 'PAGEN_1=$1',
|
||||
'ID' => '',
|
||||
'PATH' => '/about/career/index.php',
|
||||
'SORT' => 20,
|
||||
),
|
||||
14 =>
|
||||
17 =>
|
||||
array (
|
||||
'CONDITION' => '#^/about/career/vacancy-([0-9]+)/\\??.*$#',
|
||||
'RULE' => 'ID=$1',
|
||||
@ -112,15 +144,15 @@ $arUrlRewrite=array (
|
||||
'PATH' => '/about/career/vacancy.php',
|
||||
'SORT' => 21,
|
||||
),
|
||||
15 =>
|
||||
18 =>
|
||||
array (
|
||||
'CONDITION' => '#^/about/news/([0-9]+)/\\??.*$#',
|
||||
'CONDITION' => '#^/about/news/page-([0-9]+)/\\??.*$#',
|
||||
'RULE' => 'PAGEN_1=$1',
|
||||
'ID' => '',
|
||||
'PATH' => '/about/news/index.php',
|
||||
'SORT' => 30,
|
||||
),
|
||||
16 =>
|
||||
19 =>
|
||||
array (
|
||||
'CONDITION' => '#^/about/news/([a-zA-Z0-9_-]+)\\??.*$#',
|
||||
'RULE' => 'CODE=$1',
|
||||
@ -128,7 +160,7 @@ $arUrlRewrite=array (
|
||||
'PATH' => '/about/news/detail.php',
|
||||
'SORT' => 31,
|
||||
),
|
||||
17 =>
|
||||
20 =>
|
||||
array (
|
||||
'CONDITION' => '#^/services/([a-zA-Z0-9_-]+)/\\??.*$#',
|
||||
'RULE' => 'CODE=$1',
|
||||
@ -136,7 +168,7 @@ $arUrlRewrite=array (
|
||||
'PATH' => '/services/entry.php',
|
||||
'SORT' => 40,
|
||||
),
|
||||
18 =>
|
||||
21 =>
|
||||
array (
|
||||
'CONDITION' => '#^/special/([a-zA-Z0-9_-]+)/\\??.*$#',
|
||||
'RULE' => 'OFFER=$1',
|
||||
@ -144,15 +176,15 @@ $arUrlRewrite=array (
|
||||
'PATH' => '/special/offer.php',
|
||||
'SORT' => 50,
|
||||
),
|
||||
19 =>
|
||||
22 =>
|
||||
array (
|
||||
'CONDITION' => '#^/revocation/([0-9]+)/\\??.*$#',
|
||||
'CONDITION' => '#^/revocation/page-([0-9]+)/\\??.*$#',
|
||||
'RULE' => 'PAGEN_1=$1',
|
||||
'ID' => '',
|
||||
'PATH' => '/about/revocation/index.php',
|
||||
'SORT' => 60,
|
||||
),
|
||||
20 =>
|
||||
23 =>
|
||||
array (
|
||||
'CONDITION' => '#^/revocation/\\??.*$#',
|
||||
'RULE' => '',
|
||||
@ -160,7 +192,7 @@ $arUrlRewrite=array (
|
||||
'PATH' => '/about/revocation/index.php',
|
||||
'SORT' => 70,
|
||||
),
|
||||
21 =>
|
||||
24 =>
|
||||
array (
|
||||
'CONDITION' => '#^/general-terms/\\??.*$#',
|
||||
'RULE' => '',
|
||||
@ -168,7 +200,7 @@ $arUrlRewrite=array (
|
||||
'PATH' => '/about/rules/index.php',
|
||||
'SORT' => 80,
|
||||
),
|
||||
22 =>
|
||||
25 =>
|
||||
array (
|
||||
'CONDITION' => '#^\\/?\\/mobileapp/jn\\/(.*)\\/.*#',
|
||||
'RULE' => 'componentName=$1',
|
||||
@ -176,7 +208,7 @@ $arUrlRewrite=array (
|
||||
'PATH' => '/bitrix/services/mobileapp/jn.php',
|
||||
'SORT' => 90,
|
||||
),
|
||||
23 =>
|
||||
26 =>
|
||||
array (
|
||||
'CONDITION' => '#^/rest/#',
|
||||
'RULE' => '',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user