This file contains hidden or 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
Создал блок не забудь прописать правило в | |
utlrewrite.php | |
24 => | |
array ( | |
'CONDITION' => '#^/company/our-partners/#', | |
'RULE' => '', | |
'ID' => 'bitrix:news', | |
'PATH' => '/company/our-partners/index.php', | |
'SORT' => 100, | |
), |
This file contains hidden or 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
//Оригинал | |
<p style="margin-top: 0; margin-bottom: 20px; line-height: 20px;">Для получения подробной информации по заказу пройдите на сайт http://#SERVER_NAME#/personal/history-of-orders/order_detail.php?ID=#ORDER_ACCOUNT_NUMBER_ENCODE#/</p> |
This file contains hidden or 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; | |
Main\EventManager::getInstance()->addEventHandler( | |
'sale', | |
'OnSaleOrderBeforeSaved', | |
'saleOrderBeforeSaved' | |
); | |
function saleOrderBeforeSaved(Main\Event $event) | |
{ |
This file contains hidden or 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, сгруппированые по группам свойств | |
$db_props = CSaleOrderPropsValue::GetOrderProps($ORDER_ID); | |
$iGroup = -1; | |
while ($arProps = $db_props->Fetch()) | |
{ | |
If ($arProps["ORDER_PROPS_ID"]==21){ | |
$arVal = CSaleOrderPropsVariant::GetByValue($arProps["ORDER_PROPS_ID"], $arProps["VALUE"]); | |
echo htmlspecialchars($arVal["NAME"]); | |
} |
This file contains hidden or 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, сгруппированые по группам свойств | |
$db_props = CSaleOrderPropsValue::GetOrderProps($ID); | |
$iGroup = -1; | |
while ($arProps = $db_props->Fetch()) | |
{ | |
if ($iGroup!=IntVal($arProps["PROPS_GROUP_ID"])) | |
{ | |
echo "<b>".$arProps["GROUP_NAME"]."</b><br>"; | |
$iGroup = IntVal($arProps["PROPS_GROUP_ID"]); |
This file contains hidden or 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 getShopObjectByStoreID($store_id){ | |
$arSelect = [ | |
"ID", | |
"NAME", | |
"PROPERTY_STORE_ID", | |
"PROPERTY_TTCODE", | |
"PROPERTY_TTNAME", | |
]; | |
$arFilter = [ | |
"IBLOCK_ID" => 34, |
This file contains hidden or 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
<? | |
// выберем все активные информационные блоки для текущего сайта типа catalog | |
// у которых символьный код не my_products, со счетчиком активных элементов. | |
$res = CIBlock::GetList( | |
Array(), | |
Array( | |
//'TYPE'=>'catalog', | |
'SITE_ID'=>'s1', | |
//'ACTIVE'=>'Y', | |
//"CNT_ACTIVE"=>"Y", |
This file contains hidden or 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
$res = CIBlockElement::GetList( | |
false, | |
$arFilter, | |
false, | |
false, | |
$arSelect); | |
while ($ob = $res->GetNextElement()) { | |
$discount_sign = $ob->fields['PROPERTY_DISCOUNT_VALUE']; | |
This file contains hidden or 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 getArrayOfPropertyValues($ELEMENT_ID, $PROPERTY_CODE) | |
{ | |
$arrValues = []; | |
//Получаем значение свойств инфоблока | |
$db_props = CIBlockElement::GetProperty( | |
MAIN_CATALOG_IB_ID, | |
$ELEMENT_ID, |
This file contains hidden or 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
$property_enums = CIBlockPropertyEnum::GetList(Array("DEF"=>"DESC", "SORT"=>"ASC"), Array("IBLOCK_ID"=>$IBLOCK_ID, "XML_ID"=>"COLORS")); | |
if($enum_fields = $property_enums->GetNext()) | |
$res = CIBlockElement::GetList(Array(), array("IBLOCK_ID"=>$IBLOCK_ID, "=PROPERTY_LIST"=>$enum_fields["ID"]), false, false, array("ID", "NAME")); | |
Изменено: Игорь Кудряшов - 11.01.2012 11:21:50 | |