当前位置: 首页>>代码示例>>PHP>>正文


PHP CCatalogDiscount::GetDiscountProductsList方法代码示例

本文整理汇总了PHP中CCatalogDiscount::GetDiscountProductsList方法的典型用法代码示例。如果您正苦于以下问题:PHP CCatalogDiscount::GetDiscountProductsList方法的具体用法?PHP CCatalogDiscount::GetDiscountProductsList怎么用?PHP CCatalogDiscount::GetDiscountProductsList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CCatalogDiscount的用法示例。


在下文中一共展示了CCatalogDiscount::GetDiscountProductsList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

// PR($_COOKIE["actionpay"]);

// file_put_contents($_SERVER["DOCUMENT_ROOT"] . "/z/___log.php", "asd");

// PR($_COOKIE["bigbuzzy"]);


// Выборка товаров со скидками
$arFilter = array(
	"DISCOUNT_ID" => array(10, 11, 12, 13, 16, 18, 25, 27, 28, 29, 30, 33, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55)
	// "DISCOUNT_ID" => array(10, 11, 12, 13, 16, 18, 25, 27, 28, 29, 30, 33)
);
$res = CCatalogDiscount::GetDiscountProductsList(
	array(),
	$arFilter,
	false,
	false,
	array()
);
$str = "<?php \narray(\n";
while($item = $res->GetNext()){
	PR($item);
	$str .= "'" . $item["PRODUCT_ID"] . "',\n";
}
$str .= ");";
file_put_contents($_SERVER["DOCUMENT_ROOT"] . "/include/discount_ids2.php", $str);


$arLogic = array(
		"CLASS_ID" => "CondGroup",
		"DATA" => array(
开发者ID:akniyev,项目名称:arteva.ru,代码行数:31,代码来源:test.php

示例2: ConvertDiscount


//.........这里部分代码省略.........
         $boolEmpty = true;
         $arSrcList = array();
         $rsSections = CCatalogDiscount::GetDiscountSectionsList(array(), array('DISCOUNT_ID' => $arDiscount['ID']), false, false, array('SECTION_ID'));
         while ($arSection = $rsSections->Fetch()) {
             $boolEmpty = false;
             $arSrcList[] = $arSection['SECTION_ID'];
             $arSection['SECTION_ID'] = intval($arSection['SECTION_ID']);
             if (0 < $arSection['SECTION_ID']) {
                 $arSectionList[] = $arSection['SECTION_ID'];
             }
         }
         if (!empty($arSectionList)) {
             $arSectionList = array_values(array_unique($arSectionList));
             $rsSections = CIBlockSection::GetList(array(), array('ID' => $arSectionList), false, array('ID'));
             $arCheckResult = array();
             while ($arSection = $rsSections->Fetch()) {
                 $arCheckResult[] = intval($arSection['ID']);
             }
             if (!empty($arCheckResult)) {
                 $arSectionList = $arCheckResult;
                 $intEntityCount++;
             } else {
                 $arSectionList = array();
             }
         }
         if (empty($arSectionList)) {
             if (!$boolEmpty) {
                 $boolActive = false;
                 $arSrcEntity[] = str_replace('#IDS#', implode(', ', $arSrcList), GetMessage('BT_MOD_CAT_DSC_CONV_ENTITY_SECTION_ERR'));
             }
         }
         $boolEmpty = true;
         $arSrcList = array();
         $rsElements = CCatalogDiscount::GetDiscountProductsList(array(), array('DISCOUNT_ID' => $arDiscount['ID']), false, false, array('PRODUCT_ID'));
         while ($arElement = $rsElements->Fetch()) {
             $boolEmpty = false;
             $arSrcList[] = $arElement['PRODUCT_ID'];
             $arElement['PRODUCT_ID'] = intval($arElement['PRODUCT_ID']);
             if (0 < $arElement['PRODUCT_ID']) {
                 $arElementList[] = $arElement['PRODUCT_ID'];
             }
         }
         if (!empty($arElementList)) {
             $arElementList = array_values(array_unique($arElementList));
             $rsItems = CIBlockElement::GetList(array(), array('ID' => $arElementList), false, false, array('ID'));
             $arCheckResult = array();
             while ($arItem = $rsItems->Fetch()) {
                 $arCheckResult[] = intval($arItem['ID']);
             }
             if (!empty($arCheckResult)) {
                 $arElementList = $arCheckResult;
                 $intEntityCount++;
             } else {
                 $arElementList = array();
             }
         }
         if (empty($arElementList)) {
             if (!$boolEmpty) {
                 $boolActive = false;
                 $arSrcEntity[] = str_replace('#IDS#', implode(', ', $arSrcList), GetMessage('BT_MOD_CAT_DSC_CONV_ENTITY_ELEMENT_ERR'));
             }
         }
         if (!empty($arIBlockList)) {
             if (1 < count($arIBlockList)) {
                 $arList = array();
                 foreach ($arIBlockList as &$intItemID) {
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:67,代码来源:discount_convert.php


注:本文中的CCatalogDiscount::GetDiscountProductsList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。