This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
class CCustomTypeElementDateText{ | |
//описываем поведение пользовательского свойства | |
function GetUserTypeDescription() { | |
return array( | |
'PROPERTY_TYPE' => 'S', | |
'USER_TYPE' => 'history', | |
'DESCRIPTION' => 'История просрочки — дата со значением', //именно это будет выведено в списке типов свойств во вкладке редактирования свойств ИБ | |
//указываем необходимые функции, используемые в создаваемом типе |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? require_once($_SERVER['DOCUMENT_ROOT'] . "/bitrix/modules/main/include/prolog_before.php"); | |
use Bitrix\Main\Loader; | |
use Bitrix\Iblock\PropertyIndex; | |
Loader::includeModule("iblock"); | |
CBitrixComponent::includeComponentClass('bitrix:catalog.smart.filter'); | |
$iblockID = 3; | |
$iblockSkuID = 4; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use \Bitrix\Main\Application; | |
require_once($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php"); | |
global $APPLICATION; | |
$POST_RIGHT = $APPLICATION->GetGroupRight("main"); | |
if ($POST_RIGHT < "W") | |
$APPLICATION->AuthForm("Доступ запрещен"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SMART FILTER LINK // | |
$arSectionInfo = CIBlockSection::GetByID($arSmartFilter['SECTION_ID'])->GetNext(); | |
$sefSmartUrl = $arSectionInfo['SECTION_PAGE_URL'] . "filter/#SMART_FILTER_PATH#/"; | |
foreach($arResult["ITEMS"] as $PID => $arItem) | |
{ | |
$code = null; | |
if ($arItem["CODE"]){ | |
$code = toLower($arItem["CODE"]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
use Bitrix\Main\IO\File; | |
use Bitrix\Main\Text\Converter; | |
use Bitrix\Seo\SitemapRuntime; | |
class SitemapRuntimeCustom extends SitemapRuntime | |
{ | |
const ENTRY_TPL_NEW = '<url><loc>%s</loc><lastmod>%s</lastmod><changefreq>weekly</changefreq><priority>0.9</priority></url>'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
//Для запуска необходимой карты укажите в адресе ее ID, пример: | |
//sitemap_run.php?action=sitemap_run&ID=2&lang=ru | |
$_SERVER['DOCUMENT_ROOT'] = realpath(dirname(__FILE__) . '/../../..'); | |
if($argv){ | |
unset($argv[0]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php"); | |
$iblockId = (int)$_REQUEST['iblock']; | |
$page = isset($_REQUEST['page']) ? (int)$_REQUEST['page'] : 1; | |
$pageSize = 70; | |
$isEnd = true; | |
if ($iblockId <= 0) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
если при проверке системы появилась ошибка | |
ALTER TABLE `b_user_hit_auth` MODIFY `TIMESTAMP_X` datetime NULL DEFAULT NULL ; | |
лечится: | |
ALTER TABLE `b_user_hit_auth` CHANGE `TIMESTAMP_X` `TIMESTAMP_X` DATETIME NULL DEFAULT NULL; */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Включаем кэш в браузерах посетителей | |
<ifModule mod_headers.c> | |
# Все html и htm файлы будут храниться в кэше браузера один день | |
<FilesMatch "\.(html|htm)$"> | |
Header set Cache-Control "max-age=43200" | |
</FilesMatch> | |
# Все css, javascript и текстовые файлы будут храниться в кэше браузера одну неделю | |
<FilesMatch "\.(js|css|txt)$"> | |
Header set Cache-Control "max-age=604800" | |
</FilesMatch> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$price = CCatalogProduct::GetOptimalPrice($getElemData['ID'], 1, $USER->GetUserGroupArray(), 'N'); | |
$arDiscounts = CCatalogDiscount::GetDiscountByProduct($getElemData['ID'], $USER->GetUserGroupArray(), "N", array(),SITE_ID); | |
if(is_array($arDiscounts) && sizeof($arDiscounts) > 0) { | |
$final_price = CCatalogProduct::CountPriceWithDiscount($price['PRICE']['PRICE'], $price['PRICE']['CURRENCY'], $arDiscounts); | |
$this->arResult['PRODUCT']['PRICE'] = CCurrencyLang::CurrencyFormat($final_price,$price['PRICE']['CURRENCY']); | |
} |
NewerOlder