Skip to content

Instantly share code, notes, and snippets.

View flayder's full-sized avatar
🏠
Working from home

Artem flayder

🏠
Working from home
View GitHub Profile
<?
include($_SERVER["DOCUMENT_ROOT"] . '/bitrix/modules/main/include/prolog_before.php');
CModule::IncludeModule('iblock');
$elID = trim($_REQUEST['id']);
$arFile = false;
$action = 'download';
if ($elID) {
$dbElement = CIBlockElement::GetList(
CMain::GetProperty - возвращает свойство страницы или свойство раздела.
<?
$keywords = $APPLICATION->GetProperty("keywords");
if (strlen($keywords)>0) echo $keywords;
?>
CMain::GetPageProperty - возвращает свойство страницы.
<?
$keywords = $APPLICATION->GetPageProperty("keywords");
<?require_once($_SERVER['DOCUMENT_ROOT']. "/bitrix/modules/main/include/prolog_before.php");?>
<?$APPLICATION->AddChainItem("навзание", "/путь к файлу на котором будет отображаться/");?>
foreach($arResult["PROPERTIES"]["код свойства"]["~VALUE"] as $photo): ?>
<li data-target="#myCarousel" data-slide-to=""><?$img = CFile::GetFileArray($photo); echo $img["DESCRIPTION"]?></li>
<?endforeach;?>
<?
foreach($arResult["PROPERTIES"]["код свойства"]["~VALUE"] as $photo) {
echo CFile::GetPath($photo);
}
?>
<?
if(CModule::IncludeModule("iblock"))
{
$res = CIBlock::GetList(Array("SORT"=>"ASC"),Array("ID"=>array(17, 18, 19)), false);
while($ar_res = $res->Fetch()) { ?>
<div class="section-item">
<a href="<?=$ar_res["SECTION_PAGE_URL"]?>">
<span class="section-img">
<img src="<?=CFile::GetPath($ar_res["PICTURE"]);?>" alt="<?=$ar_res["NAME"];?>"></span>
<span class="section-info">
<div class="basket">
<div class="lab">Корзина</div>
<input type="number" class="count-length" value="<?php echo WC()->cart->get_cart_contents_count(); ?>">
<span class="bas-price"><?php echo WC()->cart->get_cart_subtotal(); ?></span>
<a href="<?php echo WC()->cart->get_cart_url(); ?>" class="bas-inside"></a>
</div>
$pa_zubya = array_shift( wc_get_product_terms( $product->id, 'pa_zubya', array( 'fields' => 'names' ) ) );