コード例 #1
0
ファイル: component.php プロジェクト: akniyev/arteva.ru
							if ($i > 0)
								$curVal .= ",";
							$curVal .= $arResult["POST"]["~ORDER_PROP_".$arOrderProperties["ID"]][$i];
						}
					}

					if ($arOrderProperties["TYPE"] == "CHECKBOX" && strlen($curVal) <= 0 && $arOrderProperties["REQUIED"] != "Y")
					{
						$curVal = "N";
					}

					if (strlen($curVal) > 0)
					{
						// map to CODE for location
						if(CSaleLocation::isLocationProMigrated() && $arOrderProperties['TYPE'] == 'LOCATION')
							$curVal = CSaleLocation::getLocationCodeById($curVal);

						$arFields = array(
								"ORDER_ID" => $arResult["ORDER_ID"],
								"ORDER_PROPS_ID" => $arOrderProperties["ID"],
								"NAME" => $arOrderProperties["NAME"],
								"CODE" => $arOrderProperties["CODE"],
								"VALUE" => $curVal
							);
						CSaleOrderPropsValue::Add($arFields);
						if ( $arOrderProperties["USER_PROPS"] == "Y" && IntVal($arResult["PROFILE_ID"]) <= 0 && IntVal($arResult["USER_PROPS_ID"])<=0)
						{
							if (strlen($arResult["PROFILE_NAME"]) <= 0)
								$arResult["PROFILE_NAME"] = GetMessage("SALE_PROFILE_NAME")." ".Date("Y-m-d");

							$arFields = array(