本文整理汇总了PHP中CCatalogGroup::GetGroupsList方法的典型用法代码示例。如果您正苦于以下问题:PHP CCatalogGroup::GetGroupsList方法的具体用法?PHP CCatalogGroup::GetGroupsList怎么用?PHP CCatalogGroup::GetGroupsList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCatalogGroup
的用法示例。
在下文中一共展示了CCatalogGroup::GetGroupsList方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ShowStep
//.........这里部分代码省略.........
<tr>
<td class="wizard-input-table-left">' . GetMessage("WIZ_SHOP_STAMP") . ':</td>
<td class="wizard-input-table-right">' . $this->ShowFileField("siteStamp", array("show_file_info" => "N", "id" => "siteStamp")) . '<br />' . CFile::ShowImage($siteStamp, 75, 75, "border=0 vspace=5", false, false) . '</td>
</tr>
</table>
</div><!--ru-->
';
//ua
/*
<tr>
<th width="35%">'.GetMessage("WIZ_SHOP_COMPANY_UA").':</th>
<td width="65%"><div class="wizard-input-form-field wizard-input-form-field-text">'.$this->ShowInputField('text', 'shopCompany_ua').'</div></td>
</tr>
*/
$this->content .= '<div id="ua_bank_details" class="wizard-input-form-block" style="display:' . ($currentLocalization == "ua" ? 'block' : 'none') . '">
<div class="wizard-input-form-block">
<label class="wizard-input-title" for="shopOfName_ua">' . GetMessage("WIZ_SHOP_OF_NAME") . '</label>' . $this->ShowInputField('text', 'shopOfName_ua', array("id" => "shopOfName_ua", "class" => "wizard-field")) . '
<p style="color:grey; margin: 3px 0 7px;">' . GetMessage("WIZ_SHOP_OF_NAME_DESCR_UA") . '</p>
</div>';
$this->content .= '<div class="wizard-input-form-block">
<label class="wizard-input-title" for="shopLocation_ua">' . GetMessage("WIZ_SHOP_LOCATION") . '</label>' . $this->ShowInputField('text', 'shopLocation_ua', array("id" => "shopLocation_ua", "class" => "wizard-field")) . '
<p style="color:grey; margin: 3px 0 7px;">' . GetMessage("WIZ_SHOP_LOCATION_DESCR_UA") . '</p>
</div>';
$this->content .= '
<div class="wizard-input-form-block">
<label class="wizard-input-title" for="shopAdr_ua">' . GetMessage("WIZ_SHOP_ADR") . '</label>' . $this->ShowInputField('textarea', 'shopAdr_ua', array("rows" => "3", "id" => "shopAdr_ua", "class" => "wizard-field")) . '
<p style="color:grey; margin: 3px 0 7px;">' . GetMessage("WIZ_SHOP_ADR_DESCR_UA") . '</p>
</div>';
$this->content .= '
<div class="wizard-catalog-title">' . GetMessage("WIZ_SHOP_RECV_UA") . '</div>
<p>' . GetMessage("WIZ_SHOP_RECV_UA_DESC") . '</p>
<table class="wizard-input-table">
<tr>
<td class="wizard-input-table-left">' . GetMessage("WIZ_SHOP_EGRPU_UA") . ':</td>
<td class="wizard-input-table-right">' . $this->ShowInputField('text', 'shopEGRPU_ua', array("class" => "wizard-field")) . '</td>
</tr>
<tr>
<td class="wizard-input-table-left">' . GetMessage("WIZ_SHOP_INN_UA") . ':</td>
<td class="wizard-input-table-right">' . $this->ShowInputField('text', 'shopINN_ua', array("class" => "wizard-field")) . '</td>
</tr>
<tr>
<td class="wizard-input-table-left">' . GetMessage("WIZ_SHOP_NDS_UA") . ':</td>
<td class="wizard-input-table-right">' . $this->ShowInputField('text', 'shopNDS_ua', array("class" => "wizard-field")) . '</td>
</tr>
<tr>
<td class="wizard-input-table-left">' . GetMessage("WIZ_SHOP_NS_UA") . ':</td>
<td class="wizard-input-table-right">' . $this->ShowInputField('text', 'shopNS_ua', array("class" => "wizard-field")) . '</td>
</tr>
<tr>
<td class="wizard-input-table-left">' . GetMessage("WIZ_SHOP_BANK_UA") . ':</td>
<td class="wizard-input-table-right">' . $this->ShowInputField('text', 'shopBank_ua', array("class" => "wizard-field")) . '</td>
</tr>
<tr>
<td class="wizard-input-table-left">' . GetMessage("WIZ_SHOP_MFO_UA") . ':</td>
<td class="wizard-input-table-right">' . $this->ShowInputField('text', 'shopMFO_ua', array("class" => "wizard-field")) . '</td>
</tr>
<tr>
<td class="wizard-input-table-left">' . GetMessage("WIZ_SHOP_PLACE_UA") . ':</td>
<td class="wizard-input-table-right">' . $this->ShowInputField('text', 'shopPlace_ua', array("class" => "wizard-field")) . '</td>
</tr>
<tr>
<td class="wizard-input-table-left">' . GetMessage("WIZ_SHOP_FIO_UA") . ':</td>
<td class="wizard-input-table-right">' . $this->ShowInputField('text', 'shopFIO_ua', array("class" => "wizard-field")) . '</td>
</tr>
<tr>
<td class="wizard-input-table-left">' . GetMessage("WIZ_SHOP_TAX_UA") . ':</td>
<td class="wizard-input-table-right">' . $this->ShowInputField('text', 'shopTax_ua', array("class" => "wizard-field")) . '</td>
</tr>
</table>
</div>
';
if (CModule::IncludeModule("catalog")) {
$db_res = CCatalogGroup::GetGroupsList(array("CATALOG_GROUP_ID" => '1', "BUY" => "Y", "GROUP_ID" => 2));
if (!$db_res->Fetch()) {
$this->content .= '
<div class="wizard-input-form-block">
<div class="wizard-catalog-title">' . GetMessage("WIZ_SHOP_PRICE_BASE_TITLE") . '</div>
<div class="wizard-input-form-block-content">
' . GetMessage("WIZ_SHOP_PRICE_BASE_TEXT1") . '<br><br>
' . $this->ShowCheckboxField("installPriceBASE", "Y", array("id" => "install-demo-data")) . ' <label for="install-demo-data">' . GetMessage("WIZ_SHOP_PRICE_BASE_TEXT2") . '</label><br />
</div>
</div>';
}
}
$this->content .= '</div>';
$this->content .= '
<script>
function langReload()
{
var objSel = document.getElementById("localization_select");
var locSelected = objSel.options[objSel.selectedIndex].value;
document.getElementById("ru_bank_details").style.display = (locSelected == "ru" || locSelected == "kz") ? "block" : "none";
document.getElementById("ua_bank_details").style.display = (locSelected == "ua") ? "block" : "none";
/*document.getElementById("kz_bank_details").style.display = (locSelected == "kz") ? "block" : "none";*/
}
</script>
';
}
}
示例2: while
{
BX.bind(obExportConds, 'change', changePropCondCont);
}
});
</script><?php
?>
</div><?php
}
?>
</td>
</tr>
<?php
}
$tabControl->BeginNextTab();
$arGroups = '';
$dbRes = CCatalogGroup::GetGroupsList(array("GROUP_ID" => 2));
while ($arRes = $dbRes->Fetch()) {
if ($arRes['BUY'] == 'Y') {
$arGroups[] = $arRes['CATALOG_GROUP_ID'];
}
}
?>
<tr class="heading">
<td colspan="2"><?php
echo GetMessage('YANDEX_PRICES');
?>
</td>
</tr>
<tr>
<td><?php
示例3: unset
unset($USER);
}
$USER = new CUser();
}
CCatalogDiscountSave::Disable();
$arRunErrors = array();
$IBLOCK_ID = (int) $IBLOCK_ID;
if ($XML_DATA && CheckSerializedData($XML_DATA)) {
$XML_DATA = unserialize(stripslashes($XML_DATA));
if (!is_array($XML_DATA)) {
$XML_DATA = array();
}
}
if (!empty($XML_DATA['PRICE'])) {
if ((int) $XML_DATA['PRICE'] > 0) {
$rsCatalogGroups = CCatalogGroup::GetGroupsList(array('CATALOG_GROUP_ID' => $XML_DATA['PRICE'], 'GROUP_ID' => 2));
if (!($arCatalogGroup = $rsCatalogGroups->Fetch())) {
$arRunErrors[] = GetMessage('EBAY_ERR_BAD_PRICE_TYPE');
}
} else {
$arRunErrors[] = GetMessage('EBAY_ERR_BAD_PRICE_TYPE');
}
}
if (strlen($SETUP_FILE_NAME) <= 0) {
$arRunErrors[] = GetMessage("CATI_NO_SAVE_FILE");
} elseif (preg_match(BX_CATALOG_FILENAME_REG, $SETUP_FILE_NAME)) {
$arRunErrors[] = GetMessage("CES_ERROR_BAD_EXPORT_FILENAME");
} else {
$SETUP_FILE_NAME = Rel2Abs("/", $SETUP_FILE_NAME);
}
if (empty($arRunErrors)) {
示例4: Array
CCatalogVat::Set($arF);
$arF = Array ("ACTIVE" => "Y", "SORT" => "200", "NAME" => GetMessage("WIZ_VAT_2"), "RATE" => GetMessage("WIZ_VAT_2_VALUE"));
CCatalogVat::Set($arF);
}
$dbResultList = CCatalogGroup::GetList(Array(), Array("CODE" => "BASE"));
if($arRes = $dbResultList->Fetch())
{
$arFields = Array();
foreach($arLanguages as $langID)
{
WizardServices::IncludeServiceLang("step1.php", $langID);
$arFields["USER_LANG"][$langID] = GetMessage("WIZ_PRICE_NAME");
}
$arFields["BASE"] = "Y";
if($wizard->GetVar("installPriceBASE") == "Y"){
$db_res = CCatalogGroup::GetGroupsList(array("CATALOG_GROUP_ID"=>'1', "BUY"=>"Y"));
if ($ar_res = $db_res->Fetch())
{
$wizGroupId[] = $ar_res['GROUP_ID'];
}
$wizGroupId[] = 2;
$arFields["USER_GROUP"] = $wizGroupId;
$arFields["USER_GROUP_BUY"] = $wizGroupId;
}
CCatalogGroup::Update($arRes["ID"], $arFields);
}
//making orders
function __MakeOrder($prdCnt=1, $arData = Array())
{
global $APPLICATION, $USER, $DB;
示例5: GetGroupsPerms
public static function GetGroupsPerms($arUserGroups = array(), $arCatalogGroupsFilter = array())
{
global $USER;
if (!is_array($arUserGroups))
$arUserGroups = array($arUserGroups);
if (empty($arUserGroups))
{
$arUserGroups = (CCatalog::IsUserExists() ? $USER->GetUserGroupArray() : array(2));
}
$arUserGroupsFilter = array();
foreach ($arUserGroups as &$intUserGroupID)
{
$intUserGroupID = intval($intUserGroupID);
if (0 < $intUserGroupID)
$arUserGroupsFilter[] = $intUserGroupID;
}
if (isset($intUserGroupID))
unset($intUserGroupID);
if (!is_array($arCatalogGroupsFilter))
$arCatalogGroupsFilter = array($arCatalogGroupsFilter);
$arResult = array();
$arResult["view"] = array();
$arResult["buy"] = array();
if (empty($arUserGroupsFilter))
return $arResult;
$arData = array();
if (defined("CATALOG_SKIP_CACHE") && CATALOG_SKIP_CACHE)
{
$dbPriceGroups = CCatalogGroup::GetGroupsList(array("GROUP_ID" => $arUserGroupsFilter));
while ($arPriceGroup = $dbPriceGroups->Fetch())
{
$arPriceGroup["CATALOG_GROUP_ID"] = intval($arPriceGroup["CATALOG_GROUP_ID"]);
$key = (($arPriceGroup["BUY"] == "Y") ? "buy" : "view");
if ($key == "view")
if (!empty($arCatalogGroupsFilter))
if (!in_array($arPriceGroup["CATALOG_GROUP_ID"], $arCatalogGroupsFilter))
continue;
if (!in_array($arPriceGroup["CATALOG_GROUP_ID"], $arResult[$key]))
$arResult[$key][] = $arPriceGroup["CATALOG_GROUP_ID"];
}
return $arResult;
}
$cacheTime = CATALOG_CACHE_DEFAULT_TIME;
if (defined("CATALOG_CACHE_TIME"))
$cacheTime = intval(CATALOG_CACHE_TIME);
global $CACHE_MANAGER;
if ($CACHE_MANAGER->Read($cacheTime, "catalog_group_perms"))
{
$arData = $CACHE_MANAGER->Get("catalog_group_perms");
}
else
{
$dbPriceGroups = CCatalogGroup::GetGroupsList(array());
while ($arPriceGroup = $dbPriceGroups->Fetch())
{
$arPriceGroup["GROUP_ID"] = intval($arPriceGroup["GROUP_ID"]);
$arPriceGroup["CATALOG_GROUP_ID"] = intval($arPriceGroup["CATALOG_GROUP_ID"]);
$key = (($arPriceGroup["BUY"] == "Y") ? "buy" : "view");
$arData[$arPriceGroup["GROUP_ID"]][$key][] = intval($arPriceGroup["CATALOG_GROUP_ID"]);
}
$CACHE_MANAGER->Set("catalog_group_perms", $arData);
}
for ($i = 0, $cnt = count($arUserGroupsFilter); $i < $cnt; $i++)
{
if (array_key_exists($arUserGroupsFilter[$i], $arData))
{
if (array_key_exists("view", $arData[$arUserGroupsFilter[$i]]))
$arResult["view"] = array_merge($arResult["view"], $arData[$arUserGroupsFilter[$i]]["view"]);
if (array_key_exists("buy", $arData[$arUserGroupsFilter[$i]]))
$arResult["buy"] = array_merge($arResult["buy"], $arData[$arUserGroupsFilter[$i]]["buy"]);
}
}
$arResult["view"] = array_unique($arResult["view"]);
$arResult["buy"] = array_unique($arResult["buy"]);
if (!empty($arCatalogGroupsFilter))
{
$arTmp = array();
foreach ($arResult["view"] as $i => $arView)
//for ($i = 0, $cnt = count($arResult["view"]); $i < $cnt; $i++)
{
if (in_array($arResult["view"][$i], $arCatalogGroupsFilter))
$arTmp[] = $arResult["view"][$i];
//.........这里部分代码省略.........
示例6: GetDiscount
/**
* @param int $intProductID
* @param int $intIBlockID
* @param array $arCatalogGroups
* @param array $arUserGroups
* @param string $strRenewal
* @param bool|string $siteID
* @param bool|array $arDiscountCoupons
* @param bool $boolSKU
* @param bool $boolGetIDS
* @return array|false
*/
public function GetDiscount($intProductID, $intIBlockID, $arCatalogGroups = array(), $arUserGroups = array(), $strRenewal = "N", $siteID = false, $arDiscountCoupons = false, $boolSKU = true, $boolGetIDS = false)
{
static $eventOnGetExists = null;
static $eventOnResultExists = null;
global $DB, $APPLICATION;
self::initDiscountSettings();
if ($eventOnGetExists === true || $eventOnGetExists === null) {
foreach (GetModuleEvents("catalog", "OnGetDiscount", true) as $arEvent) {
$eventOnGetExists = true;
$mxResult = ExecuteModuleEventEx($arEvent, array($intProductID, $intIBlockID, $arCatalogGroups, $arUserGroups, $strRenewal, $siteID, $arDiscountCoupons, $boolSKU, $boolGetIDS));
if ($mxResult !== true) {
return $mxResult;
}
}
if ($eventOnGetExists === null) {
$eventOnGetExists = false;
}
}
$boolSKU = $boolSKU === true;
$boolGetIDS = $boolGetIDS === true;
$intProductID = (int) $intProductID;
if ($intProductID <= 0) {
$APPLICATION->ThrowException(Loc::getMessage("BT_MOD_CATALOG_DISC_ERR_PRODUCT_ID_ABSENT"), "NO_PRODUCT_ID");
return false;
}
$intIBlockID = (int) $intIBlockID;
if ($intIBlockID <= 0) {
$APPLICATION->ThrowException(Loc::getMessage("BT_MOD_CATALOG_DISC_ERR_IBLOCK_ID_ABSENT"), "NO_IBLOCK_ID");
return false;
}
if (!is_array($arUserGroups)) {
$arUserGroups = array($arUserGroups);
}
$arUserGroups[] = 2;
if (!empty($arUserGroups)) {
Main\Type\Collection::normalizeArrayValuesByInt($arUserGroups, true);
}
if (!is_array($arCatalogGroups)) {
$arCatalogGroups = array($arCatalogGroups);
}
if (empty($arCatalogGroups)) {
$catalogGroupIterator = CCatalogGroup::GetGroupsList(array('GROUP_ID' => $arUserGroups, 'BUY' => array('Y', 'N')));
while ($catalogGroup = $catalogGroupIterator->Fetch()) {
$arCatalogGroups[$catalogGroup['CATALOG_GROUP_ID']] = $catalogGroup['CATALOG_GROUP_ID'];
}
unset($catalogGroup, $catalogGroupIterator);
}
if (!empty($arCatalogGroups)) {
Main\Type\Collection::normalizeArrayValuesByInt($arCatalogGroups, true);
}
if (empty($arCatalogGroups)) {
return false;
}
$strRenewal = (string) $strRenewal == 'Y' ? 'Y' : 'N';
if ($siteID === false) {
$siteID = SITE_ID;
}
$arSKUExt = false;
if ($boolSKU) {
$arSKUExt = CCatalogSKU::GetInfoByOfferIBlock($intIBlockID);
$boolSKU = !empty($arSKUExt);
}
$arResult = array();
$arResultID = array();
if (self::$useSaleDiscount) {
} else {
$strCacheKey = md5('C' . implode('_', $arCatalogGroups) . '-' . 'U' . implode('_', $arUserGroups));
if (!isset(self::$arCacheDiscountFilter[$strCacheKey])) {
$arFilter = array('PRICE_TYPE_ID' => $arCatalogGroups, 'USER_GROUP_ID' => $arUserGroups);
$arDiscountIDs = CCatalogDiscount::__GetDiscountID($arFilter);
if (!empty($arDiscountIDs)) {
sort($arDiscountIDs);
}
self::$arCacheDiscountFilter[$strCacheKey] = $arDiscountIDs;
} else {
$arDiscountIDs = self::$arCacheDiscountFilter[$strCacheKey];
}
$arProduct = array();
if (!empty($arDiscountIDs)) {
if ($arDiscountCoupons === false) {
if (self::$existCouponsManager && Loader::includeModule('sale')) {
$arDiscountCoupons = DiscountCouponsManager::getForApply(array('MODULE' => 'catalog', 'DISCOUNT_ID' => $arDiscountIDs), array('MODULE' => 'catalog', 'PRODUCT_ID' => $intProductID, 'BASKET_ID' => '0'), true);
if (!empty($arDiscountCoupons)) {
$arDiscountCoupons = array_keys($arDiscountCoupons);
}
} else {
if (!isset($_SESSION['CATALOG_USER_COUPONS']) || !is_array($_SESSION['CATALOG_USER_COUPONS'])) {
$_SESSION['CATALOG_USER_COUPONS'] = array();
//.........这里部分代码省略.........
示例7: while
}
?>
><?php
echo $val;
?>
</option>
<?php
}
?>
</select>
</td>
</tr>
<?php
$arGroups = '';
if ($iCatalog) {
$dbRes = CCatalogGroup::GetGroupsList(array());
while ($arRes = $dbRes->Fetch()) {
if ($arRes['BUY'] == 'Y') {
$arGroups[] = $arRes['CATALOG_GROUP_ID'];
}
}
?>
<tr>
<td width="40%" class="adm-detail-content-cell-l"><?php
echo GetMessage('ACRIT_PRICE_TYPE');
?>
: </td>
<td width="40%" class="adm-detail-content-cell-r">
<br/><select name="PRICE">
<option value=""<?php
echo $acrit_PRICE == "" || $acrit_PRICE == 0 ? ' selected' : '';
示例8: array
$DB->Rollback();
}
}
$boolRealBase = false;
$arDefaultValues = array('NAME' => '', 'BASE' => 'N', 'SORT' => 100, 'XML_ID' => '');
$arSelect = array_merge(array('ID'), array_keys($arDefaultValues));
$arCatalogGroup = array();
$arGroupUserList = array();
$arGroupUserBuyList = array();
$arGroupLangList = array();
$rsCatalogGroups = CCatalogGroup::GetList(array(), array('ID' => $ID), false, false, $arSelect);
if (!($arCatalogGroup = $rsCatalogGroups->Fetch())) {
$ID = 0;
$arCatalogGroup = $arDefaultValues;
} else {
$rsGroups = CCatalogGroup::GetGroupsList(array("CATALOG_GROUP_ID" => $ID));
while ($arGroup = $rsGroups->Fetch()) {
$arGroup['GROUP_ID'] = intval($arGroup['GROUP_ID']);
if ('Y' == $arGroup['BUY']) {
$arGroupUserBuyList[] = $arGroup['GROUP_ID'];
} else {
$arGroupUserList[] = $arGroup['GROUP_ID'];
}
}
$rsLangs = CCatalogGroup::GetLangList(array("CATALOG_GROUP_ID" => $ID));
while ($arLang = $rsLangs->Fetch()) {
$arGroupLangList[$arLang['LID']] = $arLang['NAME'];
}
$boolRealBase = 0 < $ID && 'Y' == $arCatalogGroup['BASE'];
}
if ($bVarsFromForm) {
示例9: GetGroupsPerms
function GetGroupsPerms($arUserGroups = array(), $arCatalogGroupsFilter = array())
{
global $USER;
if (!is_array($arUserGroups)) {
$arUserGroups = array($arUserGroups);
}
if (count($arUserGroups) <= 0) {
$arUserGroups = $USER->GetUserGroupArray();
}
$arUserGroupsFilter = array();
for ($i = 0, $cnt = count($arUserGroups); $i < $cnt; $i++) {
$arUserGroups[$i] = IntVal($arUserGroups[$i]);
if ($arUserGroups[$i] > 0) {
$arUserGroupsFilter[] = $arUserGroups[$i];
}
}
$arResult = array();
$arResult["view"] = array();
$arResult["buy"] = array();
if (count($arUserGroupsFilter) <= 0) {
return $arResult;
}
$arData = array();
if (defined("CATALOG_SKIP_CACHE") && CATALOG_SKIP_CACHE) {
$dbPriceGroups = CCatalogGroup::GetGroupsList(array("GROUP_ID" => $arUserGroupsFilter));
while ($arPriceGroup = $dbPriceGroups->Fetch()) {
$arPriceGroup["CATALOG_GROUP_ID"] = IntVal($arPriceGroup["CATALOG_GROUP_ID"]);
$key = $arPriceGroup["BUY"] == "Y" ? "buy" : "view";
if ($key == "view") {
if (count($arCatalogGroupsFilter) > 0) {
if (!in_array($arPriceGroup["CATALOG_GROUP_ID"], $arCatalogGroupsFilter)) {
continue;
}
}
}
if (!in_array($arPriceGroup["CATALOG_GROUP_ID"], $arResult[$key])) {
$arResult[$key][] = $arPriceGroup["CATALOG_GROUP_ID"];
}
}
return $arResult;
}
$cacheTime = CATALOG_CACHE_DEFAULT_TIME;
if (defined("CATALOG_CACHE_TIME")) {
$cacheTime = IntVal(CATALOG_CACHE_TIME);
}
global $CACHE_MANAGER;
if ($CACHE_MANAGER->Read($cacheTime, "catalog_group_perms")) {
$arData = $CACHE_MANAGER->Get("catalog_group_perms");
} else {
$dbPriceGroups = CCatalogGroup::GetGroupsList(array());
while ($arPriceGroup = $dbPriceGroups->Fetch()) {
$arPriceGroup["GROUP_ID"] = IntVal($arPriceGroup["GROUP_ID"]);
$arPriceGroup["CATALOG_GROUP_ID"] = IntVal($arPriceGroup["CATALOG_GROUP_ID"]);
$key = $arPriceGroup["BUY"] == "Y" ? "buy" : "view";
$arData[$arPriceGroup["GROUP_ID"]][$key][] = IntVal($arPriceGroup["CATALOG_GROUP_ID"]);
}
$CACHE_MANAGER->Set("catalog_group_perms", $arData);
}
for ($i = 0, $cnt = count($arUserGroupsFilter); $i < $cnt; $i++) {
if (array_key_exists($arUserGroupsFilter[$i], $arData)) {
if (array_key_exists("view", $arData[$arUserGroupsFilter[$i]])) {
$arResult["view"] = array_merge($arResult["view"], $arData[$arUserGroupsFilter[$i]]["view"]);
}
if (array_key_exists("buy", $arData[$arUserGroupsFilter[$i]])) {
$arResult["buy"] = array_merge($arResult["buy"], $arData[$arUserGroupsFilter[$i]]["buy"]);
}
}
}
$arResult["view"] = array_unique($arResult["view"]);
$arResult["buy"] = array_unique($arResult["buy"]);
if (count($arCatalogGroupsFilter) > 0) {
$arTmp = array();
foreach ($arResult["view"] as $i => $arView) {
if (in_array($arResult["view"][$i], $arCatalogGroupsFilter)) {
$arTmp[] = $arResult["view"][$i];
}
}
$arResult["view"] = $arTmp;
}
return $arResult;
}