当前位置: 首页>>代码示例>>PHP>>正文


PHP CSaleOrderUserProps::DoLoadProfiles方法代码示例

本文整理汇总了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
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:component.php

示例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"]]))
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:30,代码来源:order_new.php

示例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;
}
开发者ID:akniyev,项目名称:arteva.ru,代码行数:25,代码来源:admin_tool.php

示例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") {
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:buyers_profile_edit.php

示例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)) {
//.........这里部分代码省略.........
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:101,代码来源:basket.php

示例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;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:15,代码来源:orderbuyer.php

示例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
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:component.php


注:本文中的CSaleOrderUserProps::DoLoadProfiles方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。