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


PHP CatalogGetPriceTableEx函数代码示例

本文整理汇总了PHP中CatalogGetPriceTableEx函数的典型用法代码示例。如果您正苦于以下问题:PHP CatalogGetPriceTableEx函数的具体用法?PHP CatalogGetPriceTableEx怎么用?PHP CatalogGetPriceTableEx使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: array

	$arFound = array();
	$rsElements = CIBlockElement::GetList($arSort, $arFilter, false, false, $arSelect);
	while($arElement = $rsElements->GetNext())
	{
		$ID = $arElement["PROPERTY_".strtoupper($arParams["LINK_PROPERTY_SID"])."_VALUE"];
		if(!array_key_exists($ID, $arFound) || (strpos($arElement["XML_ID"], "#")===false))
		{
			$arFound[$ID] = true;
			$arItem = &$arResult["ITEMS"][$arMap[$ID]];

			if($arParams["USE_PRICE_COUNT"])
			{
				if(CModule::IncludeModule("catalog"))
				{
					$arItem["PRICE_MATRIX"] = CatalogGetPriceTableEx($arElement["ID"]);
					foreach($arItem["PRICE_MATRIX"]["COLS"] as $keyColumn=>$arColumn)
						$arItem["PRICE_MATRIX"]["COLS"][$keyColumn]["NAME_LANG"] = htmlspecialchars($arColumn["NAME_LANG"]);
				}
				else
				{
					$arItem["PRICE_MATRIX"] = false;
				}
				$arItem["PRICES"] = array();
			}
			else
			{
				$arItem["PRICE_MATRIX"] = false;
				$arItem["PRICES"] = CIBlockPriceTools::GetItemPrices($arParams["LINK_IBLOCK_ID"], $arResult["PRICES"], $arElement);
			}
			$arItem["CAN_BUY"] = CIBlockPriceTools::CanBuy($arParams["LINK_IBLOCK_ID"], $arResult["PRICES"], $arElement);
开发者ID:ASDAFF,项目名称:Components-for-Bitrix,代码行数:30,代码来源:result_modifier.php

示例2: htmlspecialcharsbx

 $arResult['~BUY_URL_TEMPLATE'] = $currentPath . $arParams["ACTION_VARIABLE"] . "=BUY&" . $arParams["PRODUCT_ID_VARIABLE"] . "=#ID#";
 $arResult['BUY_URL_TEMPLATE'] = htmlspecialcharsbx($arResult['~BUY_URL_TEMPLATE']);
 $arResult['~ADD_URL_TEMPLATE'] = $currentPath . $arParams["ACTION_VARIABLE"] . "=ADD2BASKET&" . $arParams["PRODUCT_ID_VARIABLE"] . "=#ID#";
 $arResult['ADD_URL_TEMPLATE'] = htmlspecialcharsbx($arResult['~ADD_URL_TEMPLATE']);
 $arResult['~SUBSCRIBE_URL_TEMPLATE'] = $currentPath . $arParams["ACTION_VARIABLE"] . "=SUBSCRIBE_PRODUCT&" . $arParams["PRODUCT_ID_VARIABLE"] . "=#ID#";
 $arResult['SUBSCRIBE_URL_TEMPLATE'] = htmlspecialcharsbx($arResult['~SUBSCRIBE_URL_TEMPLATE']);
 $arResult['~COMPARE_URL_TEMPLATE'] = $comparePath . $arParams["ACTION_VARIABLE"] . "=ADD_TO_COMPARE_LIST&" . $arParams["PRODUCT_ID_VARIABLE"] . "=#ID#";
 $arResult['COMPARE_URL_TEMPLATE'] = htmlspecialcharsbx($arResult['~COMPARE_URL_TEMPLATE']);
 unset($comparePath, $currentPath);
 foreach ($arResult["ITEMS"] as &$arItem) {
     $arItem["PRICES"] = array();
     $arItem["PRICE_MATRIX"] = false;
     $arItem['MIN_PRICE'] = false;
     if ($arParams["USE_PRICE_COUNT"]) {
         if ($bCatalog) {
             $arItem["PRICE_MATRIX"] = CatalogGetPriceTableEx($arItem["ID"], 0, $arPriceTypeID, 'Y', $arConvertParams);
             if (isset($arItem["PRICE_MATRIX"]["COLS"]) && is_array($arItem["PRICE_MATRIX"]["COLS"])) {
                 foreach ($arItem["PRICE_MATRIX"]["COLS"] as $keyColumn => $arColumn) {
                     $arItem["PRICE_MATRIX"]["COLS"][$keyColumn]["NAME_LANG"] = htmlspecialcharsex($arColumn["NAME_LANG"]);
                 }
             }
         }
     } else {
         $arItem["PRICES"] = CIBlockPriceTools::GetItemPrices($arParams["IBLOCK_ID"], $arResult["PRICES"], $arItem, $arParams['PRICE_VAT_INCLUDE'], $arConvertParams);
         if (!empty($arItem["PRICES"])) {
             foreach ($arItem['PRICES'] as &$arOnePrice) {
                 if ('Y' == $arOnePrice['MIN_PRICE']) {
                     $arItem['MIN_PRICE'] = $arOnePrice;
                     break;
                 }
             }
开发者ID:rasuldev,项目名称:torino,代码行数:31,代码来源:component.php

示例3: foreach

 foreach ($arResult["CATEGORIES"] as $category_id => $arCategory) {
     foreach ($arCategory["ITEMS"] as $i => $arItem) {
         if (isset($arItem["ITEM_ID"])) {
             $arResult["SEARCH"][] =& $arResult["CATEGORIES"][$category_id]["ITEMS"][$i];
         }
     }
 }
 foreach ($arResult["SEARCH"] as $i => $arItem) {
     switch ($arItem["MODULE_ID"]) {
         case "iblock":
             if (CModule::IncludeModule("catalog")) {
                 $arParams["CURRENCY"] = $arParams["CURRENCY"] ? $arParams["CURRENCY"] : CCurrency::GetBaseCurrency();
                 $arConvertParams = array('CURRENCY_ID' => $arParams["CURRENCY"]);
                 $ProductPrarams = CCatalogProduct::GetByID($arItem["ITEM_ID"]);
                 //echo $ProductPrarams[VAT_INCLUDED];
                 $arPrices = CatalogGetPriceTableEx($arItem["ITEM_ID"], 0, array(), 'Y', $arConvertParams);
                 unset($arResult["SEARCH"][$i]["MIN_PRICE"]);
                 unset($arResult["SEARCH"][$i]["PRICES"]);
                 foreach ($arParams["PRICE_CODE"] as $key => $prid) {
                     if ($arPrices["MATRIX"][$prid][0]) {
                         if (isset($arResult["SEARCH"][$i]["MIN_PRICE"])) {
                             if ($arPrices["MATRIX"][$prid][0]["ORIG_DISCOUNT_PRICE"]) {
                                 $price_orig_val = $arPrices["MATRIX"][$prid][0]["ORIG_DISCOUNT_PRICE"];
                             } else {
                                 $price_orig_val = $arPrices["MATRIX"][$prid][0]["DISCOUNT_PRICE"];
                             }
                             if ($arResult["SEARCH"][$i]["MIN_PRICE"]["DISCOUNT_PRICE"] > $price_orig_val) {
                                 $arResult["SEARCH"][$i]["MIN_PRICE"] = $arPrices["MATRIX"][$prid][0];
                             }
                         } else {
                             $arResult["SEARCH"][$i]["MIN_PRICE"] = $arPrices["MATRIX"][$prid][0];
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:31,代码来源:result_modifier.php

示例4: unset

            $arPriceTypeID[] = $value["ID"];
        }
        if (isset($value)) {
            unset($value);
        }
    }
    $arFound = array();
    $rsElements = CIBlockElement::GetList($arSort, $arFilter, false, false, $arSelect);
    while ($arElement = $rsElements->GetNext()) {
        $ID = $arElement["PROPERTY_" . strtoupper($arParams["LINK_PROPERTY_SID"]) . "_VALUE"];
        if (!array_key_exists($ID, $arFound) || strpos($arElement["XML_ID"], "#") === false) {
            $arFound[$ID] = true;
            $arItem =& $arResult["ITEMS"][$arMap[$ID]];
            if ($arParams["USE_PRICE_COUNT"]) {
                if (CModule::IncludeModule("catalog")) {
                    $arItem["PRICE_MATRIX"] = CatalogGetPriceTableEx($arElement["ID"], 0, $arPriceTypeID, 'Y', $arResult['CONVERT_CURRENCY']);
                    foreach ($arItem["PRICE_MATRIX"]["COLS"] as $keyColumn => $arColumn) {
                        $arItem["PRICE_MATRIX"]["COLS"][$keyColumn]["NAME_LANG"] = htmlspecialcharsbx($arColumn["NAME_LANG"]);
                    }
                } else {
                    $arItem["PRICE_MATRIX"] = false;
                }
                $arItem["PRICES"] = array();
            } else {
                $arItem["PRICE_MATRIX"] = false;
                $arItem["PRICES"] = CIBlockPriceTools::GetItemPrices($arParams["LINK_IBLOCK_ID"], $arResult["PRICES"], $arElement, $arParams['PRICE_VAT_INCLUDE'], $arResult['CONVERT_CURRENCY']);
            }
            $arItem["CAN_BUY"] = CIBlockPriceTools::CanBuy($arParams["LINK_IBLOCK_ID"], $arResult["PRICES"], $arElement);
        }
    }
}
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:result_modifier.php

示例5: foreach

         $arResultModules['currency'] = true;
         $arCurrencyInfo = CCurrency::GetByID($arParams['CURRENCY_ID']);
         if (!(is_array($arCurrencyInfo) && !empty($arCurrencyInfo))) {
             $arParams['CONVERT_CURRENCY'] = 'N';
             $arParams['CURRENCY_ID'] = '';
         } else {
             $arParams['CURRENCY_ID'] = $arCurrencyInfo['CURRENCY'];
             $arConvertParams['CURRENCY_ID'] = $arCurrencyInfo['CURRENCY'];
         }
     }
 }
 $bCatalog = CModule::IncludeModule('catalog');
 foreach ($arResult["SET_ITEMS"] as $key => $setItem) {
     if ($arParams["USE_PRICE_COUNT"]) {
         if ($bCatalog) {
             $arResult["SET_ITEMS"][$key]["PRICE_MATRIX"] = CatalogGetPriceTableEx($arResult["SET_ITEMS"][$key]["ID"], 0, $arPriceTypeID, 'Y', $arConvertParams);
             foreach ($arResult["SET_ITEMS"][$key]["PRICE_MATRIX"]["COLS"] as $keyColumn => $arColumn) {
                 $arResult["SET_ITEMS"][$key]["PRICE_MATRIX"]["COLS"][$keyColumn]["NAME_LANG"] = htmlspecialcharsbx($arColumn["NAME_LANG"]);
             }
         }
     } else {
         $arResult["SET_ITEMS"][$key]["PRICES"] = CIBlockPriceTools::GetItemPrices($arParams["IBLOCK_ID"], $arResultPrices, $arResult["SET_ITEMS"][$key], $arParams['PRICE_VAT_INCLUDE'], $arConvertParams);
         if (!empty($arResult["SET_ITEMS"][$key]["PRICES"])) {
             foreach ($arResult["SET_ITEMS"][$key]['PRICES'] as &$arOnePrice) {
                 if ('Y' == $arOnePrice['MIN_PRICE']) {
                     $arResult["SET_ITEMS"][$key]['MIN_PRICE'] = $arOnePrice;
                     break;
                 }
             }
             unset($arOnePrice);
         }
开发者ID:Andreyjktl,项目名称:rezina74,代码行数:31,代码来源:result_modifier.php


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