• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP CSaleOrderUserProps类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: Delete

 function Delete($ID)
 {
     global $DB;
     $ID = IntVal($ID);
     $db_orderProps = CSaleOrderProps::GetList($by = "PROPS_GROUP_ID", $order = "ASC", array("PROPS_GROUP_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("UPDATE b_sale_order_props_value SET ORDER_PROPS_ID = NULL 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 PROPS_GROUP_ID = " . $ID . "", true);
     CSaleOrderUserProps::ClearEmpty();
     return $DB->Query("DELETE FROM b_sale_order_props_group WHERE ID = " . $ID . "", true);
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:14,代码来源:order_props_group.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

 function Delete($ID)
 {
     global $DB;
     $ID = IntVal($ID);
     $DB->Query("DELETE FROM b_sale_order_props_variant WHERE ORDER_PROPS_ID = " . $ID . "", true);
     $DB->Query("UPDATE b_sale_order_props_value SET ORDER_PROPS_ID = NULL WHERE ORDER_PROPS_ID = " . $ID . "", true);
     $DB->Query("DELETE FROM b_sale_user_props_value WHERE ORDER_PROPS_ID = " . $ID . "", true);
     CSaleOrderUserProps::ClearEmpty();
     return $DB->Query("DELETE FROM b_sale_order_props WHERE ID = " . $ID . "", true);
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:10,代码来源:order_props.php


示例4: Delete

 /**
  * <p>Функция удаляет свойство с кодом ID заказа. Существующие в базе значения этого свойства отвязываются от удаляемого свойства. Удаляются связанные значения из профиля покупателя. </p>
  *
  *
  *
  *
  * @param int $ID  Код удаляемого свойства.
  *
  *
  *
  * @return bool <p>Возвращается <i>true</i> в случае успешного удаления и <i>false</i> - в
  * случае ошибки.</p> <a name="examples"></a>
  *
  *
  * <h4>Example</h4> 
  * <pre>
  * &lt;?
  * if (!CSaleOrderProps::Delete(12))
  *    echo "Ошибка удаления свойства";
  * ?&gt;
  * </pre>
  *
  *
  * @static
  * @link http://dev.1c-bitrix.ru/api_help/sale/classes/csaleorderprops/csaleorderprops__delete.75442e5e.php
  * @author Bitrix
  */
 public static function Delete($ID)
 {
     global $DB;
     $ID = intval($ID);
     if ($ID <= 0) {
         return false;
     }
     foreach (GetModuleEvents("sale", "OnBeforeOrderPropsDelete", true) as $arEvent) {
         if (ExecuteModuleEventEx($arEvent, array($ID)) === false) {
             return false;
         }
     }
     $DB->Query("DELETE FROM b_sale_order_props_variant WHERE ORDER_PROPS_ID = " . $ID, true);
     $DB->Query("UPDATE b_sale_order_props_value SET ORDER_PROPS_ID = NULL WHERE ORDER_PROPS_ID = " . $ID, true);
     $DB->Query("DELETE FROM b_sale_user_props_value WHERE ORDER_PROPS_ID = " . $ID, true);
     $DB->Query("DELETE FROM b_sale_order_props_relation WHERE PROPERTY_ID = " . $ID, true);
     CSaleOrderUserProps::ClearEmpty();
     foreach (GetModuleEvents("sale", "OnOrderPropsDelete", true) as $arEvent) {
         ExecuteModuleEventEx($arEvent, array($ID));
     }
     return $DB->Query("DELETE FROM b_sale_order_props WHERE ID = " . $ID, true);
 }
开发者ID:rasuldev,项目名称:torino,代码行数:49,代码来源:order_props.php


示例5: saveProfileData

 public static function saveProfileData($profileId, Order $order, array $formData)
 {
     $result = new Result();
     $errors = array();
     if (!($profileName = $order->getPropertyCollection()->getProfileName())) {
         $result->addError(new EntityError(Loc::getMessage("SALE_ORDEREDIT_PROFILE_ERROR_NAME")));
         return $result;
     }
     $res = \CSaleOrderUserProps::DoSaveUserProfile($order->getUserId(), $profileId, $profileName->getValue(), $order->getPersonTypeId(), $propCollection = $formData["PROPERTIES"], $errors);
     if ($res === false) {
         if (!empty($errors)) {
             foreach ($errors as $error) {
                 $result->addError(new EntityError($error . "<br>\n"));
             }
         } else {
             $result->addError(new EntityError(Loc::getMessage("SALE_ORDEREDIT_PROFILE_ERROR_SAVE")));
         }
     }
     return $result;
 }
开发者ID:webgksupport,项目名称:alpina,代码行数:20,代码来源:orderedit.php


示例6: 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


示例7: 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


示例8: 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


示例9: array

         if ($psPreAction && $psPreAction->IsAction()) {
             $psPreAction->orderId = $arResult["ORDER_ID"];
             $psPreAction->orderAmount = $orderTotalSum;
             $psPreAction->deliveryAmount = $arResult["DELIVERY_PRICE"];
             $psPreAction->taxAmount = $arResult["TAX_PRICE"];
             $orderData = array();
             $dbBasketItems = CSaleBasket::GetList(array("ID" => "ASC"), array("FUSER_ID" => CSaleBasket::GetBasketUserID(), "LID" => SITE_ID, "ORDER_ID" => $arResult["ORDER_ID"]), false, false, array("ID", "QUANTITY", "PRICE", "WEIGHT", "NAME", "CURRENCY", "PRODUCT_ID", "DETAIL_PAGE_URL"));
             while ($arItem = $dbBasketItems->Fetch()) {
                 $orderData['BASKET_ITEMS'][] = $arItem;
             }
             $psPreAction->payOrder($orderData);
         }
     }
 }
 if (empty($arResult["ERROR"])) {
     CSaleOrderUserProps::DoSaveUserProfile($USER->GetID(), $arUserResult["PROFILE_ID"], $arUserResult["PROFILE_NAME"], $arUserResult["PERSON_TYPE_ID"], $arUserResult["ORDER_PROP"], $arResult["ERROR"]);
 }
 // mail message
 if (empty($arResult["ERROR"])) {
     $i = 0;
     $strOrderList = "";
     $arBasketList = array();
     $dbBasketItems = CSaleBasket::GetList(array("ID" => "ASC"), array("ORDER_ID" => $arResult["ORDER_ID"]), false, false, array("ID", "PRODUCT_ID", "NAME", "QUANTITY", "PRICE", "CURRENCY", "TYPE", "SET_PARENT_ID"));
     while ($arItem = $dbBasketItems->Fetch()) {
         if (CSaleBasketHelper::isSetItem($arItem)) {
             continue;
         }
         $arFilter = array("ID" => IntVal($arItem['PRODUCT_ID']));
         $res = CIBlockElement::GetList(array(), $arFilter, false, false, array("ID", "IBLOCK_ID", "PREVIEW_PICTURE", 'DETAIL_PICTURE'));
         while ($ar_fields = $res->GetNext()) {
             if ($ar_fields['PREVIEW_PICTURE']) {
开发者ID:sharapudinov,项目名称:lovestore.top,代码行数:31,代码来源:component.php


示例10: intval

 require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php";
 if (isset($hrpd->MerchantInternalPaymentId)) {
     if ($hrpd->ErrorCode == 0) {
         if (CModule::IncludeModule('sale')) {
             $order_id = intval($hrpd->MerchantInternalPaymentId);
             if ($arOrder = CSaleOrder::GetByID(IntVal($order_id))) {
                 CSalePaySystemAction::InitParamArrays($arOrder, $arOrder["ID"]);
                 $urlGetMerchantInfo = 'http://payment.kaznachey.net/api/PaymentInterface/CreatePayment';
                 $urlGetClientMerchantInfo = 'http://payment.kaznachey.net/api/PaymentInterface/GetMerchatInformation';
                 $merchantGuid = CSalePaySystemAction::GetParamValue("MerchantId");
                 $merchnatSecretKey = CSalePaySystemAction::GetParamValue("SecretKey");
                 $order_id = IntVal($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["ID"]);
                 $selectedPaySystemId = 1;
                 $quantitys = 0;
                 $order_info = CSaleOrder::GetByID($order_id);
                 $user_info = CSaleOrderUserProps::GetByID($order_info['USER_ID']);
                 $user_fullinfo = CSaleOrderUserPropsValue::GetByID($order_info['USER_ID']);
                 $user_email = $USER->GetParam("EMAIL");
                 $user_id = $order_info['USER_ID'];
                 $amount = number_format($order_info['PRICE'], 2, '.', '');
                 $dbBasketItems = CSaleBasket::GetList(array(), array("ORDER_ID" => $order_id));
                 while ($arItems = $dbBasketItems->Fetch()) {
                     $quantitys += $arItems['QUANTITY'];
                 }
                 if ($order_info['PRICE_DELIVERY'] > 0) {
                     $quantitys += 1;
                 }
                 $quantitys = number_format($quantitys, 2, '.', '');
                 $signature_u = md5(md5($merchantGuid . $merchnatSecretKey . "{$amount}" . "{$quantitys}" . $order_id));
                 if ($hrpd->CustomMerchantInfo == $signature_u) {
                     $arFields = array("PS_STATUS" => "Y", "PS_STATUS_CODE" => "-", "PS_STATUS_DESCRIPTION" => $strPS_STATUS_DESCRIPTION, "PS_STATUS_MESSAGE" => $strPS_STATUS_MESSAGE, "PS_SUM" => $out_summ, "PS_CURRENCY" => "", "PS_RESPONSE_DATE" => Date(CDatabase::DateFormatToPHP(CLang::GetDateFormat("FULL", LANG))), "USER_ID" => $arOrder["USER_ID"]);
开发者ID:saxum2010,项目名称:kaznachey_Bitrix,代码行数:31,代码来源:kaznachey_result.php


示例11: 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


示例12: 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


示例13: LocalRedirect

                 $event1 = "eStore";
                 $event2 = "order_confirm";
                 $event3 = $arResult["ORDER_ID"];
                 $e = $event1 . "/" . $event2 . "/" . $event3;
                 if (!is_array($_SESSION["ORDER_EVENTS"]) || is_array($_SESSION["ORDER_EVENTS"]) && !in_array($e, $_SESSION["ORDER_EVENTS"])) {
                     CStatistic::Set_Event($event1, $event2, $event3);
                     $_SESSION["ORDER_EVENTS"][] = $e;
                 }
             }
             $urlError = "";
             if ($PAYSYSTEM_ID == "account") {
                 if (!CSaleUserAccount::DoPayOrderFromAccount($USER->GetID(), $arBasketItems["CURRENCY"], $ORDER_ID, $arBasketItems["PRICE"], array(), $arErrors)) {
                     $urlError = "&erraccount=y";
                 }
             }
             CSaleOrderUserProps::DoSaveUserProfile($USER->GetID(), $PROFILE_ID, $profileName, $PERSON_TYPE, $arPropValues, $arErrors);
             LocalRedirect($APPLICATION->GetCurPageParam("ORDER_ID=" . $ORDER_ID . $urlError, array("ORDER_ID", "action", "id")));
         } elseif (count($arErrors) > 0) {
             foreach ($arErrors as $val) {
                 $errorMessage .= $val . "<br>";
             }
         }
     }
 } else {
     if (!isset($_POST["BasketOrder"])) {
         $errorMessage = "";
     }
 }
 /*********************************************************/
 /******************** take basket ************************/
 /*********************************************************/
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:component.php


示例14: 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


示例15: 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


示例16: Add

    static function Add($arFields) {
        $result = new WS_SaleUserProfilesErrorsContainer();
        $fields = array(
            "NAME"              => $arFields["NAME"],
            "PERSON_TYPE_ID"    => $arFields["PERSON_TYPE_ID"],
            "USER_ID"           => $arFields["USER_ID"],
            "DATE_UPDATE"       => $arFields["DATE_UPDATE"]
        );
        if (empty($fields["USER_ID"])) {
            $result->addErrorString(GetMessage("ws.saleuserprofiles_save_error_required_field") . "\"код пользователя, которому принадлежит профиль\"");
        }

        // сохраняем поля
        if (!$result->getErrorsAsString() && !empty($arFields)) {
            $id = CSaleOrderUserProps::Add($arFields);

            if ($id) {
                return $id;
            }
        }
        return $result;
    }
开发者ID:ASDAFF,项目名称:mp,代码行数:22,代码来源:profilesManager.php


示例17: 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


示例18: 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


示例19: GetMessage

									"CODE" => $arOrderProperties["CODE"],
									"VALUE" => $curVal
								);
							CSaleOrderPropsValue::Add($arFields);

							if ( $arOrderProperties["USER_PROPS"] == "Y" && IntVal($arUserResult["PROFILE_ID"])<=0 && IntVal($arUserResult["PROFILE_ID_new"])<=0)
							{
								if (strlen($arUserResult["PROFILE_NAME"]) <= 0)
									$arUserResult["PROFILE_NAME"] = GetMessage("SOA_PROFILE")." ".Date("Y-m-d");

								$arFields = array(
										"NAME" => $arUserResult["PROFILE_NAME"],
										"USER_ID" => IntVal($USER->GetID()),
										"PERSON_TYPE_ID" => $arUserResult["PERSON_TYPE_ID"]
									);
								$arUserResult["PROFILE_ID_new"] = CSaleOrderUserProps::Add($arFields);
								$arUserResult["PROFILE_ID_new"] = IntVal($arUserResult["PROFILE_ID_new"]);
							}

							if ($arOrderProperties["USER_PROPS"] == "Y" && IntVal($arUserResult["PROFILE_ID_new"]) > 0)
							{
								$arFields = array(
										"USER_PROPS_ID" => $arUserResult["PROFILE_ID_new"],
										"ORDER_PROPS_ID" => $arOrderProperties["ID"],
										"NAME" => $arOrderProperties["NAME"],
										"VALUE" => $curVal
									);
								CSaleOrderUserPropsValue::Add($arFields);
							}

							if ($arOrderProperties["USER_PROPS"] == "Y" && IntVal($arUserResult["PROFILE_ID"]) > 0)
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:31,代码来源:component.php


示例20: LocalRedirect

                 $event1 = "eStore";
                 $event2 = "order_confirm";
                 $event3 = $arResult["ORDER_ID"];
                 $e = $event1 . "/" . $event2 . "/" . $event3;
                 if (!is_array($_SESSION["ORDER_EVENTS"]) || is_array($_SESSION["ORDER_EVENTS"]) && !in_array($e, $_SESSION["ORDER_EVENTS"])) {
                     CStatistic::Set_Event($event1, $event2, $event3);
                     $_SESSION["ORDER_EVENTS"][] = $e;
                 }
             }
             $urlError = "";
             if ($PAYSYSTEM_ID == "account") {
                 if (!CSaleUserAccount::DoPayOrderFromAccount($currentUserId, $arBasketItems["CURRENCY"], $ORDER_ID, $arBasketItems["PRICE"], array(), $arErrors)) {
                     $urlError = "&erraccount=y";
                 }
             }
             CSaleOrderUserProps::DoSaveUserProfile($currentUserId, $PROFILE_ID, $profileName, $PERSON_TYPE, $arPropValues, $arErrors);
             LocalRedirect($APPLICATION->GetCurPageParam("ORDER_ID=" . $ORDER_ID . $urlError, array("ORDER_ID", "action", "id")));
         } elseif (!empty($arErrors)) {
             foreach ($arErrors as $val) {
                 $errorMessage .= $val . "<br>";
             }
         }
     }
 } else {
     if (!isset($_POST["BasketOrder"])) {
         $errorMessage = "";
     }
 }
 /*********************************************************/
 /******************** take basket ************************/
 /*********************************************************/
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:component.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP CSalePaySystem类代码示例发布时间:2022-05-20
下一篇:
PHP CSaleOrderTax类代码示例发布时间:2022-05-20
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap