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
.js_custom_sku_error_text{ | |
font-size: 16px; | |
line-height: 20px; | |
font-weight: 400; | |
letter-spacing: 0.3px; | |
color: red; | |
margin-bottom:10px; | |
display:none; | |
} |
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
<? | |
/* | |
* Нужно сделать так, чтобы в корзине выводилось | |
* наименование самого товара, а не ТП | |
* */ | |
$eventManager = \Bitrix\Main\EventManager::getInstance(); //подписываем обработчик на событие | |
$eventManager->addEventHandler( | |
"sale", | |
'OnBeforeSaleBasketItemSetField', |
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
<body> | |
<? | |
if(!!$arParams['__CUR_EVENT_TYPE']){ | |
$TEXT = ''; | |
if($arParams['__CUR_EVENT_TYPE'] == "SALE_ORDER_PAID") { | |
$TEXT = ""; | |
}elseif($arParams['__CUR_EVENT_TYPE'] == "SALE_NEW_ORDER"){ | |
$TEXT = " "; | |
}elseif($arParams['__CUR_EVENT_TYPE'] == "SUBSCRIBE_CONFIRM"){ | |
$TEXT = " "; |
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
<?$LOC_ID = false; | |
if (\Bitrix\Main\Loader::includeModule('twofingers.location') | |
&& $location = \TwoFingers\Location\Factory\LocationFactory::buildByStorage()) | |
{ | |
$LOC_ID = $location->getId(); // ID местоположения | |
} | |
?> | |
<?$APPLICATION->IncludeComponent( | |
"bitrix:news", | |
"contacts", |
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
<? | |
function getFilterBySlug($slug, $IBLOCK_ID, $arProperties){ | |
$arReturn = array(); | |
if($slug){ | |
\Bitrix\Main\Loader::includeModule('iblock'); | |
$properties = \Bitrix\Iblock\PropertyTable::getList(array( | |
'filter' => array( | |
"CODE" => $arProperties, | |
"IBLOCK_ID" => $IBLOCK_ID, |
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 | |
class makeIblockElementUnion{ | |
static function GetListFilter($IBLOCK_ID, $arFilter, $arUnionBy, $limit, $arInputSort = array()){ | |
\Bitrix\Main\Loader::includeModule('iblock'); | |
$CIBlockElement = \Bitrix\Iblock\Iblock::wakeUp($IBLOCK_ID)->getEntityDataClass(); | |
if($CIBlockElement){ | |
if(empty($arInputSort)){ | |
$arInputSort["ID"] = "ASC"; |
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
<? | |
$eventManager = \Bitrix\Main\EventManager::getInstance(); | |
$eventManager->addEventHandler('sale', '\Bitrix\Sale\Cashbox\Internals\CashboxCheck::OnBeforeAdd', 'StopPrintCheckForEmptyDeliveryService'); | |
function StopPrintCheckForEmptyDeliveryService(\Bitrix\Main\Event $event){ | |
$BITRIX_EMPTY_DELIVERY_ID = \Bitrix\Sale\Delivery\Services\EmptyDeliveryService::getEmptyDeliveryServiceId(); | |
$arParameters = $event->getParameters(); | |
$arFields = $arParameters['fields']; | |
if("sell" == $arFields['TYPE']){ |
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 SKU для установки SKU по умолчанию, исходя из умного фильтра. | |
* */ | |
function getOffersSelectedByFilter(&$arResult, &$arParams, $component){ | |
//https://pai-bx.com/wiki/1c-bitrix/2357-filtered-sku-in-products-list/ | |
if(!empty($arParams['FILTER_NAME'])){ | |
global ${$arParams['FILTER_NAME']}; | |
$FILTER = ${$arParams['FILTER_NAME']}; | |
if(!empty($FILTER) && !empty($FILTER['OFFERS']) ) { |
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 группы пользователей на первом сайте, а значения id соответствующей ему группы пользователей на втором. Примерно так: | |
$tableOfGroups = [ | |
'1' => 1, | |
'2' => 2, | |
'3' => 3, | |
'4' => 4, | |
'5' => 9, |
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
<? | |
AddEventHandler("main",'OnFileSave','OnFileSave'); | |
function OnFileSave(&$arFile, $fileName, $module) | |
{ | |
if(isUserInGroup(9)){ | |
unset($arFile['tmp_name']); // to delete | |
} | |
return false; // not true; true breaks event loop | |
} |
NewerOlder