本文整理汇总了PHP中CIBlockPriceTools::getMinPriceFromList方法的典型用法代码示例。如果您正苦于以下问题:PHP CIBlockPriceTools::getMinPriceFromList方法的具体用法?PHP CIBlockPriceTools::getMinPriceFromList怎么用?PHP CIBlockPriceTools::getMinPriceFromList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CIBlockPriceTools
的用法示例。
在下文中一共展示了CIBlockPriceTools::getMinPriceFromList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$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"] = htmlspecialcharsbx($arColumn["NAME_LANG"]);
}
}
}
} else {
$arItem["PRICES"] = CIBlockPriceTools::GetItemPrices($arParams["IBLOCK_ID"], $arResult["PRICES"], $arItem, $arParams['PRICE_VAT_INCLUDE'], $arConvertParams);
if (!empty($arItem['PRICES'])) {
$arItem['MIN_PRICE'] = CIBlockPriceTools::getMinPriceFromList($arItem['PRICES']);
}
}
$arItem["CAN_BUY"] = CIBlockPriceTools::CanBuy($arParams["IBLOCK_ID"], $arResult["PRICES"], $arItem);
$arItem['~BUY_URL'] = str_replace('#ID#', $arItem["ID"], $arResult['~BUY_URL_TEMPLATE']);
$arItem['BUY_URL'] = str_replace('#ID#', $arItem["ID"], $arResult['BUY_URL_TEMPLATE']);
$arItem['~ADD_URL'] = str_replace('#ID#', $arItem["ID"], $arResult['~ADD_URL_TEMPLATE']);
$arItem['ADD_URL'] = str_replace('#ID#', $arItem["ID"], $arResult['ADD_URL_TEMPLATE']);
$arItem['~SUBSCRIBE_URL'] = str_replace('#ID#', $arItem["ID"], $arResult['~SUBSCRIBE_URL_TEMPLATE']);
$arItem['SUBSCRIBE_URL'] = str_replace('#ID#', $arItem["ID"], $arResult['SUBSCRIBE_URL_TEMPLATE']);
if ($arParams['DISPLAY_COMPARE']) {
$arItem['~COMPARE_URL'] = str_replace('#ID#', $arItem["ID"], $arResult['~COMPARE_URL_TEMPLATE']);
$arItem['COMPARE_URL'] = str_replace('#ID#', $arItem["ID"], $arResult['COMPARE_URL_TEMPLATE']);
}
if ('Y' == $arParams['CONVERT_CURRENCY']) {
if ($arParams["USE_PRICE_COUNT"]) {
示例2: setItemsPrices
/**
* set prices for all items
* @return array currency list
*/
protected function setItemsPrices()
{
// Set items Prices
foreach ($this->items as &$item) {
$item["PRICES"] = array();
$item['MIN_PRICE'] = false;
$item["CAN_BUY"] = false;
$item['~BUY_URL'] = $this->urlTemplates['~BUY_URL_TEMPLATE'] . $item['ID'];
$item['BUY_URL'] = $this->urlTemplates['BUY_URL_TEMPLATE'] . $item['ID'];
$item['~ADD_URL'] = $this->urlTemplates['~ADD_URL_TEMPLATE'] . $item['ID'];
$item['ADD_URL'] = $this->urlTemplates['ADD_URL_TEMPLATE'] . $item['ID'];
$item['~COMPARE_URL'] = $this->urlTemplates['~COMPARE_URL_TEMPLATE'] . $item['ID'];
$item['COMPARE_URL'] = $this->urlTemplates['COMPARE_URL_TEMPLATE'] . $item['ID'];
$item['~SUBSCRIBE_URL'] = $this->urlTemplates['~SUBSCRIBE_URL_TEMPLATE'] . $item['ID'];
$item['SUBSCRIBE_URL'] = $this->urlTemplates['SUBSCRIBE_URL_TEMPLATE'] . $item['ID'];
if (!empty($item['OFFERS'])) {
continue;
}
$item['PRICES'] = CIBlockPriceTools::GetItemPrices($item['IBLOCK_ID'], $this->data['CATALOG_PRICES'], $item, $this->arParams['PRICE_VAT_INCLUDE'], $this->data['CONVERT_CURRENCY']);
$item['MIN_PRICE'] = CIBlockPriceTools::getMinPriceFromList($item['PRICES']);
$item['CAN_BUY'] = CIBlockPriceTools::CanBuy($item['IBLOCK_ID'], $this->data['CATALOG_PRICES'], $item);
}
unset($item);
}