本文整理汇总了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
示例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)) {