本文整理汇总了PHP中CCatalogDiscount::GetDiscountCatsList方法的典型用法代码示例。如果您正苦于以下问题:PHP CCatalogDiscount::GetDiscountCatsList方法的具体用法?PHP CCatalogDiscount::GetDiscountCatsList怎么用?PHP CCatalogDiscount::GetDiscountCatsList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCatalogDiscount
的用法示例。
在下文中一共展示了CCatalogDiscount::GetDiscountCatsList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
{
$rsDiscounts = CCatalogDiscount::GetList(array(), array("ID" => $ID), false, false, $arSelect);
if (!($arDiscount = $rsDiscounts->Fetch()))
{
$ID = 0;
$arDiscount = $arDefaultValues;
$arCoupons = $arDefCoupons;
}
else
{
$rsDiscountGroups = CCatalogDiscount::GetDiscountGroupsList(array(), array("DISCOUNT_ID" => $ID));
while ($arDiscountGroup = $rsDiscountGroups->Fetch())
{
$arDiscountGroupList[] = intval($arDiscountGroup["GROUP_ID"]);
}
$rsDiscountCats = CCatalogDiscount::GetDiscountCatsList(array(), array("DISCOUNT_ID" => $ID));
while ($arDiscountCat = $rsDiscountCats->Fetch())
{
$arDiscountCatList[] = intval($arDiscountCat["CATALOG_GROUP_ID"]);
}
if (!isset($arDiscount['VERSION']) || intval($arDiscount['VERSION']) != CCatalogDiscount::CURRENT_FORMAT)
{
$bReadOnly = true;
$boolShowCoupons = false;
$rsAdminNotify = CAdminNotify::GetList(array(), array('MODULE_ID'=>'catalog', 'TAG' => 'CATALOG_DISC_CONVERT'));
if (!($arAdminNotify = $rsAdminNotify->Fetch()))
{
$strLangPath = $_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/catalog/lang/';
$strDefLang = false;
$arLangList = array();
示例2: array
$arDiscount = $arDefaultValues;
$arDiscountGroupList = array();
$arDiscountCatList = array();
$arCoupons = $arDefCoupons;
if (0 < $ID) {
$rsDiscounts = CCatalogDiscount::GetList(array(), array("ID" => $ID), false, false, $arSelect);
if (!($arDiscount = $rsDiscounts->Fetch())) {
$ID = 0;
$arDiscount = $arDefaultValues;
$arCoupons = $arDefCoupons;
} else {
$rsDiscountGroups = CCatalogDiscount::GetDiscountGroupsList(array(), array('DISCOUNT_ID' => $ID, '>USER_GROUP_ID' => 0), false, false, array('ID', 'DISCOUNT_ID', 'USER_GROUP_ID'));
while ($arDiscountGroup = $rsDiscountGroups->Fetch()) {
$arDiscountGroupList[] = (int) $arDiscountGroup['USER_GROUP_ID'];
}
$rsDiscountCats = CCatalogDiscount::GetDiscountCatsList(array(), array('DISCOUNT_ID' => $ID, '>PRICE_TYPE_ID' => 0), false, false, array('ID', 'DISCOUNT_ID', 'PRICE_TYPE_ID'));
while ($arDiscountCat = $rsDiscountCats->Fetch()) {
$arDiscountCatList[] = (int) $arDiscountCat['PRICE_TYPE_ID'];
}
if (!isset($arDiscount['VERSION']) || (int) $arDiscount['VERSION'] != CCatalogDiscount::CURRENT_FORMAT) {
$readOnly = true;
$boolShowCoupons = false;
$rsAdminNotify = CAdminNotify::GetList(array(), array('MODULE_ID' => 'catalog', 'TAG' => 'CATALOG_DISC_CONVERT'));
if (!($arAdminNotify = $rsAdminNotify->Fetch())) {
$strLangPath = $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/catalog/lang/';
$strDefLang = false;
$arLangList = array();
$by = "def";
$order = "desc";
$rsLangs = CLanguage::GetList($by, $order);
while ($arOneLang = $rsLangs->Fetch()) {