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


PHP CIBlockPriceTools::setRatioMinPrice方法代码示例

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


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

示例1: foreach

         			}*/
         if (-1 == $intSelected) {
             $intSelected = 0;
         }
         /*if (!$arMatrix[$intSelected]['OWNER_PICT'])
         		{
         			$arItem['PREVIEW_PICTURE'] = $arMatrix[$intSelected]['PREVIEW_PICTURE'];
         			$arItem['PREVIEW_PICTURE_SECOND'] = $arMatrix[$intSelected]['PREVIEW_PICTURE_SECOND'];
         		}*/
         $arItem['JS_OFFERS'] = $arMatrix;
         //$arItem['OFFERS_SELECTED'] = $intSelected;
         $arItem['OFFERS_PROPS_DISPLAY'] = $boolSKUDisplayProperties;
         $arItem['MIN_PRICE'] = CIShop::getMinPriceFromOffersExt($arItem['OFFERS'], $boolConvert ? $arResult['CONVERT_CURRENCY']['CURRENCY_ID'] : $strBaseCurrency);
     }
     if ($arItem['CATALOG'] && CCatalogProduct::TYPE_PRODUCT == $arItem['CATALOG_TYPE']) {
         CIBlockPriceTools::setRatioMinPrice($arItem, true);
     }
     if (!empty($arItem['DISPLAY_PROPERTIES'])) {
         foreach ($arItem['DISPLAY_PROPERTIES'] as $propKey => $arDispProp) {
             if ('F' == $arDispProp['PROPERTY_TYPE']) {
                 unset($arItem['DISPLAY_PROPERTIES'][$propKey]);
             }
         }
     }
     $arItem['LAST_ELEMENT'] = 'N';
     $arNewItemsList[$key] = $arItem;
 }
 $arNewItemsList[$key]['LAST_ELEMENT'] = 'Y';
 $arResult['ITEMS'] = $arNewItemsList;
 $arResult['SKU_PROPS'] = $skuPropList;
 $arResult['DEFAULT_PICTURE'] = $arEmptyPreview;
开发者ID:Andreyjktl,项目名称:rezina74,代码行数:31,代码来源:result_modifier.php

示例2: array

			'SLIDER_COUNT' => $arOffer['MORE_PHOTO_COUNT'],
			'BUY_URL' => $arOffer['~BUY_URL']
		);
		$arMatrix[$keyOffer] = $arOneRow;
	}
	if (-1 == $intSelected)
		$intSelected = 0;
	$arResult['JS_OFFERS'] = $arMatrix;
	$arResult['OFFERS_SELECTED'] = $intSelected;

	$arResult['OFFERS_IBLOCK'] = $arSKU['IBLOCK_ID'];
}

if ($arResult['MODULES']['catalog'] && $arResult['CATALOG'] && CCatalogProduct::TYPE_PRODUCT == $arResult['CATALOG_TYPE'])
{
	CIBlockPriceTools::setRatioMinPrice($arResult, true);
}

if (!empty($arResult['DISPLAY_PROPERTIES']))
{
	foreach ($arResult['DISPLAY_PROPERTIES'] as $propKey => $arDispProp)
	{
		if ('F' == $arDispProp['PROPERTY_TYPE'])
			unset($arResult['DISPLAY_PROPERTIES'][$propKey]);
	}
}

$arResult['SKU_PROPS'] = $arSKUPropList;
$arResult['DEFAULT_PICTURE'] = $arEmptyPreview;

$arResult['wish']['isWished'] = CIBlockElement::GetList(false, array(
开发者ID:ASDAFF,项目名称:mp,代码行数:31,代码来源:result_modifier.php

示例3: array

        $arMatrix[$keyOffer] = $arOneRow;
    }
    if (-1 == $intSelected) {
        $intSelected = 0;
    }
    $arResult['JS_OFFERS'] = $arMatrix;
    $arResult['OFFERS_SELECTED'] = $intSelected;
    if ($arMatrix[$intSelected]['SLIDER_COUNT'] > 0) {
        $arResult['MORE_PHOTO'] = $arMatrix[$intSelected]['SLIDER'];
        $arResult['MORE_PHOTO_COUNT'] = $arMatrix[$intSelected]['SLIDER_COUNT'];
    }
    $arResult['OFFERS_IBLOCK'] = $arSKU['IBLOCK_ID'];
}
if ($arResult['MODULES']['catalog'] && $arResult['CATALOG']) {
    if ($arResult['CATALOG_TYPE'] == CCatalogProduct::TYPE_PRODUCT || $arResult['CATALOG_TYPE'] == CCatalogProduct::TYPE_SET) {
        CIBlockPriceTools::setRatioMinPrice($arResult, false);
        $arResult['MIN_BASIS_PRICE'] = $arResult['MIN_PRICE'];
    }
    if (CBXFeatures::IsFeatureEnabled('CatCompleteSet') && $arResult['CATALOG_TYPE'] == CCatalogProduct::TYPE_PRODUCT) {
        $rsSets = CCatalogProductSet::getList(array(), array('@OWNER_ID' => $arResult['ID'], '=SET_ID' => 0, '=TYPE' => CCatalogProductSet::TYPE_GROUP), false, false, array('ID', 'OWNER_ID'));
        if ($arSet = $rsSets->Fetch()) {
            $arResult['OFFER_GROUP'] = true;
        }
    }
}
if (!empty($arResult['DISPLAY_PROPERTIES'])) {
    foreach ($arResult['DISPLAY_PROPERTIES'] as $propKey => $arDispProp) {
        if ('F' == $arDispProp['PROPERTY_TYPE']) {
            unset($arResult['DISPLAY_PROPERTIES'][$propKey]);
        }
    }
开发者ID:sharapudinov,项目名称:911.rf,代码行数:31,代码来源:result_modifier.php

示例4:

				$arItem['MIN_PRICE'] = CIBlockPriceTools::getMinPriceFromOffers(
					$arItem['OFFERS'],
					$boolConvert ? $arResult['CONVERT_CURRENCY']['CURRENCY_ID'] : $strBaseCurrency
				);
			}
		}

		if (
			$arResult['MODULES']['catalog']
			&& $arItem['CATALOG']
			&&
				($arItem['CATALOG_TYPE'] == CCatalogProduct::TYPE_PRODUCT
				|| $arItem['CATALOG_TYPE'] == CCatalogProduct::TYPE_SET)
		)
		{
			CIBlockPriceTools::setRatioMinPrice($arItem, false);
			$arItem['MIN_BASIS_PRICE'] = $arItem['MIN_PRICE'];
		}

		if (!empty($arItem['DISPLAY_PROPERTIES']))
		{
			foreach ($arItem['DISPLAY_PROPERTIES'] as $propKey => $arDispProp)
			{
				if ('F' == $arDispProp['PROPERTY_TYPE'])
					unset($arItem['DISPLAY_PROPERTIES'][$propKey]);
			}
		}
		$arItem['LAST_ELEMENT'] = 'N';
		$arNewItemsList[$key] = $arItem;
	}
	$arNewItemsList[$key]['LAST_ELEMENT'] = 'Y';
开发者ID:AlexPrya,项目名称:iShop,代码行数:31,代码来源:result_modifier.php

示例5: getMinPriceFromOffers

	public static function getMinPriceFromOffers(&$offers, $currency)
	{
		$result = false;
		$minPrice = 0;
		if (!empty($offers) && is_array($offers))
		{
			$doubles = array();
			foreach ($offers as $oneOffer)
			{
				$oneOffer['ID'] = intval($oneOffer['ID']);
				if (isset($doubles[$oneOffer['ID']]))
					continue;
				if (!$oneOffer['CAN_BUY'])
					continue;

				CIBlockPriceTools::setRatioMinPrice($oneOffer, true);

				$oneOffer['MIN_PRICE']['CATALOG_MEASURE_RATIO'] = $oneOffer['CATALOG_MEASURE_RATIO'];
				$oneOffer['MIN_PRICE']['CATALOG_MEASURE'] = $oneOffer['CATALOG_MEASURE'];
				$oneOffer['MIN_PRICE']['CATALOG_MEASURE_NAME'] = $oneOffer['CATALOG_MEASURE_NAME'];
				$oneOffer['MIN_PRICE']['~CATALOG_MEASURE_NAME'] = $oneOffer['~CATALOG_MEASURE_NAME'];

				if (empty($result))
				{
					$minPrice = ($oneOffer['MIN_PRICE']['CURRENCY'] == $currency
						? $oneOffer['MIN_PRICE']['DISCOUNT_VALUE']
						: CCurrencyRates::ConvertCurrency($oneOffer['MIN_PRICE']['DISCOUNT_VALUE'], $oneOffer['MIN_PRICE']['CURRENCY'], $currency)
					);
					$result = $oneOffer['MIN_PRICE'];
				}
				else
				{
					$comparePrice = ($oneOffer['MIN_PRICE']['CURRENCY'] == $currency
						? $oneOffer['MIN_PRICE']['DISCOUNT_VALUE']
						: CCurrencyRates::ConvertCurrency($oneOffer['MIN_PRICE']['DISCOUNT_VALUE'], $oneOffer['MIN_PRICE']['CURRENCY'], $currency)
					);
					if ($minPrice > $comparePrice)
					{
						$minPrice = $comparePrice;
						$result = $oneOffer['MIN_PRICE'];
					}
				}
				$doubles[$oneOffer['ID']] = true;
			}
		}
		return $result;
	}
开发者ID:ASDAFF,项目名称:open_bx,代码行数:47,代码来源:comp_pricetools.php


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