Answer the question
In order to leave comments, you need to log in
How to display data in the admin panel?
There is a site on Bitrix, in which the user receives points for some specific actions - for example, for registration. Points are shown in the user's personal account using
$bonus = 0;
$arSelect = Array("ID", "PROPERTY_BAL");
$arFilter = Array("IBLOCK_ID"=>9, "ACTIVE_DATE"=>"Y", "ACTIVE"=>"Y","PROPERTY_USER"=>$USER->GetID());
$res = CIBlockElement::GetList(Array(), $arFilter, false, Array("nPageSize"=>50), $arSelect);
while($ob = $res->GetNextElement())
{
$arFields = $ob->GetFields();
$bonus += $arFields["PROPERTY_BAL_VALUE"];
}
$rsUser = CUser::GetByID($USER->GetID());
$arUser = $rsUser->Fetch();
Answer the question
In order to leave comments, you need to log in
Well, there is one option:
- Create a custom field of type "number" without user editing rights
- Write code that, when adding / deleting / updating an element, sets the value of the field to the corresponding value if the points date has not expired
- Write an agent that receives elements every day information block of points that expired yesterday and updates the user data for the current date
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question