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


PHP CSaleOrderProps::Add方法代码示例

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


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

示例1: unset

 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>";
         }
     }
 }
 if (strlen($strError) <= 0) {
     if ($TYPE == "SELECT" || $TYPE == "MULTISELECT" || $TYPE == "RADIO") {
         $numpropsvals = IntVal($numpropsvals);
         for ($i = 0; $i <= $numpropsvals; $i++) {
             $strError1 = "";
             $CF_ID = IntVal(${"ID_" . $i});
             $CF_DEL = ${"DELETE_" . $i};
             unset($arFieldsV);
             $arFieldsV = array("ORDER_PROPS_ID" => $ID, "VALUE" => Trim(${"VALUE_" . $i}), "NAME" => Trim(${"NAME_" . $i}), "SORT" => IntVal(${"SORT_" . $i}) > 0 ? IntVal(${"SORT_" . $i}) : 100, "DESCRIPTION" => Trim(${"DESCRIPTION_" . $i}));
             if ($CF_ID <= 0) {
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:order_props_edit.php

示例2: array

		{
			$variants = $prop["VARIANTS"];
			unset($prop["VARIANTS"]);
		}

		if ($prop["CODE"] == "LOCATION" && $propCityId > 0)
		{
			$prop["INPUT_FIELD_LOCATION"] = $propCityId;
			$propCityId = 0;
		}

		$dbSaleOrderProps = CSaleOrderProps::GetList(array(), array("PERSON_TYPE_ID" => $prop["PERSON_TYPE_ID"], "CODE" =>  $prop["CODE"]));
		if ($arSaleOrderProps = $dbSaleOrderProps->GetNext())
			$id = $arSaleOrderProps["ID"];
		else
			$id = CSaleOrderProps::Add($prop);

		if ($prop["CODE"] == "CITY")
		{
			$propCityId = $id;
		}
		if(strlen($prop["CODE"]) > 0)
		{
			//$arGeneralInfo["propCode"][$prop["CODE"]] = $prop["CODE"];
			$arGeneralInfo["propCodeID"][$prop["CODE"]] = $id;
			$arGeneralInfo["properies"][$prop["PERSON_TYPE_ID"]][$prop["CODE"]] = $prop;
			$arGeneralInfo["properies"][$prop["PERSON_TYPE_ID"]][$prop["CODE"]]["ID"] = $id;
		}

		if(!empty($variants))
		{
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:31,代码来源:step1.php

示例3: elseif

    					"UTIL" => "Y"
    				);
    			} elseif ($prop > 0 && $prop != "empty") {
    				COption::SetOptionString($moduleID, "match_id_".$person_type_id."_".$code, 'ORDER_PROP_'.$prop);
                    COption::SetOptionString($moduleID, "selector_id_".$person_type_id."_".$code, '#ORDER_PROP_'.$prop);
    			} elseif ($prop == "empty") {
    				COption::SetOptionString($moduleID, "match_id_".$person_type_id."_".$code, '');
                    COption::SetOptionString($moduleID, "selector_id_".$person_type_id."_".$code, '');
    			}
    		}
        }
	}
    }
    if(is_array($property_fields)){
    	foreach ($property_fields as $prop_to_add) {
    		$ID = CSaleOrderProps::Add($prop_to_add);
    		if ($ID <= 0) {
    			$errors[] = GetMessage("PROPERTIES_GP_CREATION_ERROR", array("#NAME#" => $prop_to_add['NAME'], "#CODE#" => $prop_to_add['CODE'], "#PERSON_TYPE_ID#" => $prop_to_add['PERSON_TYPE_ID']));
    		} else {
    			COption::SetOptionString($moduleID, "match_id_".$prop_to_add['PERSON_TYPE_ID']."_".$prop_to_add['CODE'], 'ORDER_PROP_'.$ID);
    		    COption::SetOptionString($moduleID, "selector_id_".$prop_to_add['PERSON_TYPE_ID']."_".$prop_to_add['CODE'], '#ORDER_PROP_'.$ID);
            }
    	}
    }
	
	$gp_order_id_prop_res = CSaleOrderProps::GetList(array(), array("CODE" => $gp_special_props_set_list, "ACTIVE" => "Y"));
	while ($gp_order_id_prop_ar = $gp_order_id_prop_res->Fetch()) {
		COption::SetOptionString($moduleID, "match_id_".$gp_order_id_prop_ar['PERSON_TYPE_ID']."_".$gp_order_id_prop_ar['CODE'], 'ORDER_PROP_'.$gp_order_id_prop_ar['ID']);
	    //COption::SetOptionString($moduleID, "selector_id_".$gp_order_id_prop_ar['PERSON_TYPE_ID']."_".$gp_order_id_prop_ar['CODE'], 'ORDER_PROP_'.$gp_order_id_prop_ar['ID']);
    }
}
开发者ID:ASDAFF,项目名称:gpbitrix,代码行数:31,代码来源:step4.php


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