当前位置: 首页>>代码示例>>PHP>>正文


PHP CIBlockPriceTools::getTreeProperties方法代码示例

本文整理汇总了PHP中CIBlockPriceTools::getTreeProperties方法的典型用法代码示例。如果您正苦于以下问题:PHP CIBlockPriceTools::getTreeProperties方法的具体用法?PHP CIBlockPriceTools::getTreeProperties怎么用?PHP CIBlockPriceTools::getTreeProperties使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CIBlockPriceTools的用法示例。


在下文中一共展示了CIBlockPriceTools::getTreeProperties方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: unset

 }
 unset($strEmptyPreview);
 $arSKUPropList = array();
 $arSKUPropIDs = array();
 $arSKUPropKeys = array();
 $boolSKU = false;
 $strBaseCurrency = '';
 $boolConvert = isset($arResult['CONVERT_CURRENCY']['CURRENCY_ID']);
 if ($arResult['MODULES']['catalog']) {
     if (!$boolConvert) {
         $strBaseCurrency = CCurrency::GetBaseCurrency();
     }
     $arSKU = CCatalogSKU::GetInfoByProductIBlock($arParams['IBLOCK_ID']);
     $boolSKU = !empty($arSKU) && is_array($arSKU);
     if ($boolSKU && !empty($arParams['OFFER_TREE_PROPS']) && 'Y' == $arParams['PRODUCT_DISPLAY_MODE']) {
         $arSKUPropList = CIBlockPriceTools::getTreeProperties($arSKU, $arParams['OFFER_TREE_PROPS'], array('PICT' => $arEmptyPreview, 'NAME' => '-'));
         $arNeedValues = array();
         CIBlockPriceTools::getTreePropertyValues($arSKUPropList, $arNeedValues);
         $arSKUPropIDs = array_keys($arSKUPropList);
         if (empty($arSKUPropIDs)) {
             $arParams['PRODUCT_DISPLAY_MODE'] = 'N';
         } else {
             $arSKUPropKeys = array_fill_keys($arSKUPropIDs, false);
         }
     }
 }
 $arNewItemsList = array();
 foreach ($arResult['ITEMS'] as $key => $arItem) {
     $arItem['CHECK_QUANTITY'] = false;
     if (!isset($arItem['CATALOG_MEASURE_RATIO'])) {
         $arItem['CATALOG_MEASURE_RATIO'] = 1;
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:31,代码来源:result_modifier.php

示例2: array

 $skuPropKeys = array();
 // array("id_catalog" => array(...))
 if (!$boolConvert) {
     $strBaseCurrency = CCurrency::GetBaseCurrency();
 }
 $catalogs = array();
 foreach ($arResult['CATALOGS'] as $catalog) {
     $offersCatalogId = (int) $catalog['OFFERS_IBLOCK_ID'];
     $offersPropId = (int) $catalog['OFFERS_PROPERTY_ID'];
     $catalogId = (int) $catalog['IBLOCK_ID'];
     $sku = false;
     if ($offersCatalogId > 0 && $offersPropId > 0) {
         $sku = array("IBLOCK_ID" => $offersCatalogId, "SKU_PROPERTY_ID" => $offersPropId, "PRODUCT_IBLOCK_ID" => $catalogId);
     }
     if (!empty($sku) && is_array($sku)) {
         $skuPropList[$catalogId] = CIBlockPriceTools::getTreeProperties($sku, $arParams['OFFER_TREE_PROPS'][$offersCatalogId], array('PICT' => $arEmptyPreview, 'NAME' => '-'));
         $needValues = array();
         CIBlockPriceTools::getTreePropertyValues($skuPropList[$catalogId], $needValues);
         $skuPropIds[$catalogId] = array_keys($skuPropList[$catalogId]);
         if (!empty($skuPropIds[$catalogId])) {
             $skuPropKeys[$catalogId] = array_fill_keys($skuPropIds[$catalogId], false);
         }
     }
 }
 $arNewItemsList = array();
 foreach ($arResult['ITEMS'] as $key => $arItem) {
     $arItem['CATALOG_QUANTITY'] = 0 < $arItem['CATALOG_QUANTITY'] && is_float($arItem['CATALOG_MEASURE_RATIO']) ? floatval($arItem['CATALOG_QUANTITY']) : intval($arItem['CATALOG_QUANTITY']);
     $arItem['CATALOG'] = false;
     $arItem['LABEL'] = false;
     if (!isset($arItem['CATALOG_SUBSCRIPTION']) || 'Y' != $arItem['CATALOG_SUBSCRIPTION']) {
         $arItem['CATALOG_SUBSCRIPTION'] = 'N';
开发者ID:Andreyjktl,项目名称:rezina74,代码行数:31,代码来源:result_modifier.php

示例3: explode

//to prevent html table corruption
use Bitrix\Main;
Main\Loader::includeModule('blog');
$arNavPage = explode("#", $arResult["NAV_STRING"], 20);
$arResult["NAV_RECORD_COUNT"] = intval($arNavPage[0]) > 0 ? intval($arNavPage[0]) : 0;
$arResult["NAV_FIRST_RECORD_SHOW"] = intval($arNavPage[1]) > 0 ? intval($arNavPage[1]) : 0;
$arResult["NAV_LAST_RECORD_SHOW"] = intval($arNavPage[2]) > 0 ? intval($arNavPage[2]) : 0;
$arResult["NAV_STRING"] = substr($arResult["NAV_STRING"], strlen($arResult["NAV_RECORD_COUNT"] . $arResult["NAV_FIRST_RECORD_SHOW"] . $arResult["NAV_LAST_RECORD_SHOW"]) + 2);
/*****************************************************************/
//Для картинок из торговых предложений
$arSKUPropList = array();
if ($arResult['MODULES']['catalog']) {
    $arSKU = CCatalogSKU::GetInfoByProductIBlock($arParams['IBLOCK_ID']);
    $boolSKU = !empty($arSKU) && is_array($arSKU);
    if ($boolSKU && !empty($arParams['OFFER_TREE_PROPS']) && 'Y' == $arParams['PRODUCT_DISPLAY_MODE']) {
        $arSKUPropList = CIBlockPriceTools::getTreeProperties($arSKU, $arParams['OFFER_TREE_PROPS'], array('PICT' => $this->GetFolder() . '/images/no_photo.png', 'NAME' => '-'));
        $arNeedValues = array();
        CIBlockPriceTools::getTreePropertyValues($arSKUPropList, $arNeedValues);
    }
}
$arResult['SKU_PROPS'] = $arSKUPropList;
unset($arSKUPropList);
/******************************************************************/
foreach ($arResult["ITEMS"] as $key => $arItem) {
    $arRes = array();
    //Если количество коментариев не установлено, то подгрузить их из БД
    if ($arItem['PROPERTIES']['BLOG_COMMENTS_CNT']['VALUE'] === "") {
        if ($arItem['PROPERTIES']['BLOG_POST_ID']['ID'] !== "") {
            $iCommentId = $arItem['PROPERTIES']['BLOG_POST_ID']['ID'];
        } else {
            $iCommentId = (int) CIBlockElement::GetProperty($arItem["IBLOCK_ID"], $arItem["ID"], array("sort" => "asc"), array("CODE" => CIBlockPropertyTools::CODE_BLOG_POST))->GetNext()["ID"];
开发者ID:lenchv,项目名称:meblya,代码行数:31,代码来源:result_modifier.php


注:本文中的CIBlockPriceTools::getTreeProperties方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。