Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <? if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die();
- $this->setFrameMode(true);
- $CurPage = $APPLICATION->GetCurDir(true);
- //echo '<pre>';
- $arNeedPropd = array('PRICE', 'PRESSURE', 'CONNECT', 'HOUSING', 'COMPACTION', 'TEMP', 'DIAMETERS');
- $arProducts=$arProps=array();
- $temp=$db_temp='';
- foreach ($arResult["ITEMS"] as $cell => $arElement)
- {
- $arProducts[] = $arElement;
- foreach($arNeedPropd as $prop)
- {
- $db_temp = CIBlockElement::GetProperty(4, $arElement['ID'], array("sort" => "asc"), Array("CODE"=>$prop));
- if($ar_temp = $db_temp->Fetch())
- $arProps[$arElement['ID']][$prop] = $ar_temp['VALUE'];// == '' ? 'не указано' : $ar_temp['VALUE'];
- }
- $db_temp = CIBlockSection::GetByID($arElement["IBLOCK_SECTION_ID"]);
- if($ar_temp = $db_temp->Fetch())
- {
- $arProps[$arElement['ID']]['BRAND_MIN'] = $ar_temp['NAME'];
- $db_temp = CIBlockSection::GetByID($ar_temp["IBLOCK_SECTION_ID"]);
- if($ar_temp = $db_temp->Fetch())
- $arProps[$arElement['ID']]['BRAND'] = $ar_temp['NAME'];
- //print_r($ar_temp);
- }
- }
- //print_r($arProps);
- //echo '</pre>';
- ?>
- <div class="rowsize">
- <div class="filter-group-result-contents">
- <div class="filter-group-result-title">
- Показано на странице: <?= count($arResult["ITEMS"]) ?>
- </div>
- <div class="similarbl">
- <table>
- <tbody>
- <tr>
- <td class="">
- <div>Наименование</div>
- </td>
- <? foreach($arProducts as $product): ?>
- <td class="">
- <div>
- <a href="<?=$product["DETAIL_PAGE_URL"]?>"
- class="text-name small blue" target="_blank"><?=$product["NAME"]?> <br><img
- src="<?= CFile::ResizeImageGet($product["PREVIEW_PICTURE"], Array("width" => 150, "height" => 150), BX_RESIZE_IMAGE_PROPORTIONAL, false)['src'] ?>"></a>
- </div>
- </td>
- <? endforeach; ?>
- </tr>
- <tr>
- <td class="">
- <div>Цена с НДС</div>
- </td>
- <? foreach($arProducts as $product): ?>
- <td class="">
- <div><?= $arProps[$product['ID']]['PRICE'] != '' ? $arProps[$product['ID']]['PRICE'].' руб.' : 'не указано' ?></div>
- </td>
- <? endforeach; ?>
- </tr>
- <tr>
- <td class="">
- <div>Производитель</div>
- </td>
- <? foreach($arProducts as $product): ?>
- <td class="">
- <div><?= $arProps[$product['ID']]['BRAND'] ?><br/><?=$arProps[$product['ID']]['BRAND_MIN']?></div>
- </td>
- <? endforeach; ?>
- </tr>
- <tr>
- <td class="">
- <div>Диаметр</div>
- </td>
- <? foreach($arProducts as $product): ?>
- <td class="">
- <div><?= $arProps[$product['ID']]['DIAMETERS'] != '' ? $arProps[$product['ID']]['DIAMETERS'] : 'не указано' ?></div>
- </td>
- <? endforeach; ?>
- </tr>
- <tr>
- <td class="">
- <div>Давление номинальное</div>
- </td>
- <? foreach($arProducts as $product): ?>
- <td class="">
- <div><?= $arProps[$product['ID']]['PRESSURE'] != '' ? $arProps[$product['ID']]['PRESSURE'].' бар' : 'не указано' ?></div>
- </td>
- <? endforeach; ?>
- </tr>
- <tr>
- <td class="">
- <div>Тип присоединения</div>
- </td>
- <? foreach($arProducts as $product): ?>
- <td class="">
- <div><?= $arProps[$product['ID']]['CONNECT'] != '' ? $arProps[$product['ID']]['CONNECT'] : 'не указано' ?></div>
- </td>
- <? endforeach; ?>
- </tr>
- <tr>
- <td class="">
- <div>Корпус</div>
- </td>
- <? foreach($arProducts as $product): ?>
- <td class="">
- <div><?= $arProps[$product['ID']]['HOUSING'] != '' ? $arProps[$product['ID']]['HOUSING'] : 'не указано' ?></div>
- </td>
- <? endforeach; ?>
- </tr>
- <tr>
- <td class="">
- <div>Уплотнение</div>
- </td>
- <? foreach($arProducts as $product): ?>
- <td class="">
- <div><?= $arProps[$product['ID']]['COMPACTION'] != '' ? $arProps[$product['ID']]['COMPACTION'] : 'не указано' ?></div>
- </td>
- <? endforeach; ?>
- </tr>
- <tr>
- <td class="">
- <div class="filter-select single-column refinement">
- <div class="filter-choice"><span
- class="for-text"><span>Температура</span></span>
- </div>
- </div>
- </td>
- <? foreach($arProducts as $product): ?>
- <td class="">
- <div><?= $arProps[$product['ID']]['TEMP'] != '' ? $arProps[$product['ID']]['TEMP'].' °С' : 'не указано' ?></div>
- </td>
- <? endforeach; ?>
- </tr>
- <tr>
- <td class="">
- <div>В корзину</div>
- </td>
- <? foreach($arProducts as $product): ?>
- <td class="">
- <div>
- <form action="<?= POST_FORM_ACTION_URI ?>" method="post" enctype="multipart/form-data" class="add_form">
- <!-- <input type="text" name="QUANTITY" value="1" size="5" style="display: none;">-->
- <!-- <input type="hidden" name="--><?//= $arResult["ACTION_VARIABLE"] ?><!--" value="BUY">-->
- <!-- <input type="hidden" name="--><?//= $arResult["PRODUCT_ID_VARIABLE"] ?><!--" value="--><?//= $arElement["ID"] ?><!--">-->
- <input type="hidden" value="Купить" name="actionBUY"/>
- <input type="hidden" name="action" value="BUY"/>
- <input type="hidden" name="id" value="<?= $product['ID'] ?>"/>
- <div class="eshop-cart-product-add">
- <div class="form-control-count">
- <div class="form-control-count-wr">
- <input class="form-control" type="text" min="1" name="QUANTITY" maxlength="3" value="1" id="QUANTITY<?= $product['ID'] ?>"/>
- <button type="button" class="act plus" onclick="BX('QUANTITY<?= $product['ID'] ?>').value++;"></button>
- <button type="button" class="act minus" onclick="if (BX('QUANTITY<?= $product['ID'] ?>').value > 1) BX('QUANTITY<?= $product['ID'] ?>').value--;"></button>
- </div>
- </div>
- <!-- <a href = "#" class="icon-basket-small eshop-cart-product-up"></a>-->
- <input class="icon-basket-small eshop-cart-product-up" type="submit" name="actionADD2BASKET" value="<?= GetMessage("CATALOG_BUY") ?>">
- </div>
- </form>
- </div>
- </td>
- <? endforeach; ?>
- </tr>
- </tbody> <!---->
- </table> <!---->
- </div>
- <!-- <ul class="pagination">-->
- <!-- <li class="disabled"><span>«</span></li>-->
- <!-- <li class="active"><span>1</span></li>-->
- <!-- <li class=""><a href="/sharovyi-kran?display_id=165&field_dn[]=2491&page=2">2</a></li>-->
- <!-- <li class=""><a href="/sharovyi-kran?display_id=165&field_dn[]=2491&page=3">3</a></li>-->
- <!-- <li class=""><a href="/sharovyi-kran?display_id=165&field_dn[]=2491&page=4">4</a></li>-->
- <!-- <li class=""><a href="/sharovyi-kran?display_id=165&field_dn[]=2491&page=5">5</a></li>-->
- <!-- <li class=""><a href="/sharovyi-kran?display_id=165&field_dn[]=2491&page=6">6</a></li>-->
- <!-- <li class=""><a href="/sharovyi-kran?display_id=165&field_dn[]=2491&page=7">7</a></li>-->
- <!-- <li class=""><a href="/sharovyi-kran?display_id=165&field_dn[]=2491&page=8">8</a></li>-->
- <!-- <li class="disabled"><span>...</span></li>-->
- <!-- <li class=""><a href="/sharovyi-kran?display_id=165&field_dn[]=2491&page=27">27</a></li>-->
- <!-- <li class=""><a href="/sharovyi-kran?display_id=165&field_dn[]=2491&page=28">28</a></li>-->
- <!-- <li class=""><a href="/sharovyi-kran?display_id=165&field_dn[]=2491&page=2" rel="next">»</a>-->
- <!-- </li>-->
- <!-- </ul>-->
- <?=$arResult['NAV_STRING']?>
- <script>
- function add2wish(p_id, pp_id, p, name, dpu, th) {
- $.ajax({
- type: "POST",
- url: "/local/ajax/wishlist.php",
- data: "p_id=" + p_id + "&pp_id=" + pp_id + "&p=" + p + "&name=" + name + "&dpu=" + dpu,
- success: function (html) {
- $(th).addClass('in_wishlist');
- $('#wishcount').html(html);
- }
- });
- };
- </script>
- </div>
- </div>
- <? if ( (CSite::InDir('/catalog/')) || (CSite::InDir('/search/')) ) { //Если каталог или поиск?>
- <?= $arResult["NAV_STRING"] ?>
- <?}?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement