diff --git a/Application/Controller/Admin/ManufacturerInfoLongdesc.php b/Application/Controller/Admin/ManufacturerInfoLongdesc.php new file mode 100644 index 0000000..3e6349d --- /dev/null +++ b/Application/Controller/Admin/ManufacturerInfoLongdesc.php @@ -0,0 +1,54 @@ +_aViewData['edit'] = $oManufacturer = oxNew(\OxidEsales\Eshop\Application\Model\Manufacturer::class); + + $soxId = $this->_aViewData["oxid"] = $this->getEditObjectId(); + if (isset($soxId) && $soxId != "-1") { + // load object + $d3manufacturerlang = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("d3manufacturerlang"); + + if (!isset($d3manufacturerlang)) { + $d3manufacturerlang = $this->_iEditLang; + } + + $this->_aViewData["d3manufacturerlang"] = $d3manufacturerlang; + + $oManufacturer->loadInLang($d3manufacturerlang, $soxId); + + + + //Disable editing for derived items + if ($oManufacturer->isDerived()) { + $this->_aViewData['readonly'] = true; + } + + foreach (\OxidEsales\Eshop\Core\Registry::getLang()->getLanguageNames() as $id => $language) { + $oLang = new \stdClass(); + $oLang->sLangDesc = $language; + $oLang->selected = ($id == $this->_iEditLang); + $this->_aViewData["otherlang"][$id] = clone $oLang; + } + } + + $this->_aViewData["editor"] = $this->generateTextEditor("100%", 280, $oManufacturer, "D3DESCRIPTION", "list.tpl.css"); + + return "d3manufacturerlongdesc.tpl"; + } + + public function save() + { + parent::save(); + } +} \ No newline at end of file diff --git a/Application/views/admin/tpl/d3manufacturer_longdesc.tpl b/Application/views/admin/tpl/d3manufacturer_longdesc.tpl new file mode 100644 index 0000000..930fd60 --- /dev/null +++ b/Application/views/admin/tpl/d3manufacturer_longdesc.tpl @@ -0,0 +1,46 @@ +[{include file="headitem.tpl" title="GENERAL_ADMIN_TITLE"|oxmultilangassign}] + + + +[{if $readonly}] + [{assign var="readonly" value="readonly disabled"}] + [{else}] + [{assign var="readonly" value=""}] + [{/if}] + +
+ + + +[{include file="bottomnaviitem.tpl"}] + +[{include file="bottomitem.tpl"}] diff --git a/metadata.php b/metadata.php index 25a9e7f..3aa2732 100644 --- a/metadata.php +++ b/metadata.php @@ -12,8 +12,10 @@ */ declare(strict_types=1); - -$sMetadataVersion = '2.1'; + + use D3\ManufacturerInformation\Application\Controller\Admin\ManufacturerInfoLongdesc; + + $sMetadataVersion = '2.1'; $sModuleId = 'd3manufacturerinformation'; $logo = '