本文整理汇总了PHP中CSaleUser::GetBuyersList方法的典型用法代码示例。如果您正苦于以下问题:PHP CSaleUser::GetBuyersList方法的具体用法?PHP CSaleUser::GetBuyersList怎么用?PHP CSaleUser::GetBuyersList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSaleUser
的用法示例。
在下文中一共展示了CSaleUser::GetBuyersList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getData
/** @return \CDBResult */
public function getData()
{
$lid = $this->getFieldValue('LID', null);
$orderCountFrom = $this->getFieldValue('ORDER_COUNT_FROM', null);
$orderCountTo = $this->getFieldValue('ORDER_COUNT_TO', null);
$orderSumFrom = $this->getFieldValue('ORDER_SUM_FROM', null);
$orderSumTo = $this->getFieldValue('ORDER_SUM_TO', null);
$orderLastDateFrom = $this->getFieldValue('LAST_ORDER_DATE_FROM', null);
$orderLastDateTo = $this->getFieldValue('LAST_ORDER_DATE_TO', null);
$filter = array();
if ($lid) {
$filter['LID'] = $lid;
}
if ($orderCountFrom) {
$filter['>=ORDER_COUNT'] = $orderCountFrom;
}
if ($orderCountTo) {
$filter['<ORDER_COUNT'] = $orderCountTo;
}
if ($orderSumFrom) {
$filter['>=ORDER_SUM'] = $orderSumFrom;
}
if ($orderSumTo) {
$filter['<ORDER_SUM'] = $orderSumTo;
}
if ($orderLastDateFrom) {
$filter['>=LAST_ORDER_DATE'] = $orderLastDateFrom;
}
if ($orderLastDateTo) {
$filter['<LAST_ORDER_DATE'] = $orderLastDateTo;
}
$dbBuyerList = \CSaleUser::GetBuyersList(array('ID' => 'ASC'), $filter, false, false, array("EMAIL", "NAME", "USER_ID"));
return $dbBuyerList;
}
示例2: array
$arSitesShop[] = array("ID" => $key, "NAME" => $val["NAME"]);
}
}
if (empty($arSitesShop)) {
$arSitesShop = $arSites;
}
$arCountry = GetCountryArray();
$arCountry["reference_id"] = array_flip($arCountry["reference_id"]);
/*
* select all user (byuers)
*/
$arHeaders = array(array("id" => "USER_ID", "content" => "ID", "sort" => "USER_ID"), array("id" => "BUYER", "content" => GetMessage("BUYER_ROW_BUYER"), "sort" => "NAME", "default" => true), array("id" => "LOGIN", "content" => GetMessage("BUYER_ROW_LOGIN"), "sort" => "LOGIN"), array("id" => "LAST_NAME", "content" => GetMessage("BUYER_ROW_LAST"), "sort" => "LAST_NAME"), array("id" => "NAME", "content" => GetMessage("BUYER_ROW_NAME"), "sort" => "NAME"), array("id" => "SECOND_NAME", "content" => GetMessage("BUYER_ROW_SECOND"), "sort" => "SECOND_NAME"), array("id" => "EMAIL", "content" => GetMessage("BUYER_ROW_MAIL"), "sort" => "EMAIL", "default" => true), array("id" => "PERSONAL_PHONE", "content" => GetMessage("BUYER_ROW_PHONE"), "sort" => "PERSONAL_PHONE", "default" => true), array("id" => "LAST_LOGIN", "content" => GetMessage('BUYER_ROW_LAST_LOGIN'), "sort" => "LAST_LOGIN", "default" => false), array("id" => "DATE_REGISTER", "content" => GetMessage('BUYER_ROW_DATE_REGISTER'), "sort" => "DATE_REGISTER", "default" => true), array("id" => "LAST_ORDER_DATE", "content" => GetMessage('BUYER_ROW_LAST_ORDER_DATE'), "sort" => "LAST_ORDER_DATE", "default" => true), array("id" => "ORDER_COUNT", "content" => GetMessage('BUYER_ROW_COUNT_ORDER'), "sort" => "ORDER_COUNT", "default" => true, "align" => "right"), array("id" => "ORDER_SUM", "content" => GetMessage('BUYER_ROW_SUM_ORDER'), "sort" => "ORDER_SUM", "default" => true, "align" => "right"), array("id" => "GROUPS_ID", "content" => GetMessage('BUYER_ROW_GROUP')));
$lAdmin->AddHeaders($arHeaders);
$arVisibleColumns = $lAdmin->GetVisibleHeaderColumns();
$arOrderBuyer[$by] = $order;
$dbUsersList = CSaleUser::GetBuyersList($arOrderBuyer, $arFilter, false, array("nPageSize" => CAdminResult::GetNavSize($sTableID)), array("ID", "LID", "ACTIVE", "DATE_REGISTER", "LOGIN", "EMAIL", "NAME", "LAST_NAME", "SECOND_NAME", "PERSONAL_PHONE", "USER_ID", "LAST_LOGIN", "ORDER_COUNT", "ORDER_SUM", "CURRENCY", "LAST_ORDER_DATE"));
$dbUsersList = new CAdminResult($dbUsersList, $sTableID);
$dbUsersList->NavStart();
$lAdmin->NavText($dbUsersList->GetNavPrint(GetMessage("BUYER_PRLIST")));
while ($arBuyers = $dbUsersList->Fetch()) {
$row =& $lAdmin->AddRow($arBuyers["USER_ID"], $arBuyers, "sale_buyers_profile.php?USER_ID=" . $arBuyers["USER_ID"] . "&lang=" . LANGUAGE_ID, GetMessage("BUYER_SUB_ACTION_PROFILE"));
$profile = '<a href="sale_buyers_profile.php?USER_ID=' . $arBuyers["USER_ID"] . '&lang=' . LANGUAGE_ID . '">' . $arBuyers["USER_ID"] . '</a>';
$row->AddField("USER_ID", $profile);
if (floatVal($arBuyers["ORDER_SUM"]) > 0 && in_array("ORDER_SUM", $arVisibleColumns)) {
$row->AddField("ORDER_SUM", SaleFormatCurrency($arBuyers["ORDER_SUM"], $arBuyers["CURRENCY"]));
}
if (floatVal($arBuyers["ORDER_COUNT"]) <= 0) {
$row->AddField("ORDER_COUNT", ' ');
}
if (in_array("GROUPS_ID", $arVisibleColumns)) {
$strUserGroup = '';