Example #1
0
 /**
  * @return array Fields witch user will see on delivery admin page
  */
 public static function getAdminFieldsList()
 {
     return Table::getMap();
 }
Example #2
0
 /**
  * @param $name
  * @return bool
  */
 protected static function hasNewServiceField($name)
 {
     $serviceFields = \Bitrix\Sale\Delivery\Services\Table::getMap();
     return self::isFieldInFilter($name, $serviceFields);
 }
if (empty($fields) && $ID <= 0) {
    $fields["PARENT_ID"] = $_REQUEST["PARENT_ID"] ? $_REQUEST["PARENT_ID"] : 0;
    $fields["CLASS_NAME"] = $_REQUEST["CLASS_NAME"] ? $_REQUEST["CLASS_NAME"] : "";
    $fields["CURRENCY"] = COption::GetOptionString("sale", "default_currency", "RUB");
    $fields["RIGHTS"] = "YYY";
    //Admin Manager Client
    if ($fields["CLASS_NAME"] == '\\Bitrix\\Sale\\Delivery\\Services\\Group') {
        $fields["ACTIVE"] = "Y";
    }
}
$serviceConfig = array();
$canHasProfiles = false;
$showRestrictions = true;
$showExtraServices = false;
$parentService = null;
$showFieldsList = \Bitrix\Sale\Delivery\Services\Table::getMap();
/* saving or updating Extra service & restrictions */
if ($ID > 0 && ($_SERVER['REQUEST_METHOD'] != "POST" || $isItSavingProcess)) {
    $dbRes = \Bitrix\Sale\Delivery\Services\Table::getById($ID);
    if (!($fields = $dbRes->fetch())) {
        $strError .= str_replace("#ID#", $ID, Loc::getMessage("SALE_DSE_ERROR_ID")) . "<br>";
    }
}
/* If action is copying */
if ($_REQUEST["action"] == "copy") {
    $ID = 0;
    unset($fields["ID"]);
} elseif ($_REQUEST["action"] == "profile_delete") {
    $idProf = isset($_REQUEST["ID_PROF"]) ? intval($_REQUEST["ID_PROF"]) : 0;
    if ($idProf > 0) {
        $res = \Bitrix\Sale\Delivery\Services\Table::delete($idProf);