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


PHP CIBlockPriceTools::getLabel方法代码示例

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


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

示例1: array

 }
 $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'])) {
         $arItem['CATALOG_QUANTITY'] = 0;
     }
     $arItem['CATALOG_QUANTITY'] = 0 < $arItem['CATALOG_QUANTITY'] && is_float($arItem['CATALOG_MEASURE_RATIO']) ? floatval($arItem['CATALOG_QUANTITY']) : intval($arItem['CATALOG_QUANTITY']);
     $arItem['CATALOG'] = false;
     if (!isset($arItem['CATALOG_SUBSCRIPTION']) || 'Y' != $arItem['CATALOG_SUBSCRIPTION']) {
         $arItem['CATALOG_SUBSCRIPTION'] = 'N';
     }
     CIBlockPriceTools::getLabel($arItem, $arParams['LABEL_PROP']);
     $productPictures = CIBlockPriceTools::getDoublePicturesForItem($arItem, $arParams['ADD_PICT_PROP']);
     if (empty($productPictures['PICT'])) {
         $productPictures['PICT'] = $arEmptyPreview;
     }
     if (empty($productPictures['SECOND_PICT'])) {
         $productPictures['SECOND_PICT'] = $productPictures['PICT'];
     }
     $arItem['PREVIEW_PICTURE'] = $productPictures['PICT'];
     $arItem['PREVIEW_PICTURE_SECOND'] = $productPictures['SECOND_PICT'];
     $arItem['SECOND_PICT'] = true;
     $arItem['PRODUCT_PREVIEW'] = $productPictures['PICT'];
     $arItem['PRODUCT_PREVIEW_SECOND'] = $productPictures['SECOND_PICT'];
     if ($arResult['MODULES']['catalog']) {
         $arItem['CATALOG'] = true;
         if (!isset($arItem['CATALOG_TYPE'])) {
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:31,代码来源:result_modifier.php

示例2: is_float

$arResult['CHECK_QUANTITY'] = false;
if (!isset($arResult['CATALOG_MEASURE_RATIO']))
	$arResult['CATALOG_MEASURE_RATIO'] = 1;
if (!isset($arResult['CATALOG_QUANTITY']))
	$arResult['CATALOG_QUANTITY'] = 0;
$arResult['CATALOG_QUANTITY'] = (
	0 < $arResult['CATALOG_QUANTITY'] && is_float($arResult['CATALOG_MEASURE_RATIO'])
	? floatval($arResult['CATALOG_QUANTITY'])
	: intval($arResult['CATALOG_QUANTITY'])
);
$arResult['CATALOG'] = false;
if (!isset($arResult['CATALOG_SUBSCRIPTION']) || 'Y' != $arResult['CATALOG_SUBSCRIPTION'])
	$arResult['CATALOG_SUBSCRIPTION'] = 'N';

CIBlockPriceTools::getLabel($arResult, $arParams['LABEL_PROP']);

$productSlider = CIBlockPriceTools::getSliderForItem($arResult, $arParams['ADD_PICT_PROP'], 'Y' == $arParams['ADD_DETAIL_TO_SLIDER']);
if (empty($productSlider))
{
	$productSlider = array(
		0 => $arEmptyPreview
	);
}
$productSliderCount = count($productSlider);
$arResult['SHOW_SLIDER'] = true;
$arResult['MORE_PHOTO'] = $productSlider;
$arResult['MORE_PHOTO_COUNT'] = count($productSlider);

if ($arResult['MODULES']['catalog'])
{
开发者ID:ASDAFF,项目名称:mp,代码行数:30,代码来源:result_modifier.php


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