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


PHP CIBlockPriceTools::getTreePropertyValues方法代码示例

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


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

示例1: 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';
     }
     // Item Label Properties
开发者ID:Andreyjktl,项目名称:rezina74,代码行数:31,代码来源:result_modifier.php

示例2: array

 $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;
     }
     if (!isset($arItem['CATALOG_QUANTITY'])) {
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:31,代码来源:result_modifier.php


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