Exemplo n.º 1
0
			if($bGetProperty)
				$arItem["PROPERTIES"] = $obElement->GetProperties();
			$arItem["DISPLAY_PROPERTIES"]=array();
			foreach($arParams["PROPERTY_CODE"] as $pid)
			{
				$prop = &$arItem["PROPERTIES"][$pid];
				if(
					(is_array($prop["VALUE"]) && count($prop["VALUE"])>0)
					|| (!is_array($prop["VALUE"]) && strlen($prop["VALUE"])>0)
				)
				{
					$arItem["DISPLAY_PROPERTIES"][$pid] = CIBlockFormatProperties::GetDisplayValue($arItem, $prop, "photo_out");
				}
			}

			$ipropValues = new \Freetrix\Iblock\InheritedProperty\ElementValues($arItem["IBLOCK_ID"], $arItem["ID"]);
			$arItem["IPROPERTY_VALUES"] = $ipropValues->getValues();

			$arItem["PREVIEW_PICTURE"] = (0 < $arItem["PREVIEW_PICTURE"] ? CFile::GetFileArray($arItem["PREVIEW_PICTURE"]) : false);
			if ($arItem["PREVIEW_PICTURE"])
			{
				$arItem["PREVIEW_PICTURE"]["ALT"] = $arItem["IPROPERTY_VALUES"]["ELEMENT_PREVIEW_PICTURE_FILE_ALT"];
				if ($arItem["PREVIEW_PICTURE"]["ALT"] == "")
					$arItem["PREVIEW_PICTURE"]["ALT"] = $arItem["NAME"];
				$arItem["PREVIEW_PICTURE"]["TITLE"] = $arItem["IPROPERTY_VALUES"]["ELEMENT_PREVIEW_PICTURE_FILE_TITLE"];
				if ($arItem["PREVIEW_PICTURE"]["TITLE"] == "")
					$arItem["PREVIEW_PICTURE"]["TITLE"] = $arItem["NAME"];
			}

			$arItem["DETAIL_PICTURE"] = (0 < $arItem["DETAIL_PICTURE"] ? CFile::GetFileArray($arItem["DETAIL_PICTURE"]) : false);
			if ($arItem["DETAIL_PICTURE"])
Exemplo n.º 2
0
			{
				$arResult["NEXT"][] = $arElement;
			}
			else
			{
				array_unshift($arResult["PREV"], $arElement);
			}
		}

		$arResult["CURRENT"]["COUNT"] = CIBlockElement::GetList(array(), $arFilter, array());

		foreach (array("NEXT", "PREV") as $type)
		{
			foreach($arResult[$type] as $key=>$value)
			{
				$ipropValues = new \Freetrix\Iblock\InheritedProperty\ElementValues($value["IBLOCK_ID"], $value["ID"]);
				$IPROPERTY_VALUES = $ipropValues->getValues();

				$arResult[$type][$key]["PICTURE"] = CFile::GetFileArray($value["PREVIEW_PICTURE"]);
				if ($arResult[$type][$key]["PICTURE"])
				{
					$arResult[$type][$key]["PICTURE"]["ALT"] = $IPROPERTY_VALUES["ELEMENT_PREVIEW_PICTURE_FILE_ALT"];
					if ($arResult[$type][$key]["PICTURE"]["ALT"] == "")
						$arResult[$type][$key]["PICTURE"]["ALT"] = $value["NAME"];
					$arResult[$type][$key]["PICTURE"]["TITLE"] = $IPROPERTY_VALUES["ELEMENT_PREVIEW_PICTURE_FILE_TITLE"];
					if ($arResult[$type][$key]["PICTURE"]["TITLE"] == "")
						$arResult[$type][$key]["PICTURE"]["TITLE"] = $value["NAME"];
				}
			}
		}
Exemplo n.º 3
0
		$arFilter["INCLUDE_SUBSECTIONS"] = "Y";
	}
	//ORDER BY
	$arSort = array(
		"RAND"=>"ASC",
	);
	//EXECUTE
	$rsIBlockElement = CIBlockElement::GetList($arSort, $arFilter, false, false, $arSelect);
	$rsIBlockElement->SetUrlTemplates($arParams["DETAIL_URL"]);
	if($arResult = $rsIBlockElement->GetNext())
	{
		$arResult["PICTURE"] = CFile::GetFileArray($arResult["PREVIEW_PICTURE"]);
		if(!is_array($arResult["PICTURE"]))
			$arResult["PICTURE"] = CFile::GetFileArray($arResult["DETAIL_PICTURE"]);

		$ipropValues = new \Freetrix\Iblock\InheritedProperty\ElementValues($arResult["IBLOCK_ID"], $arResult["ID"]);
		$arResult["IPROPERTY_VALUES"] = $ipropValues->getValues();

		if ($arResult["PICTURE"])
		{
			$arResult["PICTURE"]["ALT"] = $arResult["IPROPERTY_VALUES"]["ELEMENT_PREVIEW_PICTURE_FILE_ALT"];
			if ($arResult["PICTURE"]["ALT"] == "")
				$arResult["PICTURE"]["ALT"] = $arResult["NAME"];
			$arResult["PICTURE"]["TITLE"] = $arResult["IPROPERTY_VALUES"]["ELEMENT_PREVIEW_PICTURE_FILE_TITLE"];
			if ($arResult["PICTURE"]["TITLE"] == "")
				$arResult["PICTURE"]["TITLE"] = $arResult["NAME"];
		}

		$this->SetResultCacheKeys(array(
		));
		$this->IncludeComponentTemplate();
Exemplo n.º 4
0
									$arMainCatalog['SKU_PROPERTY_ID']
								);
							}
							$boolFlagClear = CIBlockOffersTmp::Delete($str_TMP_ID);
							$boolFlagClearAll = CIBlockOffersTmp::DeleteOldID($IBLOCK_ID);
						}
					}
				}

				if (!$res)
				{
					$strWarning .= $bs->LAST_ERROR."<br>";
				}
				else
				{
					$ipropValues = new \Freetrix\Iblock\InheritedProperty\ElementValues($IBLOCK_ID, $ID);
					$ipropValues->clearValues();
					CIBlockElement::RecalcSections($ID);
				}

				if ('' == $strWarning && $bCatalog)
				{
					$arCatalogItem = array(
						'IBLOCK_ID' => $IBLOCK_ID,
						'SECTION_ID' => $MENU_SECTION_ID,
						'ID' => $ID,
						'PRODUCT_ID' => CIBlockElement::GetRealElement($ID)
					);
					if ($arShowTabs['catalog'])
					{
						include($_SERVER["DOCUMENT_ROOT"]."/freetrix/modules/catalog/admin/templates/product_edit_action.php");