<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
$this->setFrameMode(true);
use Bitrix\Main\Localization\Loc;
?>
<?
$this->addExternalJS("/bitrix/js/vendor/table.js");
?>
<section id="s-price" class="s-price" >
<div class="container" style="float: none">
<div class="row">
<h2 class="b-title ct2 text-center" style="margin-top:190px !important">Цены на пленки Shadow Guard</h2>
<?
$this->AddEditAction($arItem['ID'], $arItem['EDIT_LINK'], CIBlock::GetArrayByID($arItem["IBLOCK_ID"], "ELEMENT_EDIT"));
$this->AddDeleteAction($arItem['ID'], $arItem['DELETE_LINK'], CIBlock::GetArrayByID($arItem["IBLOCK_ID"], "ELEMENT_DELETE"), array("CONFIRM" => GetMessage('CT_BNL_ELEMENT_DELETE_CONFIRM')));
?>
<div class="pfrow d-filter">
<div class="pfcol-4"><span>Тип пленок</span>
<select class="drop" id="regionDropdown">
<option value="All">Показать все</option>
<? foreach($arResult["ITEMS"] as $arItem):?>
<? if(!empty($arItem['DISPLAY_PROPERTIES']['FILM_TYPES']['VALUE'])):?>
<option value="<?=$arItem['DISPLAY_PROPERTIES']['FILM_TYPES']['DISPLAY_VALUE'];?>"><?=$arItem['DISPLAY_PROPERTIES']['FILM_TYPES']['DISPLAY_VALUE'];?></option>
<? endif; ?>
<? endforeach; ?>
</select>
</div>
<div class="pfcol-4" style="border-left:2px solid white;border-right:2px solid white;"><span>Серия пленок</span>
<select class="drop" id="roleDropdown">
<option value="All">Показать все</option>
<? foreach($arResult["ITEMS"] as $arItem):?>
<? if(!empty($arItem['DISPLAY_PROPERTIES']['FILM_SERIES']['DISPLAY_VALUE'])):?>
<option value="<?=$arItem['DISPLAY_PROPERTIES']['FILM_SERIES']['DISPLAY_VALUE'];?>"><?=$arItem['DISPLAY_PROPERTIES']['FILM_SERIES']['DISPLAY_VALUE'];?></option>
<? endif; ?>
<? endforeach; ?>
</select>
</div>
<div class="pfcol-4"><span>Цвет пленок</span>
<?if(isset($arResult['FILM_TYPES']) && $arResult['FILM_TYPES']):?>
<select class="drop" id="regionDropdown">
<option value="All">Показать все</option>
<?foreach($arResult['FILM_TYPES']['DISPLAY_VALUE'] as $value):?>
<option value="<?=$value;?>"><?=$value;?></option>
<?endforeach;?>
</select>
<?endif;?>
</div>
</div>
<table class="table" style="margin-bottom:200px">
<thead>
<tr>
<th>Название</th>
<th style="display:none">Серия</th>
<th style="display:none">Тип</th>
<th>Цвет</th>
<th>Цена партии от 200 тр.</th>
<th>Цена партии от 100 тр.</th>
<th>Цена партии от 50 тр. до 100 тр.</th>
<th>Оптовая цена рулона</th>
<th>Цена рулона в нарезку</th>
<th>Розничная цена для держателей "Золотой карты Партнёра"</th>
<th>Розничная цена погонный метр</th>
<th>Гарантийный срок службы</th>
</tr>
</thead>
<tbody id="download-forms-table-tbody">
<? foreach($arResult["ITEMS"] as $arItem):?>
<tr>
<td style="vertical-align:middle"><?=$arItem['NAME']?></td>
<td class="price" style="display:none;vertical-align: middle"><?=$arItem["DISPLAY_PROPERTIES"]["FILM_SERIES"]["DISPLAY_VALUE"];?></td>
<td class="price" style="display:none;vertical-align: middle"><?=$arItem["DISPLAY_PROPERTIES"]["FILM_TYPES"]["DISPLAY_VALUE"];?></td>
<td class="price" style="vertical-align:middle"><?=$arItem["DISPLAY_PROPERTIES"]["PCOLOR"]["DISPLAY_VALUE"];?></td>
<td class="price" style="min-width:105px;vertical-align:middle;text-align:center"><?=$arItem["DISPLAY_PROPERTIES"]["PRICE200"]["DISPLAY_VALUE"];?> ₽</td>
<td class="price" style="vertical-align:middle;text-align:center"><?=$arItem["DISPLAY_PROPERTIES"]["PRICE100"]["DISPLAY_VALUE"];?> ₽</td>
<td class="price" style="vertical-align:middle;text-align:center"><?=$arItem["DISPLAY_PROPERTIES"]["PRICE50"]["DISPLAY_VALUE"];?> ₽</td>
<td class="price" style="vertical-align:middle;text-align:center"><?=$arItem["DISPLAY_PROPERTIES"]["OPT"]["DISPLAY_VALUE"];?> ₽</td>
<td class="price" style="vertical-align:middle;text-align:center"><?=$arItem["DISPLAY_PROPERTIES"]["CUT"]["DISPLAY_VALUE"];?> ₽</td>
<td class="price" style="vertical-align:middle;text-align:center"><?=$arItem["DISPLAY_PROPERTIES"]["PARTNER"]["DISPLAY_VALUE"];?> ₽</td>
<td class="price" style="vertical-align:middle;text-align:center"><?=$arItem["DISPLAY_PROPERTIES"]["LENGHT"]["DISPLAY_VALUE"];?> ₽</td>
<td class="price" style="vertical-align:middle;text-align:center"><?=$arItem["DISPLAY_PROPERTIES"]["WARRANTY"]["DISPLAY_VALUE"];?> лет</td>
</tr>
</tbody>
<? endforeach; ?>
</table>
</div>
</div>
<? include $_SERVER["DOCUMENT_ROOT"] . SITE_TEMPLATE_PATH . '/include/debug_info.php'; ?>
</section>
<?
if($arResult['ITEMS']) {
$arResult['FILE_TYPES'] = $filmTypes = [];
foreach($arResult['ITEMS'] as $key => $arItem) {
$filmTypesProp = isset($arItem['DISPLAY_PROPERTIES']['FILM_TYPES']) ? $arItem['DISPLAY_PROPERTIES']['FILM_TYPES'] : false;
$value = $filmTypesProp && $filmTypesProp['VALUE'] ? $filmTypesProp['VALUE'] : false;
$displayValue = $filmTypesProp && $filmTypesProp['DISPLAY_VALUE'] ? $filmTypesProp['DISPLAY_VALUE'] : false;
if($value && $displayValue) {
$filmTypes['VALUE'][] = $value;
$filmTypes['DISPLAY_VALUE'][] = $displayValue;
}
}
$arResult['FILE_TYPES'] = [
'VALUE' => array_values(array_unique($filmTypes['VALUE'])),
'DISPLAY_VALUE' => array_values(array_unique($filmTypes['DISPLAY_VALUE'])),
];
}