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


PHP CSaleOrderUserProps::GetList方法代码示例

本文整理汇总了PHP中CSaleOrderUserProps::GetList方法的典型用法代码示例。如果您正苦于以下问题:PHP CSaleOrderUserProps::GetList方法的具体用法?PHP CSaleOrderUserProps::GetList怎么用?PHP CSaleOrderUserProps::GetList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CSaleOrderUserProps的用法示例。


在下文中一共展示了CSaleOrderUserProps::GetList方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: GetProfileFieldsByID

 static function GetProfileFieldsByID($profileID) {
     if (!empty($profileID)) {
         $res = CSaleOrderUserProps::GetList(array(), array("ID" => $profileID), false, array('nTopCount' => 1));
         while ($arRes = $res->Fetch()) {
             $arRes["NAME"] = htmlspecialchars($arRes["NAME"]);
             return $arRes;
         }
     }
     return array();
 }
开发者ID:ASDAFF,项目名称:mp,代码行数:10,代码来源:profilesManager.php

示例2: OnAfterUserUpdateHandler

 function OnAfterUserUpdateHandler(&$arFields)
 {
   CModule::IncludeModule('sale');
   global $USER;
   $profile = CSaleOrderUserProps::GetList(array("DATE_UPDATE" => "DESC"), array("USER_ID" => $arFields['ID']))->Fetch();
   $PROFILE_ID = $profile['ID'];
   //если профиль создан
   if ($PROFILE_ID)
   {
      //формируем массив свойств
      $props = array(
         $PROFILE_ID => array(
            "USER_PROPS_ID" => $PROFILE_ID,
            "NAME" => "Адрес доставки",
            "VALUE" => $arFields['PERSONAL_STREET']
            )
         );
      //добавляем значения свойств к созданному ранее профилю
      foreach ($props as $propId => $prop) {
         $x = CSaleOrderUserPropsValue::Update($propId, $prop);
      }
   }
 }
开发者ID:ASDAFF,项目名称:mp,代码行数:23,代码来源:events.php

示例3: Delete

	/**
	 * <p>Функция удаляет тип плательщика с кодом ID. Так же удаляются все связанные данные. Если есть заказы, привязанные к этому типу плательщика, то тип плательщика не может быть удален. </p>
	 *
	 *
	 *
	 *
	 * @param int $ID  Код типа плательщика.
	 *
	 *
	 *
	 * @return bool <p>Возвращается <i>true</i> в случае успешного удаления и <i>false</i> - в
	 * противном случае.</p><br><br>
	 *
	 * @static
	 * @link http://dev.1c-bitrix.ru/api_help/sale/classes/csalepersontype/csalepersontype__delete.c2566ed3.php
	 * @author Bitrix
	 */
	public static function Delete($ID)
	{
		global $DB;
		$ID = IntVal($ID);

		$db_orders = CSaleOrder::GetList(
				array("DATE_UPDATE" => "DESC"),
				array("PERSON_TYPE_ID" => $ID),
				false,
				array("nTopCount" => 1),
				array("ID")
			);
		if ($db_orders->Fetch())
		{
			$GLOBALS["APPLICATION"]->ThrowException(GetMessage("SKGP_ERROR_PERSON_HAS_ORDER").$ID, "ERROR_PERSON_HAS_ORDER");
			return False;
		}

		$db_events = GetModuleEvents("sale", "OnBeforePersonTypeDelete");
		while ($arEvent = $db_events->Fetch())
			if (ExecuteModuleEventEx($arEvent, Array($ID))===false)
				return false;

		$events = GetModuleEvents("sale", "OnPersonTypeDelete");
		while ($arEvent = $events->Fetch())
			ExecuteModuleEventEx($arEvent, Array($ID));

		$DB->Query("DELETE FROM b_sale_pay_system_action WHERE PERSON_TYPE_ID = ".$ID."", true);

		$db_orderProps = CSaleOrderProps::GetList(
				array("PROPS_GROUP_ID" => "ASC"),
				array("PERSON_TYPE_ID" => $ID)
			);
		while ($arOrderProps = $db_orderProps->Fetch())
		{
			$DB->Query("DELETE FROM b_sale_order_props_variant WHERE ORDER_PROPS_ID = ".$arOrderProps["ID"]."", true);
			$DB->Query("DELETE FROM b_sale_order_props_value WHERE ORDER_PROPS_ID = ".$arOrderProps["ID"]."", true);
			$DB->Query("DELETE FROM b_sale_user_props_value WHERE ORDER_PROPS_ID = ".$arOrderProps["ID"]."", true);
		}
		$DB->Query("DELETE FROM b_sale_order_props WHERE PERSON_TYPE_ID = ".$ID."", true);

		$db_orderUserProps = CSaleOrderUserProps::GetList(
				array("NAME" => "ASC"),
				array("PERSON_TYPE_ID" => $ID)
			);
		while ($arOrderUserProps = $db_orderUserProps->Fetch())
		{
			$DB->Query("DELETE FROM b_sale_user_props_value WHERE USER_PROPS_ID = ".$arOrderUserProps["ID"]."", true);
		}
		$DB->Query("DELETE FROM b_sale_user_props WHERE PERSON_TYPE_ID = ".$ID."", true);
		$DB->Query("DELETE FROM b_sale_order_props_group WHERE PERSON_TYPE_ID = ".$ID."", true);
		$DB->Query("DELETE FROM b_sale_person_type_site WHERE PERSON_TYPE_ID=".$ID, true);

		unset($GLOBALS["SALE_PERSON_TYPE_LIST_CACHE"]);
		return $DB->Query("DELETE FROM b_sale_person_type WHERE ID = ".$ID."", true);
	}
开发者ID:ASDAFF,项目名称:bxApiDocs,代码行数:73,代码来源:person_type.php

示例4: strlen

	if (strlen($errorMessage) > 0)
		$bInitVars = True;

	if (strlen($_POST["save"]) > 0 && strlen($errorMessage) <= 0)
		LocalRedirect($arParams["PATH_TO_LIST"]);
	elseif(strlen($_POST["apply"]) > 0 &&  strlen($errorMessage) <= 0)
		LocalRedirect(CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_DETAIL"], Array("ID" => $ID)));
}

$arResult["ORDER_PROPS"] = Array();
$dbUserProps = CSaleOrderUserProps::GetList(
		array("DATE_UPDATE" => "DESC"),
		array(
				"ID" => $ID,
				"USER_ID" => IntVal($GLOBALS["USER"]->GetID())
			),
		false,
		false,
		array("ID", "NAME", "USER_ID", "PERSON_TYPE_ID", "DATE_UPDATE")
	);
if ($arUserProps = $dbUserProps->GetNext())
{
	if(!$bInitVars)
		$arResult = $arUserProps;
	else
	{
		foreach($_POST as $k => $v)
		{
			$arResult[$k] = htmlspecialcharsbx($v);
			$arResult['~'.$k] = $v;
		}
开发者ID:akniyev,项目名称:arteva.ru,代码行数:31,代码来源:component.php

示例5: array

 /* Person Type Begin */
 $dbPersonType = CSalePersonType::GetList(array("SORT" => "ASC", "NAME" => "ASC"), array("LID" => SITE_ID, "ACTIVE" => "Y"));
 while ($arPersonType = $dbPersonType->GetNext()) {
     if ($arUserResult["PERSON_TYPE_ID"] == $arPersonType["ID"] || IntVal($arUserResult["PERSON_TYPE_ID"]) <= 0) {
         $arUserResult["PERSON_TYPE_ID"] = $arPersonType["ID"];
         $arPersonType["CHECKED"] = "Y";
     }
     $arResult["PERSON_TYPE"][$arPersonType["ID"]] = $arPersonType;
 }
 foreach (GetModuleEvents("sale", "OnSaleComponentOrderOneStepPersonType", true) as $arEvent) {
     ExecuteModuleEventEx($arEvent, array(&$arResult, &$arUserResult, &$arParams));
 }
 /* Person Type End */
 /* User Profiles Begin */
 $bFirst = false;
 $dbUserProfiles = CSaleOrderUserProps::GetList(array("DATE_UPDATE" => "DESC"), array("PERSON_TYPE_ID" => $arUserResult["PERSON_TYPE_ID"], "USER_ID" => IntVal($USER->GetID())));
 while ($arUserProfiles = $dbUserProfiles->GetNext()) {
     if (!$bFirst && empty($arUserResult["PROFILE_CHANGE"])) {
         $bFirst = true;
         $arUserResult["PROFILE_ID"] = IntVal($arUserProfiles["ID"]);
         $arUserResult["PROFILE_CHANGE"] = "Y";
         $arUserResult["PROFILE_DEFAULT"] = "Y";
     }
     if (IntVal($arUserResult["PROFILE_ID"]) == IntVal($arUserProfiles["ID"])) {
         $arUserProfiles["CHECKED"] = "Y";
     }
     $arResult["ORDER_PROP"]["USER_PROFILES"][$arUserProfiles["ID"]] = $arUserProfiles;
 }
 if (IntVal($arUserResult["PROFILE_ID"]) > 0 && empty($arResult["ORDER_PROP"]["USER_PROFILES"][$arUserResult["PROFILE_ID"]])) {
     $arUserResult["PROFILE_ID"] = false;
 }
开发者ID:sharapudinov,项目名称:lovestore.top,代码行数:31,代码来源:component.php

示例6: OnUserDelete

 public static function OnUserDelete($ID)
 {
     $ID = IntVal($ID);
     $db_res = CSaleOrderUserProps::GetList($b = "ID", $o = "ASC", array("USER_ID" => $ID));
     while ($ar_res = $db_res->Fetch()) {
         CSaleOrderUserProps::Delete(IntVal($ar_res["ID"]));
     }
     return True;
 }
开发者ID:rasuldev,项目名称:torino,代码行数:9,代码来源:order_user_props.php

示例7: LocalRedirect

    }
    if (strlen($errorMessage) > 0) {
        LocalRedirect($APPLICATION->GetCurPageParam("del_id=" . $del_id, array("del_id", "sessid")));
    } else {
        LocalRedirect($APPLICATION->GetCurPageParam("success_del_id=" . $del_id, array("del_id", "sessid")));
    }
}
if (IntVal($_REQUEST["del_id"]) > 0) {
    $errorMessage = GetMessage("SALE_DEL_PROFILE", array("#ID#" => IntVal($_REQUEST["del_id"])));
} elseif (IntVal($_REQUEST["success_del_id"]) > 0) {
    $errorMessage = GetMessage("SALE_DEL_PROFILE_SUC", array("#ID#" => IntVal($_REQUEST["success_del_id"])));
}
if (strLen($errorMessage) >= 0) {
    $arResult["ERROR_MESSAGE"] = $errorMessage;
}
$by = strlen($_REQUEST["by"]) > 0 ? $_REQUEST["by"] : "DATE_UPDATE";
$order = strlen($_REQUEST["order"]) > 0 ? $_REQUEST["order"] : "DESC";
$dbUserProps = CSaleOrderUserProps::GetList(array($by => $order), array("USER_ID" => IntVal($GLOBALS["USER"]->GetID())));
$dbUserProps->NavStart($arParams["PER_PAGE"]);
$arResult["NAV_STRING"] = $dbUserProps->GetPageNavString(GetMessage("SPPL_PAGES"));
$arResult["PROFILES"] = array();
while ($arUserProps = $dbUserProps->GetNext()) {
    $arResultTmp = array();
    $arResultTmp = $arUserProps;
    $arResultTmp["PERSON_TYPE"] = CSalePersonType::GetByID($arUserProps["PERSON_TYPE_ID"]);
    $arResultTmp["PERSON_TYPE"]["NAME"] = htmlspecialcharsEx($arResultTmp["PERSON_TYPE"]["NAME"]);
    $arResultTmp["URL_TO_DETAIL"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_DETAIL"], array("ID" => $arUserProps["ID"]));
    $arResultTmp["URL_TO_DETELE"] = htmlspecialcharsbx($APPLICATION->GetCurPage() . "?del_id=" . $arUserProps["ID"] . "&" . bitrix_sessid_get());
    $arResult["PROFILES"][] = $arResultTmp;
}
$this->IncludeComponentTemplate();
开发者ID:rasuldev,项目名称:torino,代码行数:31,代码来源:component.php

示例8: nodeHandler

	function nodeHandler(CDataXML $value)
	{
		$value = $value->GetArray();

		if(!empty($value[GetMessage("CC_BSC1_DOCUMENT")]))
		{
			$value = $value[GetMessage("CC_BSC1_DOCUMENT")];

			$arOrder = $this->collectOrderInfo($value);

			if(!empty($arOrder))
			{
				if(strlen($arOrder["ID"]) <= 0 && strlen($arOrder["ID_1C"]) > 0)//try to search order from 1C
				{
					$dbOrder = CSaleOrder::GetList(array("ID" => "DESC"), array("ID_1C" => $arOrder["ID_1C"]), false, false, array("ID", "ID_1C"));
					if($orderInfo = $dbOrder->Fetch())
					{
						$arOrder["ID"] = $orderInfo["ID"];
					}
				}
				if(strlen($arOrder["ID"]) > 0) // exists site order
				{
					$dbOrder = CSaleOrder::GetList(array(), array("ACCOUNT_NUMBER" => $arOrder["ID"]), false, false, array("ID", "LID", "PERSON_TYPE_ID", "PAYED", "DATE_PAYED", "CANCELED", "DATE_CANCELED", "REASON_CANCELED", "STATUS_ID", "DATE_STATUS", "PAY_VOUCHER_NUM", "PAY_VOUCHER_DATE", "PRICE_DELIVERY", "ALLOW_DELIVERY", "DATE_ALLOW_DELIVERY", "PRICE", "CURRENCY", "DISCOUNT_VALUE", "USER_ID", "PAY_SYSTEM_ID", "DELIVERY_ID", "DATE_INSERT", "DATE_INSERT_FORMAT", "DATE_UPDATE", "USER_DESCRIPTION", "ADDITIONAL_INFO", "COMMENTS", "TAX_VALUE", "DELIVERY_DOC_NUM", "DELIVERY_DOC_DATE", "STORE_ID", "ACCOUNT_NUMBER", "VERSION", "VERSION_1C", "ID_1C"));
					if($orderInfo = $dbOrder->Fetch())
					{
						if($arOrder["VERSION_1C"] != $orderInfo["VERSION_1C"] || (strlen($orderInfo["VERSION_1C"]) <= 0 || strlen($arOrder["VERSION_1C"]) <= 0)) // skip update if the same version
						{
							$arOrderFields = array();
							$orderId = $orderInfo["ID"];
							CSaleOrderChange::AddRecord($orderId, "ORDER_1C_IMPORT");
							if($arOrder["ID_1C"] != $orderInfo["ID_1C"])
								$arOrderFields["ID_1C"] = $arOrder["ID_1C"];
							$arOrderFields["VERSION_1C"] = $arOrder["VERSION_1C"];

							if($orderInfo["PAYED"] != "Y" && $orderInfo["ALLOW_DELIVERY"] != "Y" && $orderInfo["STATUS_ID"] != "F")
							{
								$dbOrderTax = CSaleOrderTax::GetList(
									array(),
									array("ORDER_ID" => $orderId),
									false,
									false,
									array("ID", "TAX_NAME", "VALUE", "VALUE_MONEY", "CODE", "IS_IN_PRICE")
								);
								$bTaxFound = false;
								if($arOrderTax = $dbOrderTax->Fetch())
								{
									$bTaxFound = true;
									if(IntVal($arOrderTax["VALUE_MONEY"]) != IntVal($arOrder["TAX"]["VALUE_MONEY"]) || IntVal($arOrderTax["VALUE"]) != IntVal($arOrder["TAX"]["VALUE"]) || ($arOrderTax["IS_IN_PRICE"] != $arOrder["TAX"]["IS_IN_PRICE"]))
									{
										if(IntVal($arOrder["TAX"]["VALUE"])>0)
										{
											$arFields = Array(
												"TAX_NAME" => $arOrder["TAX"]["NAME"],
												"ORDER_ID" => $orderId,
												"VALUE" => $arOrder["TAX"]["VALUE"],
												"IS_PERCENT" => "Y",
												"IS_IN_PRICE" => $arOrder["TAX"]["IS_IN_PRICE"],
												"VALUE_MONEY" => $arOrder["TAX"]["VALUE_MONEY"],
												"CODE" => "VAT1C",
												"APPLY_ORDER" => "100"
											);
											CSaleOrderTax::Update($arOrderTax["ID"], $arFields);
											$arOrderFields["TAX_VALUE"] = $arOrder["TAX"]["VALUE_MONEY"];
										}
										else
										{
											CSaleOrderTax::Delete($arOrderTax["ID"]);
											$arOrderFields["TAX_VALUE"] = 0;
										}
									}
								}

								if(!$bTaxFound)
								{
									if(IntVal($arOrder["TAX"]["VALUE"])>0)
									{
										$arFields = Array(
											"TAX_NAME" => $arOrder["TAX"]["NAME"],
											"ORDER_ID" => $orderId,
											"VALUE" => $arOrder["TAX"]["VALUE"],
											"IS_PERCENT" => "Y",
											"IS_IN_PRICE" => $arOrder["TAX"]["IS_IN_PRICE"],
											"VALUE_MONEY" => $arOrder["TAX"]["VALUE_MONEY"]
										);
										CSaleOrderTax::Add($arFields);
										$arOrderFields["TAX_VALUE"] = $arOrder["TAX"]["VALUE_MONEY"];
									}
								}

								$arShoppingCart = array();
								$bNeedUpdate = false;
								$dbBasket = CSaleBasket::GetList(
									array("NAME" => "ASC"),
									array("ORDER_ID" => $orderId),
									false,
									false,
									array(
										"ID",
										"QUANTITY",
										"CANCEL_CALLBACK_FUNC",
//.........这里部分代码省略.........
开发者ID:ASDAFF,项目名称:1C_Bitrix_info_site,代码行数:101,代码来源:order_loader.php

示例9: array

<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
CModule::IncludeModule("sale");
// Выберем все профили покупателя для текущего пользователя,
// упорядочив результат по дате последнего изменения
$db_sales = CSaleOrderUserProps::GetList(array("DATE_UPDATE" => "DESC"), array("USER_ID" => $USER->GetID()));
while ($ar_sales = $db_sales->Fetch()) {
    $props = array();
    $db_propVals = CSaleOrderUserPropsValue::GetList(array("ID" => "ASC"), array("USER_PROPS_ID" => $ar_sales["ID"]));
    while ($arPropVals = $db_propVals->Fetch()) {
        if ($arPropVals["PROP_TYPE"] == "LOCATION") {
            $arPropVals["~VALUE"] = $arPropVals["VALUE"];
            $loc = CSaleLocation::GetByID($arPropVals["VALUE"]);
            $arPropVals["VALUE"] = $loc["CITY_NAME"] ?: $loc["REGION_NAME"] ?: $loc["COUNTRY_NAME"];
        }
        $props[] = $arPropVals;
    }
    $ar_sales["PROPS"] = $props;
    $arResult["DELIVERY_ADDR"][] = $ar_sales;
}
开发者ID:sharapudinov,项目名称:lovestore.top,代码行数:23,代码来源:result_modifier.php

示例10: CAdminSorting

 //END MAIN INFO
 //BUYERS PROFILE
 $sTableID_tab2 = "tbl_sale_buyers_profile_tab2";
 $oSort_tab2 = new CAdminSorting($sTableID_tab2);
 $lAdmin_tab2 = new CAdminList($sTableID_tab2, $oSort_tab2);
 $arPErsonTypes = array();
 $db_ptype = CSalePersonType::GetList($by1 = "SORT", $order1 = "ASC");
 while ($ptype = $db_ptype->Fetch()) {
     $arPErsonTypes[$ptype["ID"]] = $ptype;
 }
 if (!isset($_REQUEST["by"])) {
     $arProfSort = array("PERSON_TYPE_ID" => "ASC", "DATE_UPDATE" => "DESC");
 } else {
     $arProfSort[$by] = $order;
 }
 $dbProfileList = CSaleOrderUserProps::GetList($arProfSort, array("USER_ID" => $ID), false, false, array("ID", "NAME", "PERSON_TYPE_ID", "DATE_UPDATE"));
 $dbProfileList = new CAdminResult($dbProfileList, $sTableID_tab2);
 $dbProfileList->NavStart();
 $lAdmin_tab2->NavText($dbProfileList->GetNavPrint(GetMessage('BUYER_PERSON_LIST')));
 $personHeader = array(array("id" => "NAME", "content" => GetMessage("BUYER_P_NAME"), "sort" => "NAME", "default" => true), array("id" => "PERSON_TYPE_ID", "content" => GetMessage("BUYER_P_PERSONTYPE"), "sort" => "PERSON_TYPE_ID", "default" => true), array("id" => "DATE_UPDATE", "content" => GetMessage("BUYER_P_DATE_UPDATE"), "sort" => "DATE_UPDATE", "default" => true));
 $lAdmin_tab2->AddHeaders($personHeader);
 while ($arProfList = $dbProfileList->GetNext()) {
     $row =& $lAdmin_tab2->AddRow($arProfList["ID"], $arProfList, "sale_buyers_profile_edit.php?id=" . $arProfList["ID"] . "&lang=" . LANG, GetMessage("BUYER_P_PROFILE_EDIT"));
     $row->AddField("NAME", "[" . $arProfList["ID"] . "] <a href=\"/bitrix/admin/sale_buyers_profile_edit.php?id=" . $arProfList["ID"] . "&lang=" . LANG . "\">" . $arProfList["NAME"] . "</a>");
     $row->AddField("PERSON_TYPE_ID", htmlspecialcharsbx($arPErsonTypes[$arProfList["PERSON_TYPE_ID"]]["NAME"]));
     if (count($arSites) > 1) {
         $row->AddField("LID", "[" . $arProfList["LID"] . "] " . htmlspecialcharsbx($arSites[$arProfList["LID"]]["NAME"]) . "");
     }
 }
 if ($_REQUEST["table_id"] == $sTableID_tab2) {
     $lAdmin_tab2->CheckListMode();
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:31,代码来源:buyers_profile.php

示例11: CAdminResult

                    if(!CSaleOrderUserProps::Update($ID, $arFields))
                        $lAdmin->AddGroupError(GetMessage("ws.saleuserprofiles_save_error").$cData->LAST_ERROR, $ID);
                }
                else
                    $lAdmin->AddGroupError(GetMessage("ws.saleuserprofiles_save_error")." ".GetMessage("ws.saleuserprofiles_no_profile"), $ID);
                break;*/
        }
    }
}

// ******************************************************************** //
//                ВЫБОРКА ЭЛЕМЕНТОВ СПИСКА                              //
// ******************************************************************** //

// выберем список профилей пользователей
$rsData = CSaleOrderUserProps::GetList(array($by=>$order), $arFilter);
//$arData = array();
//while ($arRes = $rsData->Fetch()) {
//    $arData[] = $arRes;
//}

// преобразуем список в экземпляр класса CAdminResult
//$rsData = new CDBResult;
$rsData = new CAdminResult($rsData, $sTableID);
//$rsData->InitFromArray($arData);


// аналогично CDBResult инициализируем постраничную навигацию.
$rsData->NavStart();

开发者ID:ASDAFF,项目名称:mp,代码行数:29,代码来源:list.php


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