$product = Bitrix\Catalog\Model\Product::getList(array(
"filter" => array("ID" => $arItem["ID"])
))->Fetch();
if ($product["VAT_ID"]) {
$arVat = Bitrix\Catalog\VatTable::getById($product["VAT_ID"])->Fetch();
echo '<pre>';
print_r($arVat);
echo '</pre>';
exit;
}
<?php $APPLICATION->IncludeComponent(
"bitrix:catalog.compare.list",
"header",
Array(
"ACTION_VARIABLE" => "action",
"AJAX_MODE" => "Y",
"AJAX_OPTION_ADDITIONAL" => "",
"AJAX_OPTION_HISTORY" => "N",
"AJAX_OPTION_JUMP" => "N",
"AJAX_OPTION_STYLE" => "Y",
"COMPARE_URL" => "/catalog/compare/",
"DETAIL_URL" => "/catalog/#SECTION_CODE_PATH#/#ELEMENT_CODE#/",
"IBLOCK_ID" =>"Ваш ID инфоблока",
"IBLOCK_TYPE" => "Ваш тип инфоблока",
"NAME" => "CATALOG_COMPARE_LIST",
"POSITION" => "top right",
"POSITION_FIXED" => "N",
"PRODUCT_ID_VARIABLE" => "id"
)
);?>
let sendData = {}, sendDataIndex = {},
postData = new FormData(form);
for(const pair of postData.entries()) {
if (postData.getAll(pair[0]).length > 1) {
pair[0] = pair[0].replace(/\[\]/, "");
if (sendDataIndex[pair[0]] === undefined) {
sendDataIndex[pair[0]] = 0;
} else {
sendDataIndex[pair[0]]++;
}
pair[0] += "[" + sendDataIndex[pair[0]] + "]";
}
sendData[pair[0]] = pair[1];
}
// Получение основного типа цены
$arCatalogGroup = \Bitrix\Catalog\GroupTable::getList(array(
'filter' => array("BASE" => "Y")
))->fetch();
if (isset($arCatalogGroup["ID"]) && !empty($arCatalogGroup["ID"])) {
// Получение товара с минимальной ценой
$arMinPriceProduct = CIBlockElement::GetList(
Array('CATALOG_PRICE_'.$arCatalogGroup["ID"] => 'ASC'),
Array(
'IBLOCK_ID' => $arParams["IBLOCK_ID"],
'SECTION_ID' => $arResult["VARIABLES"]["SECTION_ID"]
),
false,
Array('nTopCount' => 1),
Array('ID', 'CATALOG_PRICE_'.$arCatalogGroup["ID"])
)->Fetch();
// Получение товара с максимальной ценой
$arMaxPriceProduct = CIBlockElement::GetList(
Array('CATALOG_PRICE_'.$arCatalogGroup["ID"] => 'DESC'),
Array(
'IBLOCK_ID' => $arParams["IBLOCK_ID"],
'SECTION_ID' => $arResult["VARIABLES"]["SECTION_ID"]
),
false,
Array('nTopCount' => 1),
Array('ID', 'CATALOG_PRICE_'.$arCatalogGroup["ID"])
)->Fetch();
$arSectionPriceRange = array(
"MIN" => array(
"PRICE" => $arMinPriceProduct["CATALOG_PRICE_".$arCatalogGroup["ID"]],
"CURRENCY" => $arMinPriceProduct["CATALOG_CURRENCY_".$arCatalogGroup["ID"]],
),
"MAX" => array(
"PRICE" => $arMaxPriceProduct["CATALOG_PRICE_".$arCatalogGroup["ID"]],
"CURRENCY" => $arMaxPriceProduct["CATALOG_CURRENCY_".$arCatalogGroup["ID"]],
)
);
}
function sassFunc() {
return gulp.src('app/sass/*.sass')
.pipe(sass())
.pipe(autoprefixer(['last 7 versions', '> 1%', 'ie 8', 'ie 7'], { cascade: true}))
.pipe(gulp.dest('app/css'))
.pipe(browserSync.reload({stream: true}))
}
gulp.task('sass', sassFunc);