"NAME" => GetMessage("SALE_WIZARD_PERSON_2"), "SORT" => "150" ) ); } if ($shopLocalization == "ua") { $personTypeFizUa = (isset($personType["fiz_ua"]) && $personType["fiz_ua"] == "Y" ? "Y" : "N"); COption::SetOptionString("eshop", "personTypeFizUa", $personTypeFizUa, false, WIZARD_SITE_ID); if (in_array(GetMessage("SALE_WIZARD_PERSON_3"), $arPersonTypeNames)) { $arGeneralInfo["personType"]["fiz_ua"] = array_search(GetMessage("SALE_WIZARD_PERSON_3"), $arPersonTypeNames); CSalePersonType::Update(array_search(GetMessage("SALE_WIZARD_PERSON_3"), $arPersonTypeNames), Array( "ACTIVE" => $personTypeFizUa, ) ); } elseif($personTypeFizUa == "Y") { $arGeneralInfo["personType"]["fiz_ua"] = CSalePersonType::Add(Array( "LID" => WIZARD_SITE_ID, "NAME" => GetMessage("SALE_WIZARD_PERSON_3"), "SORT" => "100" ) ); } } if (COption::GetOptionString("eshop", "wizard_installed", "N", WIZARD_SITE_ID) != "Y" || WIZARD_INSTALL_DEMO_DATA) {
"NAME" => GetMessage("SALE_WIZARD_PERSON_2"), "SORT" => "150" ) ); } if ($shopLocalization == "ua") { $personTypeFizUa = ($personType["fiz_ua"] == "Y") ? "Y" : "N"; COption::SetOptionString("eshop", "personTypeFizUa", $personTypeFizUa, false, WIZARD_SITE_ID); if (in_array(GetMessage("SALE_WIZARD_PERSON_3"), $arPersonTypeNames)) { $arGeneralInfo["personType"]["fiz_ua"] = array_search(GetMessage("SALE_WIZARD_PERSON_3"), $arPersonTypeNames); CSalePersonType::Update(array_search(GetMessage("SALE_WIZARD_PERSON_3"), $arPersonTypeNames), Array( "ACTIVE" => $personType["fiz_ua"] == "Y" ? "Y" : "N", ) ); } elseif($personType["fiz_ua"] == "Y") { $arGeneralInfo["personType"]["fiz_ua"] = CSalePersonType::Add(Array( "LID" => WIZARD_SITE_ID, "NAME" => GetMessage("SALE_WIZARD_PERSON_3"), "SORT" => "100" ) ); } } if (COption::GetOptionString("eshop", "wizard_installed", "N", WIZARD_SITE_ID) != "Y" || WIZARD_INSTALL_DEMO_DATA) {
if (!empty($filter_lang) && !in_array("NOT_REF", $filter_lang)) { $arFilter["LID"] = $filter_lang; } else { unset($arFilter["LID"]); } if (strlen($filter_active) > 0) { $arFilter["ACTIVE"] = Trim($filter_active); } if ($lAdmin->EditAction() && $saleModulePermissions >= "W") { foreach ($FIELDS as $ID => $arFields) { $DB->StartTransaction(); $ID = IntVal($ID); if (!$lAdmin->IsUpdated($ID)) { continue; } if (!CSalePersonType::Update($ID, $arFields)) { if ($ex = $APPLICATION->GetException()) { $lAdmin->AddUpdateError($ex->GetString(), $ID); } else { $lAdmin->AddUpdateError(GetMessage("SPTAN_ERROR_UPDATE"), $ID); } $DB->Rollback(); } $DB->Commit(); } } if (($arID = $lAdmin->GroupAction()) && $saleModulePermissions >= "W") { if ($_REQUEST['action_target'] == 'selected') { $arID = array(); $dbResultList = CSalePersonType::GetList($by, $order, $arFilter); while ($arResult = $dbResultList->Fetch()) {