本文整理汇总了PHP中CSaleOrderUserProps::DoLoadProfiles方法的典型用法代码示例。如果您正苦于以下问题:PHP CSaleOrderUserProps::DoLoadProfiles方法的具体用法?PHP CSaleOrderUserProps::DoLoadProfiles怎么用?PHP CSaleOrderUserProps::DoLoadProfiles使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSaleOrderUserProps
的用法示例。
在下文中一共展示了CSaleOrderUserProps::DoLoadProfiles方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$arPersonType["CHECKED"] = 'N';
if ($PERSON_TYPE <= 0) {
$PERSON_TYPE = $arPersonType["ID"];
$arPersonType["CHECKED"] = "Y";
} else {
if (isset($_POST["PERSON_TYPE"]) && $_POST["PERSON_TYPE"] == $arPersonType["ID"]) {
$arPersonType["CHECKED"] = "Y";
}
}
$arPersonTypeList[$arPersonType["ID"]] = $arPersonType;
}
$arResultProps["PERSON_TYPE"] = $arPersonTypeList;
/*
* user profile
*/
$arResultProps["USER_PROFILES"] = CSaleOrderUserProps::DoLoadProfiles($currentUserId, $PERSON_TYPE);
$arProfileTmp = array();
if (!empty($arResultProps["USER_PROFILES"]) && is_array($arResultProps["USER_PROFILES"])) {
foreach ($arResultProps["USER_PROFILES"] as $key => $val) {
if ($PROFILE_ID === "") {
$arResultProps["USER_PROFILES"][$key]["CHECKED"] = "Y";
$PROFILE_ID = $key;
} elseif ($PROFILE_ID == $key) {
$arResultProps["USER_PROFILES"][$key]["CHECKED"] = "Y";
}
}
} else {
$PROFILE_ID = (int) $PROFILE_ID;
}
/*
* order props
示例2: intval
CRMModeOutput($result);
}
/*
* profile autocomplete script
*/
if (isset($userId) AND isset($buyerType) AND isset($profileDefault))
{
$userId = intval($userId);
$buyerType = intval($buyerType);
$profileDefault = intval($profileDefault);
$arPropValuesTmp = array();
$userProfile = array();
$userProfile = CSaleOrderUserProps::DoLoadProfiles($userId, $buyerType);
if ($profileDefault != "" AND $profileDefault != "0")
$arPropValuesTmp = $userProfile[$profileDefault]["VALUES"];
$dbVariants = CSaleOrderProps::GetList(
array("SORT" => "ASC"),
array(
"PERSON_TYPE_ID" => $buyerType,
"USER_PROPS" => "Y",
"ACTIVE" => "Y",
"RELATED" => false
)
);
while ($arVariants = $dbVariants->Fetch())
{
if (isset($arPropValuesTmp[$arVariants["ID"]]))
示例3: fUserProfile
function fUserProfile($USER_ID, $BUYER_TYPE = '', $default = '')
{
$userProfileSelect = "<select name=\"user_profile\" id=\"user_profile\" onChange=\"fChangeProfile(this);\">";
$userProfileSelect .= "<option value=\"0\">".GetMessage("NEWO_BUYER_PROFILE_NEW")."</option>";
$userProfile = CSaleOrderUserProps::DoLoadProfiles($USER_ID, $BUYER_TYPE);
$i = "";
if (!empty($userProfile) && is_array($userProfile))
{
foreach($userProfile as $key => $val)
{
if ($default == "" AND $i == "")
{
$userProfileSelect .= "<option selected value=\"".$key."\">".$val["NAME"]."</option>";
$i = $key;
}
elseif ($default == $key)
$userProfileSelect .= "<option selected value=\"".$key."\">".$val["NAME"]."</option>";
else
$userProfileSelect .= "<option value=\"".$key."\">".$val["NAME"]."</option>";
}
}
$userProfileSelect .= "</select>";
return $userProfileSelect;
}
示例4: array
//TAB EDIT PROFILE
$tabControl->BeginNextFormTab();
if (!empty($arProfile) && !empty($arUser)) {
$dbPersonType = CSalePersonType::GetList(array(), array("ACTIVE" => "Y", "ID" => $PERSON_TYPE));
$arPersonType = $dbPersonType->GetNext();
$LID = $arPersonType["LID"];
$arFilterProps = array("PERSON_TYPE_ID" => $PERSON_TYPE, "ACTIVE" => "Y");
if ($saleModulePermissions >= "U" && $saleModulePermissions < "W") {
$arFilterProps["USER_PROPS"] = "Y";
$arFilterProps["UTIL"] = "N";
}
$tabControl->AddViewField("CODE_USER", GetMessage("BUYER_PE_USER") . ":", "[<a href=\"/bitrix/admin/user_edit.php?ID=" . $arUser["ID"] . "&lang=" . LANGUAGE_ID . "\">" . $arUser["ID"] . "</a>] (" . $arUser["LOGIN"] . ") " . $userFIO);
$tabControl->AddEditField("CODE_PROFILE_NAME", GetMessage("BUYER_PE_PROFILE_NAME") . ":", false, array("size" => 30, "maxlength" => 255), htmlspecialcharsEx($profileName));
$propertyGroupID = "";
$dbProperties = CSaleOrderProps::GetList(array("GROUP_SORT" => "ASC", "PROPS_GROUP_ID" => "ASC", "SORT" => "ASC", "NAME" => "ASC"), $arFilterProps, false, false, array("*"));
$userProfile = CSaleOrderUserProps::DoLoadProfiles($USER_ID, $PERSON_TYPE);
$curVal = "";
while ($arProperties = $dbProperties->Fetch()) {
$curVal = $userProfile[$ID]["VALUES"][IntVal($arProperties["ID"])];
$fieldValue = $curVal != "" ? $curVal : $arProperties["DEFAULT_VALUE"];
if (IntVal($arProperties["PROPS_GROUP_ID"]) != $propertyGroupID) {
$tabControl->AddSection("SECTION_" . $arProperties["PROPS_GROUP_ID"], $arProperties["GROUP_NAME"]);
}
$shure = false;
if ($arProperties["REQUIED"] == "Y" || $arProperties["IS_PROFILE_NAME"] == "Y" || $arProperties["IS_LOCATION"] == "Y" || $arProperties["IS_LOCATION4TAX"] == "Y" || $arProperties["IS_PAYER"] == "Y" || $arProperties["IS_ZIP"] == "Y") {
$shure = true;
}
/*fields*/
if ($arProperties["TYPE"] == "TEXT") {
$tabControl->AddEditField("CODE_" . IntVal($arProperties["ID"]), $arProperties["NAME"] . ":", $shure, array("size" => 30, "maxlength" => 255), $fieldValue);
} elseif ($arProperties["TYPE"] == "CHECKBOX") {
示例5: ProductSubscribe
/**
* Sends product subscription letter
*
* @param integer $ID - code product
* @param string $MODULE - module product
* @return bool
*/
function ProductSubscribe($ID, $MODULE)
{
$ID = (int) $ID;
$MODULE = trim($MODULE);
if ($ID <= 0 || $MODULE == '') {
return false;
}
$arSubscribeProd = array();
$subscribeProd = COption::GetOptionString("sale", "subscribe_prod", "");
if ($subscribeProd != '') {
$arSubscribeProd = unserialize($subscribeProd);
}
$rsItemsBasket = CSaleBasket::GetList(array("USER_ID" => "DESC", "LID" => "ASC"), array("PRODUCT_ID" => $ID, "SUBSCRIBE" => "Y", "CAN_BUY" => "N", "ORDER_ID" => "NULL", ">USER_ID" => "0", "MODULE" => $MODULE), false, false, array('ID', 'FUSER_ID', 'USER_ID', 'MODULE', 'PRODUCT_ID', 'CURRENCY', 'DATE_INSERT', 'QUANTITY', 'LID', 'DELAY', 'CALLBACK_FUNC', 'SUBSCRIBE', 'PRODUCT_PROVIDER_CLASS'));
while ($arItemsBasket = $rsItemsBasket->Fetch()) {
$LID = $arItemsBasket["LID"];
if (isset($arSubscribeProd[$LID]) && $arSubscribeProd[$LID]["use"] == "Y") {
$sendEmailList = array();
$USER_ID = $arItemsBasket['USER_ID'];
$arMailProp = array();
$arPayerProp = array();
// select person type
$dbPersonType = CSalePersonType::GetList(array("SORT" => "ASC"), array("LID" => $LID), false, false, array('ID'));
while ($arPersonType = $dbPersonType->Fetch()) {
// select ID props is mail
$dbProperties = CSaleOrderProps::GetList(array(), array("PERSON_TYPE_ID" => $arPersonType["ID"], "IS_EMAIL" => "Y", "ACTIVE" => "Y"), false, false, array('ID', 'PERSON_TYPE_ID'));
while ($arProperties = $dbProperties->Fetch()) {
$arMailProp[$arProperties["PERSON_TYPE_ID"]] = $arProperties["ID"];
}
// select ID props is name
$arPayerProp = array();
$dbProperties = CSaleOrderProps::GetList(array(), array("PERSON_TYPE_ID" => $arPersonType["ID"], "IS_PAYER" => "Y", "ACTIVE" => "Y"), false, false, array('ID', 'PERSON_TYPE_ID'));
while ($arProperties = $dbProperties->Fetch()) {
$arPayerProp[$arProperties["PERSON_TYPE_ID"]] = $arProperties["ID"];
}
}
//end while
// load user profiles
$arUserProfiles = CSaleOrderUserProps::DoLoadProfiles($USER_ID);
$rsUser = CUser::GetByID($USER_ID);
$arUser = $rsUser->Fetch();
$userName = $arUser["LAST_NAME"];
if ($userName != '') {
$userName .= " ";
}
$userName .= $arUser["NAME"];
// select of user name to be sent
$arUserSendName = array();
if (!empty($arUserProfiles) && !empty($arPayerProp)) {
foreach ($arPayerProp as $personType => $namePropID) {
if (isset($arUserProfiles[$personType])) {
foreach ($arUserProfiles[$personType] as $profiles) {
if (isset($profiles["VALUES"][$namePropID]) && $profiles["VALUES"][$namePropID] != '') {
$arUserSendName[$personType] = trim($profiles["VALUES"][$namePropID]);
break;
}
}
}
}
} else {
$arUserSendName[] = $userName;
}
// select of e-mail to be sent
$arUserSendMail = array();
if (!empty($arUserProfiles) && !empty($arMailProp)) {
foreach ($arMailProp as $personType => $mailPropID) {
if (isset($arUserProfiles[$personType])) {
foreach ($arUserProfiles[$personType] as $profiles) {
if (isset($profiles["VALUES"][$mailPropID]) && $profiles["VALUES"][$mailPropID] != '') {
$arUserSendMail[$personType] = trim($profiles["VALUES"][$mailPropID]);
break;
}
}
} else {
$arUserSendMail[$personType] = $arUser["EMAIL"];
}
}
} else {
$arUserSendMail[] = $arUser["EMAIL"];
}
/** @var $productProvider IBXSaleProductProvider */
if ($productProvider = CSaleBasket::GetProductProvider($arItemsBasket)) {
$arCallback = $productProvider::GetProductData(array("PRODUCT_ID" => $ID, "QUANTITY" => 1, "RENEWAL" => "N", "USER_ID" => $USER_ID, "SITE_ID" => $LID, "BASKET_ID" => $arItemsBasket["ID"]));
} elseif (isset($arItemsBasket["CALLBACK_FUNC"]) && !empty($arItemsBasket["CALLBACK_FUNC"])) {
$arCallback = CSaleBasket::ExecuteCallbackFunction(trim($arItemsBasket["CALLBACK_FUNC"]), $MODULE, $ID, 1, "N", $USER_ID, $LID);
}
if (!empty($arCallback)) {
$arCallback["QUANTITY"] = 1;
$arCallback["DELAY"] = "N";
$arCallback["SUBSCRIBE"] = "N";
CSaleBasket::Update($arItemsBasket["ID"], $arCallback);
}
//send mail
if (!empty($arUserSendMail) && !empty($arCallback)) {
//.........这里部分代码省略.........
示例6: getBuyerProfilesList
public static function getBuyerProfilesList($userId, $personTypeId = null)
{
$result = array(0 => Loc::getMessage("SALE_ORDER_BUYER_CREATE_NEW"));
if (intval($userId) > 0) {
$profiles = \CSaleOrderUserProps::DoLoadProfiles($userId);
if (is_array($profiles)) {
foreach ($profiles as $types) {
foreach ($types as $key => $value) {
$result[$key] = htmlspecialcharsback($value["NAME"]);
}
}
}
}
return $result;
}
示例7: array
}
if (!isset($PERSON_TYPE) || $PERSON_TYPE == "") {
$PERSON_TYPE = $arPersonType["ID"];
$arPersonType["CHECKED"] = "Y";
} else {
if ($_POST["PERSON_TYPE"] == $arPersonType["ID"]) {
$arPersonType["CHECKED"] = "Y";
}
}
$arPersonTypeList[$arPersonType["ID"]] = $arPersonType;
}
$arResultProps["PERSON_TYPE"] = $arPersonTypeList;
/*
* user profile
*/
$arResultProps["USER_PROFILES"] = CSaleOrderUserProps::DoLoadProfiles(IntVal($USER->GetID()), $PERSON_TYPE);
$arProfileTmp = array();
if (is_array($arResultProps["USER_PROFILES"]) && count($arResultProps["USER_PROFILES"]) > 0) {
foreach ($arResultProps["USER_PROFILES"] as $key => $val) {
if ($PROFILE_ID === "") {
$arResultProps["USER_PROFILES"][$key]["CHECKED"] = "Y";
$PROFILE_ID = $key;
} elseif ($PROFILE_ID == $key) {
$arResultProps["USER_PROFILES"][$key]["CHECKED"] = "Y";
}
}
} else {
$PROFILE_ID = IntVal($PROFILE_ID);
}
/*
* orde props