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


PHP CSaleOrderProps::Update方法代码示例

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


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

示例1: installExternalEntities


//.........这里部分代码省略.........
         $priceTypeId = intval($arBaseCatalogGroup['ID']);
         COption::SetOptionInt('crm', 'selected_catalog_group_id', $priceTypeId);
         unset($arBaseCatalogGroup, $priceTypeId);
         COption::SetOptionString('crm', '~CRM_EXCH1C_REWRITEDEFCATGRP_12_5_20', 'Y');
         LocalRedirect($GLOBALS['APPLICATION']->GetCurPageParam());
         return true;
     }
     if (COption::GetOptionString('crm', '~CRM_INVOICE_EXCH1C_UPDATE_12_5_17', 'N') === 'Y') {
         $pref = COption::GetOptionString('sale', '1C_SALE_ACCOUNT_NUMBER_SHOP_PREFIX', '');
         if (strlen(strval($pref)) < 1) {
             COption::SetOptionString('sale', '1C_SALE_ACCOUNT_NUMBER_SHOP_PREFIX', 'CRM_');
         }
         COption::SetOptionString('crm', '~CRM_INVOICE_EXCH1C_UPDATE_12_5_19', 'Y');
         self::installDisableSaleEvents();
         COption::SetOptionString('crm', '~CRM_INVOICE_DISABLE_SALE_EVENTS_12_5_19', 'Y');
         if (!CModule::IncludeModule('catalog')) {
             return false;
         }
         $arBaseCatalogGroup = CCatalogGroup::GetBaseGroup();
         $priceTypeId = intval($arBaseCatalogGroup['ID']);
         COption::SetOptionInt('crm', 'selected_catalog_group_id', $priceTypeId);
         unset($arBaseCatalogGroup, $priceTypeId);
         COption::SetOptionString('crm', '~CRM_EXCH1C_REWRITEDEFCATGRP_12_5_20', 'Y');
         LocalRedirect($GLOBALS['APPLICATION']->GetCurPageParam());
         return true;
     }
     if (COption::GetOptionString('crm', '~CRM_INVOICE_INSTALL_12_5_7', 'N') === 'Y') {
         // fix 40279
         if (COption::GetOptionString('crm', '~CRM_INVOICE_UPDATE_12_5_14', 'N') !== 'Y') {
             try {
                 if (CModule::IncludeModule('sale')) {
                     global $DB;
                     if ($DB->TableExists('b_sale_order_props') && class_exists('CSaleOrderProps')) {
                         $arPropsFilter = array('TYPE' => 'LOCATION', 'REQUIED' => 'Y', 'USER_PROPS' => 'Y', 'IS_LOCATION' => 'Y', 'IS_EMAIL' => 'N', 'IS_PROFILE_NAME' => 'N', 'IS_PAYER' => 'N', 'CODE' => 'LOCATION');
                         // update properties
                         $dbOrderProps = CSaleOrderProps::GetList(array('SORT' => 'ASC', 'ID' => 'ASC'), $arPropsFilter, false, false, array('ID', 'IS_LOCATION4TAX'));
                         if ($dbOrderProps !== false) {
                             while ($arOrderProp = $dbOrderProps->Fetch()) {
                                 if ($arOrderProp['IS_LOCATION4TAX'] !== 'Y') {
                                     CSaleOrderProps::Update($arOrderProp['ID'], array('IS_LOCATION4TAX' => 'Y'));
                                 }
                             }
                             COption::SetOptionString('crm', '~CRM_INVOICE_UPDATE_12_5_14', 'Y');
                         }
                     }
                 }
             } catch (Exception $e) {
             }
         }
         if (COption::GetOptionString('crm', '~CRM_INVOICE_UPDATE_12_5_14', 'N') === 'Y') {
             if (COption::GetOptionString('crm', '~CRM_INVOICE_EXCH1C_UPDATE_12_5_17', 'N') !== 'Y') {
                 if (CModule::IncludeModule('catalog') && CModule::IncludeModule('sale') && CModule::IncludeModule('iblock')) {
                     try {
                         require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/crm/install/exch1c.php";
                     } catch (Exception $e) {
                         $errMsg[] = $e->getMessage();
                     }
                     if (empty($errMsg)) {
                         COption::SetOptionString('crm', '~CRM_INVOICE_EXCH1C_UPDATE_12_5_17', 'Y');
                         COption::SetOptionString('sale', '1C_SALE_ACCOUNT_NUMBER_SHOP_PREFIX', 'CRM_');
                         COption::SetOptionString('crm', '~CRM_INVOICE_EXCH1C_UPDATE_12_5_19', 'Y');
                         self::installDisableSaleEvents();
                         COption::SetOptionString('crm', '~CRM_INVOICE_DISABLE_SALE_EVENTS_12_5_19', 'Y');
                         if (!CModule::IncludeModule('catalog')) {
                             return false;
                         }
                         $arBaseCatalogGroup = CCatalogGroup::GetBaseGroup();
                         $priceTypeId = intval($arBaseCatalogGroup['ID']);
                         COption::SetOptionInt('crm', 'selected_catalog_group_id', $priceTypeId);
                         unset($arBaseCatalogGroup, $priceTypeId);
                         COption::SetOptionString('crm', '~CRM_EXCH1C_REWRITEDEFCATGRP_12_5_20', 'Y');
                         LocalRedirect($GLOBALS['APPLICATION']->GetCurPageParam());
                         return true;
                     } else {
                         $errString = implode('<br>', $errMsg);
                         ShowError($errString);
                         return false;
                     }
                 }
             } else {
                 return true;
             }
         }
         return false;
     }
     try {
         require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/crm/install/sale_link.php";
     } catch (Exception $e) {
         $errMsg[] = $e->getMessage();
     }
     if (empty($errMsg)) {
         COption::SetOptionString('crm', '~CRM_INVOICE_INSTALL_12_5_7', 'Y');
         LocalRedirect($GLOBALS['APPLICATION']->GetCurPageParam());
         return true;
     } else {
         $errString = implode('<br>', $errMsg);
         ShowError($errString);
         return false;
     }
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:101,代码来源:crm_invoice.php

示例2: IntVal

     $IS_FILTERED = "N";
     $IS_ZIP = "N";
 }
 $SORT = IntVal($SORT);
 if ($SORT <= 0) {
     $SORT = 100;
 }
 $PROPS_GROUP_ID = IntVal($PROPS_GROUP_ID);
 if ($PROPS_GROUP_ID <= 0) {
     $strError .= GetMessage("ERROR_NO_GROUP") . "<br>";
 }
 if (strlen($strError) <= 0) {
     unset($arFields);
     $arFields = array("PERSON_TYPE_ID" => $PERSON_TYPE_ID, "NAME" => $NAME, "TYPE" => $TYPE, "REQUIED" => $REQUIED, "DEFAULT_VALUE" => $DEFAULT_VALUE, "SORT" => $SORT, "CODE" => strlen($CODE) <= 0 ? False : $CODE, "USER_PROPS" => $USER_PROPS, "IS_LOCATION" => $IS_LOCATION, "IS_LOCATION4TAX" => $IS_LOCATION4TAX, "PROPS_GROUP_ID" => $PROPS_GROUP_ID, "SIZE1" => $SIZE1, "SIZE2" => $SIZE2, "DESCRIPTION" => $DESCRIPTION, "IS_EMAIL" => $IS_EMAIL, "IS_PROFILE_NAME" => $IS_PROFILE_NAME, "IS_PAYER" => $IS_PAYER, "IS_FILTERED" => $IS_FILTERED, "IS_ZIP" => $IS_ZIP, "ACTIVE" => $ACTIVE, "UTIL" => $UTIL, "INPUT_FIELD_LOCATION" => $INPUT_FIELD_LOCATION);
     if ($ID > 0) {
         if (!CSaleOrderProps::Update($ID, $arFields)) {
             $strError .= GetMessage("ERROR_EDIT_PROP") . "<br>";
         }
         if (strlen($strError) <= 0) {
             //$db_order_props_tmp = CSaleOrderPropsValue::GetList(($b="NAME"), ($o="ASC"), Array("ORDER_PROPS_ID"=>$ID));
             $db_order_props_tmp = CSaleOrderPropsValue::GetList($b = "ID", $o = "ASC", array("ORDER_PROPS_ID" => $ID, "!CODE" => strlen($CODE) <= 0 ? False : $CODE));
             while ($ar_order_props_tmp = $db_order_props_tmp->Fetch()) {
                 CSaleOrderPropsValue::Update($ar_order_props_tmp["ID"], array("CODE" => strlen($CODE) <= 0 ? False : $CODE));
             }
         }
     } else {
         $ID = CSaleOrderProps::Add($arFields);
         if ($ID <= 0) {
             $strError .= GetMessage("ERROR_ADD_PROP") . "<br>";
         }
     }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:order_props_edit.php

示例3: foreach

            COption::SetOptionString($moduleID, "match_id_".$person_type_id."_gp_order_id_0", "ORDER_PROP_".$ID);
        }
    }
    
	
    if($properties){
	foreach ($properties as $person_type_id => $pt_props) {
		if (!isset($person_type_id_option_value) || empty($person_type_id_option_value)) {
			COption::SetOptionString($moduleID, "person_type_id", $person_type_id);
			$person_type_id_option_value = $person_type_id;
		}
		if (array_key_exists($person_type_id, $person_type_gp_special_props) && is_array($person_type_gp_special_props[$person_type_id])) {
            if(is_array($person_type_gp_special_props[$person_type_id])){
                foreach ($person_type_gp_special_props[$person_type_id] as $gp_special_prop_code => $gp_special_prop) {
    				if ($gp_special_prop['ACTIVE'] != 'Y') {
    					CSaleOrderProps::Update($gp_special_prop['ID'], array("ACTIVE" => "Y"));
    				}
    				$gp_special_props_set_list[] = $gp_special_prop_code;
    			}
            }
		}
            if(is_array($gp_special_props_code_list)){
    		foreach ($gp_special_props_code_list as $gp_special_code) {
    		    $j = 0;
                foreach($gp_special_props_set_list as $gp_spec){
                    if($gp_special_code == $gp_spec){
                        $j = 1;
                    }
                }
                if($j == 0){
                    $pt_props[$gp_special_code] = 0;
开发者ID:ASDAFF,项目名称:gpbitrix,代码行数:31,代码来源:step4.php


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