This file contains 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 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
var gulp = require('gulp'); | |
var rename = require("gulp-rename"); | |
var uglify = require('gulp-uglify'); | |
var cleanCSS = require('gulp-clean-css'); | |
var templateName = 'main'; | |
var imagemin = require('gulp-imagemin'); | |
gulp.task('imagemin',function () { | |
return gulp.src([ | |
templateName + '/**/*.{png,gif,jpg,jpeg,svg}', |
This file contains 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
{ | |
"devDependencies": { | |
"gulp": "^3.9.1", | |
"gulp-clean-css": "^2.0.13", | |
"gulp-imagemin": "^3.2.0", | |
"gulp-rename": "^1.2.2", | |
"gulp-uglify": "^2.0.0" | |
} | |
} |
This file contains 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 SenderTriggerUserGroup extends \Bitrix\Sender\Trigger { | |
public function getName() { | |
return 'Первый заход на сайт (+группа)'; | |
} | |
public function getCode() { | |
return "user_group"; | |
} |
This file contains 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']); | |
} |
This file contains 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 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 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 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 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>'; |
OlderNewer