本文整理汇总了PHP中CCatalogDiscountSave::__GetUserInfoByDiscount方法的典型用法代码示例。如果您正苦于以下问题:PHP CCatalogDiscountSave::__GetUserInfoByDiscount方法的具体用法?PHP CCatalogDiscountSave::__GetUserInfoByDiscount怎么用?PHP CCatalogDiscountSave::__GetUserInfoByDiscount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCatalogDiscountSave
的用法示例。
在下文中一共展示了CCatalogDiscountSave::__GetUserInfoByDiscount方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetDiscount
//.........这里部分代码省略.........
$arDiscSave['COUNT_FROM_UT'] = MakeTimeStamp($arDiscSave['COUNT_FROM']);
}
if (!empty($arDiscSave['COUNT_TO'])) {
$arDiscSave['COUNT_TO_UT'] = MakeTimeStamp($arDiscSave['COUNT_TO']);
if ($arDiscSave['COUNT_TO_UT'] > $intCountTime) {
$arDiscSave['COUNT_TO_UT'] = $intCountTime;
$arDiscSave['COUNT_TO'] = ConvertTimeStamp($intCountTime, 'FULL');
}
}
} elseif ($arDiscSave['COUNT_SIZE'] > 0 && in_array($arDiscSave['COUNT_TYPE'], array('D', 'M', 'Y'))) {
$strCountPeriod = self::COUNT_TIME_PERIOD;
$arCountPeriodBack = CCatalogDiscountSave::__GetTimeStampArray($arDiscSave['COUNT_SIZE'], $arDiscSave['COUNT_TYPE']);
}
if ($strCountPeriod == self::COUNT_TIME_INTERVAL) {
if (false !== $arDiscSave['COUNT_FROM_UT']) {
if ($arDiscSave['COUNT_FROM_UT'] > $intCountTime) {
continue;
}
if (false !== $arDiscSave['COUNT_TO_UT'] && $arDiscSave['COUNT_TO_UT'] <= $arDiscSave['COUNT_FROM_UT']) {
continue;
}
if (false !== $arDiscSave['ACTIVE_TO_UT'] && $arDiscSave['COUNT_FROM_UT'] >= $arDiscSave['ACTIVE_TO_UT']) {
continue;
}
}
if (false !== $arDiscSave['COUNT_TO_UT']) {
if ($strActionPeriod == self::ACTION_TIME_PERIOD && $arDiscSave['COUNT_TO_UT'] < AddToTimeStamp($arActionPeriodBack, $intCountTime)) {
continue;
}
}
}
if ($strActionPeriod == self::ACTION_TIME_PERIOD) {
if ($strCountPeriod == self::COUNT_TIME_PERIOD) {
$arStartDate = CCatalogDiscountSave::__GetUserInfoByDiscount(array('DISCOUNT_ID' => $arDiscSave['ID'], 'USER_ID' => $intUserID, 'ACTIVE_FROM' => date($DB->DateFormatToPHP(CSite::GetDateFormat("FULL")), AddToTimeStamp($arActionPeriodBack, $intCountTime))));
if (is_array($arStartDate) && !empty($arStartDate)) {
$arOldOrderFilter['<DATE_INSERT'] = $arStartDate['ACTIVE_FROM_FORMAT'];
$arOldOrderFilter['>=DATE_INSERT'] = date($DB->DateFormatToPHP(CSite::GetDateFormat("FULL")), AddToTimeStamp($arCountPeriodBack, MakeTimeStamp($arStartDate['ACTIVE_FROM_FORMAT'])));
$arOldOrderSumm = CCatalogDiscountSave::__SaleOrderSumm($arOldOrderFilter, $arDiscSave['CURRENCY']);
}
} else {
$arStartDate = CCatalogDiscountSave::__GetUserInfoByDiscount(array('DISCOUNT_ID' => $arDiscSave['ID'], 'USER_ID' => $intUserID), array('ACTIVE_FROM' => false, 'DELETE' => false));
if (is_array($arStartDate) && !empty($arStartDate)) {
$intTimeStart = MakeTimeStamp($arStartDate['ACTIVE_FROM_FORMAT']);
$intTimeFinish = MakeTimeStamp($arStartDate['ACTIVE_TO_FORMAT']);
if (!($intTimeStart <= $intCountTime && $intTimeFinish >= $intCountTime)) {
continue;
} else {
$boolPeriodInsert = false;
}
}
}
}
$intTimeStart = false;
$intTimeFinish = false;
if ($strCountPeriod == self::COUNT_TIME_INTERVAL) {
$intTimeStart = !empty($arDiscSave['COUNT_FROM']) ? $arDiscSave['COUNT_FROM'] : false;
$intTimeFinish = !empty($arDiscSave['COUNT_TO']) ? $arDiscSave['COUNT_TO'] : false;
} elseif ($strCountPeriod == self::COUNT_TIME_PERIOD) {
$intTimeStart = date($DB->DateFormatToPHP(CSite::GetDateFormat("FULL")), AddToTimeStamp($arCountPeriodBack, $intCountTime));
}
if ($intTimeStart) {
$arOrderFilter['>=DATE_INSERT'] = $intTimeStart;
}
if ($intTimeFinish) {
$arOrderFilter['<DATE_INSERT'] = $intTimeFinish;
}
示例2: GetDiscount
//.........这里部分代码省略.........
$arDiscSave['COUNT_FROM_UT'] = MakeTimeStamp($arDiscSave['COUNT_FROM']);
}
if (!empty($arDiscSave['COUNT_TO'])) {
$arDiscSave['COUNT_TO_UT'] = MakeTimeStamp($arDiscSave['COUNT_TO']);
if ($arDiscSave['COUNT_TO_UT'] > $intCountTime) {
$arDiscSave['COUNT_TO_UT'] = $intCountTime;
$arDiscSave['COUNT_TO'] = ConvertTimeStamp($intCountTime, 'FULL');
}
}
} elseif (0 < $arDiscSave['COUNT_SIZE'] && in_array($arDiscSave['COUNT_TYPE'], array('D', 'M', 'Y'))) {
$strCountPeriod = 'P';
$arCountPeriodBack = CCatalogDiscountSave::__GetTimeStampArray($arDiscSave['COUNT_SIZE'], $arDiscSave['COUNT_TYPE']);
}
if ('D' == $strCountPeriod) {
if (false !== $arDiscSave['COUNT_FROM_UT']) {
if ($arDiscSave['COUNT_FROM_UT'] > $intCountTime) {
continue;
}
if (false !== $arDiscSave['COUNT_TO_UT'] && $arDiscSave['COUNT_TO_UT'] <= $arDiscSave['COUNT_FROM_UT']) {
continue;
}
if (false !== $arDiscSave['ACTIVE_TO_UT'] && $arDiscSave['COUNT_FROM_UT'] >= $arDiscSave['ACTIVE_TO_UT']) {
continue;
}
}
if (false !== $arDiscSave['COUNT_TO_UT']) {
if ('P' == $strActionPeriod && $arDiscSave['COUNT_TO_UT'] < AddToTimeStamp($arActionPeriodBack, $intCountTime)) {
continue;
}
}
}
if ('P' == $strActionPeriod) {
if ('P' == $strCountPeriod) {
$arStartDate = CCatalogDiscountSave::__GetUserInfoByDiscount(array('DISCOUNT_ID' => $arDiscSave['ID'], 'USER_ID' => $intUserID, 'ACTIVE_FROM' => date($DB->DateFormatToPHP(CSite::GetDateFormat("FULL")), AddToTimeStamp($arActionPeriodBack, $intCountTime))));
if (is_array($arStartDate) && !empty($arStartDate)) {
$arOldOrderFilter['<DATE_INSERT'] = $arStartDate['ACTIVE_FROM_FORMAT'];
$arOldOrderFilter['>=DATE_INSERT'] = date($DB->DateFormatToPHP(CSite::GetDateFormat("FULL")), AddToTimeStamp($arCountPeriodBack, MakeTimeStamp($arStartDate['ACTIVE_FROM_FORMAT'])));
$arOldOrderSumm = CCatalogDiscountSave::__SaleOrderSumm($arOldOrderFilter, $arDiscSave['CURRENCY']);
}
} else {
$arStartDate = CCatalogDiscountSave::__GetUserInfoByDiscount(array('DISCOUNT_ID' => $arDiscSave['ID'], 'USER_ID' => $intUserID), array('ACTIVE_FROM' => false, 'DELETE' => false));
if (is_array($arStartDate) && !empty($arStartDate)) {
$intTimeStart = MakeTimeStamp($arStartDate['ACTIVE_FROM_FORMAT']);
$intTimeFinish = MakeTimeStamp($arStartDate['ACTIVE_TO_FORMAT']);
if (!($intTimeStart <= $intCountTime && $intTimeFinish >= $intCountTime)) {
continue;
} else {
$boolPeriodInsert = false;
}
}
}
}
$intTimeStart = false;
$intTimeFinish = false;
if ('D' == $strCountPeriod) {
$intTimeStart = !empty($arDiscSave['COUNT_FROM']) ? $arDiscSave['COUNT_FROM'] : false;
$intTimeFinish = !empty($arDiscSave['COUNT_TO']) ? $arDiscSave['COUNT_TO'] : false;
} elseif ('P' == $strCountPeriod) {
$intTimeStart = date($DB->DateFormatToPHP(CSite::GetDateFormat("FULL")), AddToTimeStamp($arCountPeriodBack, $intCountTime));
}
if ($intTimeStart) {
$arOrderFilter['>=DATE_INSERT'] = $intTimeStart;
}
if ($intTimeFinish) {
$arOrderFilter['<DATE_INSERT'] = $intTimeFinish;
}