JCSmartFilter.prototype.gatherInputsValues = function (values, elements)
{
if(elements)
{
for(var i = 0; i < elements.length; i++)
{
var el = elements[i];
if (el.disabled || !el.type)
continue;
switch(el.type.toLowerCase())
{
case 'text':
case 'textarea':
case 'password':
case 'hidden':
case 'number':
case 'phone':
case 'email':
case 'select-one':
if(el.value.length)
values[values.length] = {name : el.name, value : el.value};
break;
case 'radio':
case 'checkbox':
if(el.checked)
values[values.length] = {name : el.name, value : el.value};
break;
case 'select-multiple':
for (var j = 0; j < el.options.length; j++)
{
if (el.options[j].selected)
values[values.length] = {name : el.name, value : el.options[j].value};
}
break;
default:
break;
}
}
}
};
\Bitrix\Catalog\Model\Product::update($id, ['SUBSCRIBE' => 'Y']);
"FILTER_NAME" => "searchFilter"
$itemIds = [];
// здесь укажи ИД своего инфоблока (или массив инфоблоков)
$iblockId = 1;
// здесь значение из get (я наугад написал filial)
$filial = $_GET['filial'];
$iterator = \CIBlockElement::GetList([], ['IBLOCK_ID' => $iblockId, 'PROPERTY_FILIAL' => $filial], false, false, ['ID']);
while($row = $iterator->Fetch()) {
$itemIds[] = $row['ID'];
}
$GLOBALS['searchFilter'] = ['ITEM_ID' => $itemIds];
CSite::inDir('/')
CSite::inDir('/index.php')
$eventManager = \Bitrix\Main\EventManager::getInstance();
$eventManager->addEventHandler('sale', '\Bitrix\Sale\Internals\Order::onUpdate', ['OrderEvents', 'onUpdate']);
class OrderEvents {
public static function onUpdate(\Bitrix\Main\Event $event) {
$fields = $event->getParameters()['fields'];
}
}
Как включить кэширование компонента bitrix:sale.basket.basket.line ?
В корзине у компонентов включён кэш, компонент на странице сайта отображающийся корзина кэширование включено
\Bitrix\Main\Config\Option::set('sale', 'pay_system_log_level', 0);
$variables['SECTION_CODE_PATH'] = $arResult['VARIABLES']['SECTION_CODE_PATH'].'/'.$arResult['VARIABLES']['ELEMENT_CODE'];
CIBlockFindTools::checkSection($arParams['IBLOCK_ID'], $variables);
if(isset($variables['SECTION_ID']) && $variables['SECTION_ID']) {
// здесь для разделов редирект
}
else {
// здесь для элементов
}
echo '<pre>';
print_r($_SESSION);
echo '</pre>';
$gridId = 'tbl_iblock_section_0a75985155564046e50b0575794cf3ee';
$grid = new \Bitrix\Main\Grid\Options($gridId);
$grid->deleteView('default');
unset($arFields["ENTITY_ID"]);
unset($arFields["FIELD_NAME"]);
unset($arFields["USER_TYPE_ID"]);
unset($arFields["MULTIPLE"]);
"SEF_URL_TEMPLATES" => array(
"sections"=>"",
"section"=>"section/#SECTION_CODE#/",
"element"=>"kkm/#ELEMENT_CODE#/",
"compare"=>"compare/",
"smart_filter"=>"section/#SECTION_CODE_PATH#/filter/#SMART_FILTER_PATH#/apply/",
"question" => "kkm/#ELEMENT_CODE#/question/"
)
$result = \Bitrix\Sale\Internals\OrderChangeTable::getList(array(
'order'=>array('DATE_CREATE'=>'DESC','ID'=>'DESC'),
'filter'=>array('ORDER_ID'=>1319)
));
public static function getManagerLogItems()
{
return array(
"ORDER_SYNCHRONIZATION_IMPORT",
"ORDER_SYNCHRONIZATION_EXPORT",
"ORDER_SYNCHRONIZATION_EXPORT_ERROR",
"ORDER_ADDED",
"ORDER_DEDUCTED",
"ORDER_MARKED",
"ORDER_RESERVED",
"ORDER_CANCELED",
"ORDER_COMMENTED",
"ORDER_STATUS_CHANGED",
"ORDER_DELIVERY_ALLOWED",
"ORDER_DELIVERY_DOC_CHANGED",
"ORDER_PAYMENT_SYSTEM_CHANGED",
"ORDER_PAYMENT_VOUCHER_CHANGED",
"ORDER_DELIVERY_SYSTEM_CHANGED",
"ORDER_PERSON_TYPE_CHANGED",
"ORDER_PAYED",
"ORDER_TRACKING_NUMBER_CHANGED",
"ORDER_USER_DESCRIPTION_CHANGED",
"ORDER_PRICE_DELIVERY_CHANGED",
"ORDER_PRICE_CHANGED",
"ORDER_RESPONSIBLE_CHANGE",
"BASKET_ADDED",
"BASKET_REMOVED",
"BASKET_QUANTITY_CHANGED",
"BASKET_PRICE_CHANGED",
"PAYMENT_ADDED",
"PAYMENT_REMOVED",
"PAYMENT_PAID",
"PAYMENT_SYSTEM_CHANGED",
"PAYMENT_VOUCHER_CHANGED",
"PAYMENT_PRICE_CHANGED",
"SHIPMENT_ADDED",
"SHIPMENT_REMOVED",
"SHIPMENT_ITEM_BASKET_ADDED",
"SHIPMENT_ITEM_BASKET_REMOVED",
"SHIPMENT_DELIVERY_ALLOWED",
"SHIPMENT_SHIPPED",
"SHIPMENT_MARKED",
"SHIPMENT_RESERVED",
"SHIPMENT_CANCELED",
"SHIPMENT_STATUS_CHANGED",
"SHIPMENT_DELIVERY_DOC_CHANGED",
"SHIPMENT_TRACKING_NUMBER_CHANGED",
"SHIPMENT_PRICE_DELIVERY_CHANGED",
"SHIPMENT_AMOUNT_CHANGED",
"SHIPMENT_QUANTITY_CHANGED",
"SHIPMENT_RESPONSIBLE_CHANGE",
"ORDER_UPDATE_ERROR",
"BASKET_ITEM_ADD_ERROR",
"BASKET_ITEM_UPDATE_ERROR",
"SHIPMENT_ADD_ERROR",
"SHIPMENT_UPDATE_ERROR",
"SHIPMENT_ITEM_ADD_ERROR",
"SHIPMENT_ITEM_UPDATE_ERROR",
"SHIPMENT_ITEM_STORE_ADD_ERROR",
"SHIPMENT_ITEM_STORE_UPDATE_ERROR",
"SHIPMENT_ITEM_BASKET_ITEM_EMPTY_ERROR",
);
}
$iblockId = $arParams["REVIEW_IBLOCK_ID"];
$properties = $elements = [];
$iterator = \Bitrix\Iblock\PropertyTable::getList([
'select' => ['CODE'],
'filter' => ['IBLOCK_ID' => $iblockId, 'ACTIVE' => 'Y'],
]);
while($row = $iterator->fetch()) {
$propertyCode = $row['CODE'];
if(strpos($propertyCode, 'UF_404_') !== false) {
$properties[] = 'PROPERTY_'.$propertyCode;
}
}
$arSelect = Array("ID", "IBLOCK_ID", "DETAIL_TEXT");
$arSelect = array_merge($arSelect, $properties);
$arFilter = Array("IBLOCK_ID" => $iblockId, "CODE" => !empty($arParams["USE_SKU"]) ? $arBaseProduct["ID"] : $arResult["ID"]);
$res = CIBlockElement::GetList(Array("SORT" => "ASC", "CREATED_DATE"), $arFilter, false, false, $arSelect);