當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CCatalogDiscountSave::GetByID方法代碼示例

本文整理匯總了PHP中CCatalogDiscountSave::GetByID方法的典型用法代碼示例。如果您正苦於以下問題:PHP CCatalogDiscountSave::GetByID方法的具體用法?PHP CCatalogDiscountSave::GetByID怎麽用?PHP CCatalogDiscountSave::GetByID使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CCatalogDiscountSave的用法示例。


在下文中一共展示了CCatalogDiscountSave::GetByID方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1:

				if ($ex = $APPLICATION->GetException())
				{
					$lAdmin->AddGroupError(str_replace('#ERR#',$ex->GetString(),GetMessage("BT_CAT_DISC_SAVE_ADM_ERR_DELETE_ERR")), $ID);
				}
				else
				{
					$lAdmin->AddGroupError(GetMessage("BT_CAT_DISC_SAVE_ADM_ERR_UPDATE_DELETE"), $ID);
				}
				$DB->Rollback();
			}
			$DB->Commit();
			break;

		case "activate":
		case "deactivate":
			if(($rsDiscSaves = $obDiscSave->GetByID($ID)) && ($arFields = $rsDiscSaves->Fetch()))
			{
				$arFields["ACTIVE"] = ($_REQUEST['action'] == "activate" ? "Y" : "N");
				if(!$obDiscSave->Update($ID, $arFields))
				{
					if ($ex = $APPLICATION->GetException())
					{
						$lAdmin->AddGroupError(str_replace('#ERR#',$ex->GetString(),GetMessage("BT_CAT_DISC_SAVE_ADM_ERR_UPDATE_ERR")), $ID);
					}
					else
					{
						$lAdmin->AddGroupError(GetMessage("BT_CAT_DISC_SAVE_ADM_ERR_UPDATE_UNKNOWN"), $ID);
					}
				}
			}
			else
開發者ID:ASDAFF,項目名稱:entask.ru,代碼行數:31,代碼來源:cat_discsave_admin.php

示例2: array

$str_SORT = 500;
$str_CURRENCY = '';
$str_ACTIVE_FROM = '';
$str_ACTION_TO = '';
$str_COUNT_PERIOD = 'U';
$str_ACTION_PERIOD = 'U';
$str_COUNT_SIZE = 0;
$str_COUNT_TYPE = 'M';
$str_COUNT_FROM = '';
$str_COUNT_TO = '';
$str_ACTION_SIZE = 0;
$str_ACTION_TYPE = 'M';
$arRanges = array();
$arGroupList = array();
if ($ID > 0) {
    $rsDiscSaves = CCatalogDiscountSave::GetByID($ID);
    if (!$rsDiscSaves->ExtractFields("str_")) {
        $ID = 0;
    }
}
if ($ID > 0) {
    $rsDiscGroups = CCatalogDiscountSave::GetGroupByDiscount(array(), array('DISCOUNT_ID' => $ID));
    while ($arDiscGroup = $rsDiscGroups->Fetch()) {
        $arGroupList[] = $arDiscGroup['GROUP_ID'];
    }
    $rsDiscRanges = CCatalogDiscountSave::GetRangeByDiscount(array('RANGE_FROM' => 'ASC'), array('DISCOUNT_ID' => $ID));
    while ($arDiscRange = $rsDiscRanges->Fetch()) {
        $arRanges[] = $arDiscRange;
    }
}
if (!isset($COUNT_PERIOD)) {
開發者ID:k-kalashnikov,項目名稱:geekcon_new,代碼行數:31,代碼來源:cat_discsave_edit.php


注:本文中的CCatalogDiscountSave::GetByID方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。