當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。