Vinoteca: wine shop on 1C-Bitrix (module, template, components, pages)

This commit is contained in:
jimagie committed 2026-10-22 19:35:23 +05:00
commit 0590195880
593 files changed
+27942

No files matched your search

+54
View File
@@ -0,0 +1,54 @@
<?php
require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/header.php");
$requestPath = (string)parse_url((string)$_SERVER["REQUEST_URI"], PHP_URL_PATH);
if ($requestPath !== mb_strtolower($requestPath)) {
$query = (string)parse_url((string)$_SERVER["REQUEST_URI"], PHP_URL_QUERY);
LocalRedirect(VINO_HOST . mb_strtolower($requestPath) . ($query !== "" ? "?" . $query : ""), true, "301 Moved Permanently");
}
\Bitrix\Main\Page\Asset::getInstance()->addCss(SITE_TEMPLATE_PATH . "/catalog-styles.css");
$APPLICATION->SetPageProperty("og_image", VINO_HOST . SITE_TEMPLATE_PATH . "/assets/media/og-catalog.jpg");
$APPLICATION->IncludeComponent("bitrix:news", "vinoteca-brands", array(
"IBLOCK_TYPE" => "catalog",
"IBLOCK_ID" => VINO_BRANDS_IBLOCK,
"NEWS_COUNT" => "100",
"SORT_BY1" => "SORT",
"SORT_ORDER1" => "ASC",
"SORT_BY2" => "NAME",
"SORT_ORDER2" => "ASC",
"CHECK_DATES" => "Y",
"SEF_MODE" => "Y",
"SEF_FOLDER" => SITE_DIR . "brands/",
"SEF_URL_TEMPLATES" => array(
"news" => "",
"section" => "",
"detail" => "#ELEMENT_CODE#/",
),
"LIST_FIELD_CODE" => array("PREVIEW_PICTURE"),
"LIST_PROPERTY_CODE" => array("COUNTRY", "REGION"),
"DETAIL_FIELD_CODE" => array("PREVIEW_TEXT", "PREVIEW_PICTURE", "DETAIL_PICTURE"),
"DETAIL_PROPERTY_CODE" => array("COUNTRY", "REGION", "REGION_FULL", "FOUNDED", "GRAPE"),
"USE_SEARCH" => "N",
"USE_RSS" => "N",
"USE_RATING" => "N",
"USE_CATEGORIES" => "N",
"USE_FILTER" => "N",
"USE_REVIEW" => "N",
"USE_PERMISSIONS" => "N",
"AJAX_MODE" => "N",
"CACHE_TYPE" => "A",
"CACHE_TIME" => "36000000",
"CACHE_FILTER" => "N",
"CACHE_GROUPS" => "Y",
"SET_TITLE" => "Y",
"SET_LAST_MODIFIED" => "N",
"INCLUDE_IBLOCK_INTO_CHAIN" => "N",
"ADD_SECTIONS_CHAIN" => "N",
"ADD_ELEMENT_CHAIN" => "Y",
"DISPLAY_TOP_PAGER" => "N",
"DISPLAY_BOTTOM_PAGER" => "N",
"SET_STATUS_404" => "Y",
"SHOW_404" => "Y",
"FILE_404" => "",
"MESSAGE_404" => "",
), false);
require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/footer.php");