Exemplo n.º 1
0
		}
		$arMatrix[$keyOffer] = $arRow;

		CIBlockPriceTools::setRatioMinPrice($arOffer);

		$arOffer['MORE_PHOTO'] = array();
		$arOffer['MORE_PHOTO_COUNT'] = 0;
		$offerSlider = CIBlockPriceTools::getSliderForItem($arOffer, $arParams['OFFER_ADD_PICT_PROP'], 'Y' == $arParams['ADD_DETAIL_TO_SLIDER']);
		if (empty($offerSlider))
		{
			$offerSlider = $productSlider;
		}
		$arOffer['MORE_PHOTO'] = $offerSlider;
		$arOffer['MORE_PHOTO_COUNT'] = count($offerSlider);

		$boolSKUDisplayProps = CIBlockPriceTools::clearProperties($arOffer['DISPLAY_PROPERTIES'], $arParams['OFFER_TREE_PROPS']);

		$arDouble[$arOffer['ID']] = true;
		$arNewOffers[$keyOffer] = $arOffer;
	}
	$arResult['OFFERS'] = $arNewOffers;
	$arResult['SHOW_OFFERS_PROPS'] = $boolSKUDisplayProps;

	$arUsedFields = array();
	$arSortFields = array();

	foreach ($arSKUPropIDs as $propkey => $strOneCode)
	{
		$boolExist = $arMatrixFields[$strOneCode];
		foreach ($arMatrix as $keyOffer => $arRow)
		{
Exemplo n.º 2
0
         $arMatrixFields[$strOneCode] = true;
         $arCell['NA'] = false;
         if ('directory' == $arSKUPropList[$strOneCode]['USER_TYPE']) {
             $intValue = $arSKUPropList[$strOneCode]['XML_MAP'][$arOffer['DISPLAY_PROPERTIES'][$strOneCode]['VALUE']];
             $arCell['VALUE'] = $intValue;
         } elseif ('L' == $arSKUPropList[$strOneCode]['PROPERTY_TYPE']) {
             $arCell['VALUE'] = intval($arOffer['DISPLAY_PROPERTIES'][$strOneCode]['VALUE_ENUM_ID']);
         } elseif ('E' == $arSKUPropList[$strOneCode]['PROPERTY_TYPE']) {
             $arCell['VALUE'] = intval($arOffer['DISPLAY_PROPERTIES'][$strOneCode]['VALUE']);
         }
         $arCell['SORT'] = $arSKUPropList[$strOneCode]['VALUES'][$arCell['VALUE']]['SORT'];
     }
     $arRow[$strOneCode] = $arCell;
 }
 $arMatrix[$keyOffer] = $arRow;
 CIBlockPriceTools::clearProperties($arOffer['DISPLAY_PROPERTIES'], $arParams['OFFER_TREE_PROPS'][$arOffer['IBLOCK_ID']]);
 $newOfferProps = array();
 if (!empty($arParams['PROPERTY_CODE'][$arOffer['IBLOCK_ID']])) {
     foreach ($arParams['PROPERTY_CODE'][$arOffer['IBLOCK_ID']] as $propName) {
         if (isset($arOffer['DISPLAY_PROPERTIES'][$propName])) {
             $newOfferProps[$propName] = $arOffer['DISPLAY_PROPERTIES'][$propName];
         }
     }
 }
 $arOffer['DISPLAY_PROPERTIES'] = $newOfferProps;
 $arOffer['CHECK_QUANTITY'] = 'Y' == $arOffer['CATALOG_QUANTITY_TRACE'] && 'N' == $arOffer['CATALOG_CAN_BUY_ZERO'];
 if (!isset($arOffer['CATALOG_MEASURE_RATIO'])) {
     $arOffer['CATALOG_MEASURE_RATIO'] = 1;
 }
 if (!isset($arOffer['CATALOG_QUANTITY'])) {
     $arOffer['CATALOG_QUANTITY'] = 0;
Exemplo n.º 3
0
		}
		$arMatrix[$keyOffer] = $arRow;

		CIBlockPriceTools::setRatioMinPrice($arOffer);

		$arOffer['MORE_PHOTO'] = array();
		$arOffer['MORE_PHOTO_COUNT'] = 0;
		$offerSlider = CIBlockPriceTools::getSliderForItem($arOffer, $arParams['OFFER_ADD_PICT_PROP'], 'Y' == $arParams['ADD_DETAIL_TO_SLIDER']);
		if (empty($offerSlider))
		{
			$offerSlider = $productSlider;
		}
		$arOffer['MORE_PHOTO'] = $offerSlider;
		$arOffer['MORE_PHOTO_COUNT'] = count($offerSlider);

		if (CIBlockPriceTools::clearProperties($arOffer['DISPLAY_PROPERTIES'], $arParams['OFFER_TREE_PROPS']))
		{
			$boolSKUDisplayProps = true;
		}

		$arDouble[$arOffer['ID']] = true;
		$arNewOffers[$keyOffer] = $arOffer;
	}
	$arResult['OFFERS'] = $arNewOffers;
	$arResult['SHOW_OFFERS_PROPS'] = $boolSKUDisplayProps;

	$arUsedFields = array();
	$arSortFields = array();

	foreach ($arSKUPropIDs as $propkey => $strOneCode)
	{