本文整理汇总了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;
}
}
示例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>";
}
}
示例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;