Exemplo n.º 1
0
 protected function createPropsMapHtml($personTypeId)
 {
     if (intval($personTypeId) <= 0) {
         return "";
     }
     $result = "";
     $requiredOrderProperties = Helper::getRequiredOrderProps();
     $orderPropsList = Helper::getOrderPropsList($personTypeId);
     foreach ($requiredOrderProperties as $orderPropertyCode) {
         $propIdForCode = 0;
         if (!empty($this->ebaySettings[$this->siteId]["ORDER_PROPS"][$orderPropertyCode])) {
             $propIdForCode = $this->ebaySettings[$this->siteId]["ORDER_PROPS"][$orderPropertyCode];
         } else {
             foreach ($orderPropsList as $propParams) {
                 if ($propParams["CODE"] == $orderPropertyCode) {
                     $propIdForCode = $propParams["ID"];
                     break;
                 }
             }
         }
         $result .= '<input type="hidden" name="EBAY_SETTINGS[ORDER_PROPS][' . $orderPropertyCode . ']" value="' . $propIdForCode . '">';
     }
     return $result;
 }
Exemplo n.º 2
0
    if (!\Bitrix\Main\Loader::includeModule('catalog')) {
        $arResult["ERROR"] = Loc::getMessage("CATALOG_MODULE_NOT_INSTALLED");
    }
    if (!is_array($siteSettings["IBLOCK_ID"]) || !isset($siteSettings["IBLOCK_ID"])) {
        $siteSettings["IBLOCK_ID"] = array();
    }
    $siteSettings["IBLOCK_ID"][] = "";
    $arPersonTypes = Helper::getPersonTypesList($SITE_ID);
    if (isset($siteSettings["PERSON_TYPE"]) && array_key_exists($siteSettings["PERSON_TYPE"], $arPersonTypes)) {
        $personTypeId = $siteSettings["PERSON_TYPE"];
    } else {
        reset($arPersonTypes);
        $personTypeId = $siteSettings["PERSON_TYPE"] = key($arPersonTypes);
    }
    $orderPropsList = Helper::getOrderPropsList($personTypeId);
    $requiredOrderProperties = Helper::getRequiredOrderProps();
    $bitrixStatuses = Helper::getBitrixStatuses($SITE_ID);
    $arTabs = array(array("DIV" => "sale_ebay_main", "TAB" => Loc::getMessage("SALE_EBAY_TAB_MAIN"), "TITLE" => Loc::getMessage("SALE_EBAY_TAB_MAIN_TITLE")), array("DIV" => "sale_ebay_orderprops", "TAB" => Loc::getMessage("SALE_EBAY_TAB_MATCH"), "TITLE" => Loc::getMessage("SALE_EBAY_TAB_MATCH_TITLE")), array("DIV" => "sale_ebay_connect", "TAB" => Loc::getMessage("SALE_EBAY_TAB_CONNECT"), "TITLE" => Loc::getMessage("SALE_EBAY_TAB_CONNECT_TITLE")), array("DIV" => "sale_ebay_categories", "TAB" => Loc::getMessage("SALE_EBAY_TAB_CATEGORIES"), "TITLE" => Loc::getMessage("SALE_EBAY_TAB_CATEGORIES_TITLE")));
    $tabControl = new CAdminTabControl("tabControl", $arTabs);
}
$APPLICATION->SetTitle(GetMessage("SALE_EBAY_TITLE"));
\Bitrix\Main\Page\Asset::getInstance()->addJs("/bitrix/js/sale/ebay_admin.js", true);
require_once $DOCUMENT_ROOT . BX_ROOT . "/modules/main/include/prolog_admin_after.php";
if ($bSaved) {
    CAdminMessage::ShowMessage(array("MESSAGE" => GetMessage("SALE_EBAY_SETTINGS_SAVED"), "TYPE" => "OK"));
}
?>
<form method="post" action="<?php 
echo $APPLICATION->GetCurPage();
?>
?lang=<?php