23 $str = str_replace(
"\r",
"", str_replace(
"\n",
"", str_replace(
"\t",
" ",
$str)));
29if (CModule::IncludeModule(
"iblock") && CModule::IncludeModule(
"catalog"))
46 if (!empty($V) && is_array($V))
48 foreach ($V as
$key => $value)
50 if (trim($value)==
"0")
75 $arSelect =
array(
"ID",
"IBLOCK_ID",
"IBLOCK_SECTION_ID",
"NAME",
"PREVIEW_PICTURE",
"PREVIEW_TEXT",
"PREVIEW_TEXT_TYPE",
"DETAIL_PICTURE",
"LANG_DIR",
"DETAIL_PAGE_URL",
"EXTERNAL_ID");
80 if (!in_array(
$ar_res[
"CATALOG_GROUP_ID"], $arPTypes))
82 $arPTypes[] =
$ar_res[
"CATALOG_GROUP_ID"];
83 $arSelect[] =
"CATALOG_GROUP_".$ar_res[
"CATALOG_GROUP_ID"];
87 $arSectionPaths =
array();
112 $strExportErrorMessage .=
"Can not open \"".$_SERVER[
"DOCUMENT_ROOT"].$SETUP_FILE_NAME.
"\" file for writing.\n";
116 if (!@fwrite($fp,
"product_url name description image_url category price\n"))
134 $db_elems = CIBlockElement::GetList(
array(),
$arFilter,
false,
false, $arSelect);
135 while ($ar_elems = $db_elems->GetNext())
137 $ar_file = CFile::GetFileArray($ar_elems[
"DETAIL_PICTURE"]);
139 $ar_file = CFile::GetFileArray($ar_elems[
"PREVIEW_PICTURE"]);
143 if(mb_substr($ar_file[
"SRC"], 0, 1) ==
"/")
144 $strImage =
"http://".COption::GetOptionString(
"main",
"server_name", $SERVER_NAME).$ar_file[
"SRC"];
146 $strImage = $ar_file[
"SRC"];
153 if (!
is_set($arSectionPaths, intval($ar_elems[
"IBLOCK_SECTION_ID"])))
157 while ($arSection = $sections_path->GetNext())
159 if ($strCategory <>
'') $strCategory .=
">";
160 $strCategory .= $arSection[
"NAME"];
162 $arSectionPaths[intval($ar_elems[
"IBLOCK_SECTION_ID"])] =
PrepareString($strCategory);
166 for (
$i = 0, $intPCount =
count($arPTypes);
$i < $intPCount;
$i++)
168 if ($ar_elems[
"CATALOG_CURRENCY_".$arPTypes[
$i]] ==
'')
continue;
170 if ($minPrice<=0 || $minPrice>$tmpPrice)
172 $minPrice = $tmpPrice;
176 if ($minPrice <= 0)
continue;
178 @fwrite($fp,
"http://".
179 COption::GetOptionString(
"main",
"server_name", $SERVER_NAME).
180 str_replace(
"//",
"/", $ar_elems[
"DETAIL_PAGE_URL"]).
188 $arSectionPaths[intval($ar_elems[
"IBLOCK_SECTION_ID"])].
200 if (isset($USER_TMP))
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)