13 Commits

26 changed files with 134 additions and 789 deletions

View File

@ -1,10 +1,10 @@
<?php <?php
$finder = PhpCsFixer\Finder::create() $finder = PhpCsFixer\Finder::create()
->in(__DIR__) ->in(__DIR__)
; ;
$header = <<<EOF $header = <<<EOF
Copyright (c) D3 Data Development (Inh. Thomas Dartsch) Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
For the full copyright and license information, please view For the full copyright and license information, please view
@ -17,8 +17,8 @@ https://www.d3data.de
@link https://www.oxidmodule.com @link https://www.oxidmodule.com
EOF; EOF;
$config = new PhpCsFixer\Config(); $config = new PhpCsFixer\Config();
return $config->setRules([ return $config->setRules([
'@PHP80Migration' => true, '@PHP80Migration' => true,
'@PSR12' => true, '@PSR12' => true,
'header_comment' => [ 'header_comment' => [

View File

@ -17,12 +17,11 @@ declare(strict_types=1);
namespace D3\ManufacturerInformation\Application\Controller\Admin; namespace D3\ManufacturerInformation\Application\Controller\Admin;
use D3\ManufacturerInformation\Application\Model\Constants;
use D3\ManufacturerInformation\Modules\Application\Model\D3ManufacturerLongDesc; use D3\ManufacturerInformation\Modules\Application\Model\D3ManufacturerLongDesc;
use Exception;
use OxidEsales\Eshop\Application\Controller\Admin\AdminDetailsController; use OxidEsales\Eshop\Application\Controller\Admin\AdminDetailsController;
use OxidEsales\Eshop\Application\Model\Manufacturer; use OxidEsales\Eshop\Application\Model\Manufacturer;
use OxidEsales\Eshop\Core\Registry; use OxidEsales\Eshop\Core\Registry;
use stdClass;
class ManufacturerInfoLongdesc extends AdminDetailsController class ManufacturerInfoLongdesc extends AdminDetailsController
{ {
@ -33,13 +32,12 @@ class ManufacturerInfoLongdesc extends AdminDetailsController
{ {
parent::render(); parent::render();
/** @var Manufacturer|D3ManufacturerLongDesc $oManufacturer */ $this->_aViewData['edit'] = $oManufacturer = oxNew(\OxidEsales\Eshop\Application\Model\Manufacturer::class);
$this->_aViewData['edit'] = $oManufacturer = oxNew(Manufacturer::class);
$sOXID = $this->_aViewData["oxid"] = $this->getEditObjectId(); $sOXID = $this->_aViewData["oxid"] = $this->getEditObjectId();
if (isset($sOXID) && $sOXID != "-1") { if (isset($sOXID) && $sOXID != "-1") {
// load object // load object
$d3manufacturerlang = Registry::getRequest()->getRequestEscapedParameter("catlang"); $d3manufacturerlang = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("catlang");
if (!isset($d3manufacturerlang)) { if (!isset($d3manufacturerlang)) {
$d3manufacturerlang = $this->_iEditLang; $d3manufacturerlang = $this->_iEditLang;
@ -54,28 +52,28 @@ class ManufacturerInfoLongdesc extends AdminDetailsController
$this->_aViewData['readonly'] = true; $this->_aViewData['readonly'] = true;
} }
foreach (Registry::getLang()->getLanguageNames() as $id => $language) { foreach (\OxidEsales\Eshop\Core\Registry::getLang()->getLanguageNames() as $id => $language) {
$oLang = new stdClass(); $oLang = new \stdClass();
$oLang->sLangDesc = $language; $oLang->sLangDesc = $language;
$oLang->selected = ($id == $this->_iEditLang); $oLang->selected = ($id == $this->_iEditLang);
$this->_aViewData["otherlang"][$id] = clone $oLang; $this->_aViewData["otherlang"][$id] = clone $oLang;
} }
} }
$this->_aViewData["editor"] = $this->generateTextEditor("100%", 280, $oManufacturer, $oManufacturer->getD3LongDescTableColumnName(), "list.css"); $this->_aViewData["editor"] = $this->generateTextEditor("100%", 280, $oManufacturer, "oxmanufacturers__d3description", "list.tpl.css");
return "@d3manufacturerinformation/admin/d3manufacturerlongdesc"; return "d3manufacturerlongdesc.tpl";
} }
/** /**
* @return void * @return void
* @throws Exception * @throws \Exception
*/ */
public function save(): void public function save()
{ {
parent::save(); parent::save();
$iManufacturerLang = intval(Registry::getRequest()->getRequestEscapedParameter("catlang")); $iManufacturerLang = intval(\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("catlang"));
$sOXID = $this->getEditObjectId(); $sOXID = $this->getEditObjectId();
$this->setEditObjectId($sOXID); $this->setEditObjectId($sOXID);
@ -94,18 +92,38 @@ class ManufacturerInfoLongdesc extends AdminDetailsController
$aParams = Registry::getRequest()->getRequestEscapedParameter("editval"); $aParams = Registry::getRequest()->getRequestEscapedParameter("editval");
$oManufacturer->assign($aParams); $oManufacturer->assign($aParams);
if (false === is_null($this->d3GetLongdescParamValue($oManufacturer))) { if (false === is_null($this->d3GetLongdescParamValue())) {
$oManufacturer->d3SetLongdesc($this->d3GetLongdescParamValue($oManufacturer)); $oManufacturer->d3SetLongdesc($this->d3GetLongdescParamValue());
$oManufacturer->save(); $oManufacturer->save();
} }
} }
/**
* Returns string which must be edited by editor
*
* @param \OxidEsales\Eshop\Core\Model\BaseModel $oObject object with field will be used for editing
* @param string $sField name of editable field
*
* @return string
* @deprecated underscore prefix violates PSR12, will be renamed to "getEditValue" in next major
*/
protected function _getEditValue($oManufacturer, $sField) // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
{
$sEditObjectValue = '';
if ($oManufacturer and $oManufacturer->getId()) {
$sEditObjectValue = $this->_processEditValue($oManufacturer->getFieldData(Constants::D3_OXMANUFACTURERS_LONGDESC_FIELDNAME));
}
return $sEditObjectValue;
}
/** /**
* @return string * @return string
*/ */
public function d3GetLongdescParamValue(Manufacturer $oManufacturer): string public function d3GetLongdescParamValue(): string
{ {
return (string) Registry::getRequest()->getRequestEscapedParameter("editval")['oxmanufacturers__d3description']; return (string) $aParams = Registry::getRequest()->getRequestEscapedParameter("editval")['oxmanufacturers__d3description'];
} }
/** /**
@ -116,7 +134,7 @@ class ManufacturerInfoLongdesc extends AdminDetailsController
* *
* @return mixed * @return mixed
*/ */
protected function processLongDesc($sValue): mixed protected function _processLongDesc($sValue)
{ {
$aSearch = ['&amp;nbsp;', '&amp;', '&quot;', '&lang=', '<p>&nbsp;</p>', '<p>&nbsp; </p>']; $aSearch = ['&amp;nbsp;', '&amp;', '&quot;', '&lang=', '<p>&nbsp;</p>', '<p>&nbsp; </p>'];
$aReplace = ['&nbsp;', '&', '"', '&amp;lang=', '', '']; $aReplace = ['&nbsp;', '&', '"', '&amp;lang=', '', ''];

View File

@ -1,24 +0,0 @@
<?php
/**
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Max Buhe, Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
declare(strict_types=1);
// @codeCoverageIgnoreStart
$sLangName = "Deutsch";
$aLang = include __DIR__."/d3_manufacturerinformation_translations.php";
// @codeCoverageIgnoreEnd

View File

@ -1,26 +0,0 @@
<?php
/**
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Max Buhe, Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
declare(strict_types=1);
// @codeCoverageIgnoreStart
return [
'charset' => 'UTF-8',
'D3_MANUFACTURERINFO_TAB' => 'Hersteller',
];
// @codeCoverageIgnoreEnd

View File

@ -1,24 +0,0 @@
<?php
/**
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Max Buhe, Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
declare(strict_types=1);
// @codeCoverageIgnoreStart
$sLangName = "English";
$aLang = include __DIR__."/d3_manufacturerinformation_translations.php";
// @codeCoverageIgnoreEnd

View File

@ -1,26 +0,0 @@
<?php
/**
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Max Buhe, Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
declare(strict_types=1);
// @codeCoverageIgnoreStart
return [
'charset' => 'UTF-8',
'D3_MANUFACTURERINFO_TAB' => 'Manufacturer',
];
// @codeCoverageIgnoreEnd

View File

@ -20,8 +20,7 @@ $sLangName = "Deutsch";
$aLang = [ $aLang = [
'charset' => 'UTF-8', 'charset' => 'UTF-8',
'mxd3manufacturerinfolongdesc' => 'Text', 'mxd3manufacturerinfolongdesc' => 'Langtext',
'SHOP_MODULE_GROUP_d3manufacturerinformation_main' => 'Settings', 'SHOP_MODULE_GROUP_d3manufacturerinformation_main' => 'Einstellungen',
'SHOP_MODULE_d3manufacturerinformation_showManufacturertextOnDetailsPage' => 'display existing manufacturer texts on item details as a tab', 'SHOP_MODULE_d3manufacturerinformation_showManufacturertextOnDetailsPage' => 'vorhandene Herstellertexte auf Artikeldetails als Tab anzeigen',
'SHOP_MODULE_d3manufacturerinformation_showManufacturertextOnManufacturerPage' => 'show manufacturer texts on manufacturer page',
]; ];

View File

@ -22,6 +22,5 @@ $aLang = [
'mxd3manufacturerinfolongdesc' => 'Text', 'mxd3manufacturerinfolongdesc' => 'Text',
'SHOP_MODULE_GROUP_d3manufacturerinformation_main' => 'Settings', 'SHOP_MODULE_GROUP_d3manufacturerinformation_main' => 'Settings',
'SHOP_MODULE_d3manufacturerinformation_showManufacturertextOnDetailsPage' => 'show existing manufacturer texts on item details page as a tab', 'SHOP_MODULE_d3manufacturerinformation_showManufacturertextOnDetailsPage' => 'display existing manufacturer texts on item details as a tab',
'SHOP_MODULE_d3manufacturerinformation_showManufacturertextOnManufacturerPage' => 'show manufacturer texts on manufacturer page',
]; ];

View File

@ -25,7 +25,7 @@
<input type="hidden" name="editlanguage" value="[{$editlanguage}]"> <input type="hidden" name="editlanguage" value="[{$editlanguage}]">
</form> </form>
<form name="myedit" id="myedit" action="[{$oViewConf->getSelfLink()}]" method="post" onSubmit="copyLongDesc( 'oxmanufacturers__d3description' );" style="padding: 0px;margin: 0px;height:0px;"> <form name="myedit" id="myedit" action="[{$oViewConf->getSelfLink()}]" method="post" onSubmit="copyLongDesc( 'oxmanufacturers__d3description' );" style="padding: 0;margin: 0;height:0;">
[{$oViewConf->getHiddenSid()}] [{$oViewConf->getHiddenSid()}]
<input type="hidden" name="cl" value="d3manufacturerinfolongdesc"> <input type="hidden" name="cl" value="d3manufacturerinfolongdesc">
<input type="hidden" name="fnc" value=""> <input type="hidden" name="fnc" value="">

View File

@ -1,27 +0,0 @@
<?php
/**
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Max Buhe, Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
$sLangName = "Deutsch";
// -------------------------------
// RESOURCE IDENTITFIER = STRING
// -------------------------------
$aLang = [
'charset' => 'UTF-8',
'mxd3manufacturerinfolongdesc' => 'Langtext',
'SHOP_MODULE_GROUP_d3manufacturerinformation_main' => 'Einstellungen',
'SHOP_MODULE_d3manufacturerinformation_showManufacturertextOnDetailsPage' => 'vorhandene Herstellertexte auf Artikeldetails als Tab anzeigen',
'SHOP_MODULE_d3manufacturerinformation_showManufacturertextOnManufacturerPage' => 'Herstellertexte auf Herstellerseite anzeigen',
];

View File

@ -1,27 +0,0 @@
<?php
/**
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Max Buhe, Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
$sLangName = "Deutsch";
// -------------------------------
// RESOURCE IDENTITFIER = STRING
// -------------------------------
$aLang = [
'charset' => 'UTF-8',
'mxd3manufacturerinfolongdesc' => 'Langtext',
'SHOP_MODULE_GROUP_d3manufacturerinformation_main' => 'Einstellungen',
'SHOP_MODULE_d3manufacturerinformation_showManufacturertextOnDetailsPage' => 'vorhandene Herstellertexte auf Artikeldetails als Tab anzeigen',
'SHOP_MODULE_d3manufacturerinformation_showManufacturertextOnManufacturerPage' => 'Herstellertexte auf Herstellerseite anzeigen',
];

View File

@ -1,20 +1,16 @@
[{$smarty.block.parent}] [{$smarty.block.parent}]
[{assign var="registry" value="\OxidEsales\Eshop\Core\Registry"|@oxNew}] [{assign var="oConfig" value=$oViewConf->getConfig()}]
[{assign var="oConfig" value=$registry->getConfig()}]
[{assign var="oManufacturer" value=$oView->getManufacturer()}] [{assign var="oManufacturer" value=$oView->getManufacturer()}]
[{assign var="sShopURL" value=$oConfig->getConfigParam('sShopURL')}]
[{assign var="description" value=$oManufacturer->d3GetLongdesc()}]
[{if $oManufacturer && $oManufacturer->getId()}] [{if $oManufacturer && $oConfig->getConfigParam('d3manufacturerinformation_showManufacturertextOnDetailsPage') && $description->rawValue|strip_tags|trim}]
[{assign var="sShopURL" value=$oConfig->getConfigParam('sShopURL')}] [{capture append="tabs"}]<a href="#manufacturertab" data-toggle="tab">[{oxmultilang ident="MANUFACTURER"}]</a>[{/capture}]
[{assign var="description" value=$oManufacturer->d3GetLongdesc()}]
[{if $oConfig->d3GetBoolModuleSettingByName('_showManufacturertextOnDetailsPage') && $description|strip_tags|trim}]
[{capture append="tabs"}]<a href="#manufacturertab" class="nav-link[{if $blFirstTab}] active[{/if}]" data-toggle="tab">[{oxmultilang ident="D3_MANUFACTURERINFO_TAB"}]</a>[{/capture}]
[{capture append="tabsContent"}] [{capture append="tabsContent"}]
<div id="manufacturertab" class="tab-pane[{if $blFirstTab}] active[{/if}]"> <div id="manufacturertab" class="tab-pane[{if $blFirstTab}] active[{/if}]">
[{oxeval var=$description}] [{oxeval var=$description}]
</div> </div>
[{assign var="blFirstTab" value=false}] [{assign var="blFirstTab" value=false}]
[{/capture}] [{/capture}]
[{/if}]
[{/if}] [{/if}]

View File

@ -4,61 +4,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [unreleased](https://git.d3data.de/D3Private/manufacturer-information/compare/2.1.0.0...rel_2.x) ## [unreleased](https://git.d3data.de/D3Public/MyModule/compare/1.1.2.0...rel_1.1.x)
## [2.0.3.0](https://git.d3data.de/D3Private/manufacturer-information/compare/2.0.2.0...2.0.3.0) - 2024-12-19 ## [1.1.1.0](https://git.d3data.de/D3Public/MyModule/compare/1.1.1.0...1.1.2.0) - 2024-11-19
### Added
- Dynamic Template Renderer Support
- Support for OXID 7.2
## [2.0.2.0](https://git.d3data.de/D3Private/manufacturer-information/compare/2.0.1.0...2.0.2.0) - 2024-11-22
### Fixed
- template code
- module image file
### Added
- Config method and extension
- missing twig translation
## [2.0.1.0](https://git.d3data.de/D3Private/manufacturer-information/compare/2.0.0.0...2.0.1.0) - 2024-11-20
### Fixed
- show hidden save button
- installation instructions
- show manufacturer link on article details page, if manufacturer hasn't an icon
- prevent encoding HTML entities
### Added
- display manufacturer content as additional tab on article details page
- make displaying manufacturer tab on details page configurable
- hide empty HTML elements content
## [2.0.0.0](https://git.d3data.de/D3Private/manufacturer-information/compare/1.1.2.1...2.0.0.0) - 2024-11-16
### Added
- installability OXID 7.0 - 7.1
## [1.1.2.1](https://git.d3data.de/D3Private/manufacturer-information/compare/1.1.2.0...1.1.2.1) - 2024-11-21
### Fixed
- show hidden save button
- installation instructions
- show manufacturer link on article details page, if manufacturer hasn't an icon
- prevent encoding HTML entities
### Added
- display manufacturer content as additional tab on article details page
- make displaying manufacturer tab on details page configurable
- hide empty HTML elements content
## [2.0.0.0](https://git.d3data.de/D3Public/MyModule/compare/1.0.0.0...1.1.0.0) - 2024-11-16
### Added
- installability OXID 7.0 - 7.1
## [1.1.2.0](https://git.d3data.de/D3Private/manufacturer-information/compare/1.1.1.0...1.1.2.0) - 2024-11-19
### Fixed ### Fixed
- show hidden save button - show hidden save button
### Added ### Added
- hide empty HTML elements content - hide empty HTML elements content
## [1.1.1.0](https://git.d3data.de/D3Private/manufacturer-information/compare/1.1.0.0...1.1.1.0) - 2024-11-18 ## [1.1.1.0](https://git.d3data.de/D3Public/MyModule/compare/1.1.0.0...1.1.1.0) - 2024-11-18
### Fixed ### Fixed
- installation instructions - installation instructions
- show manufacturer link on article details page, if manufacturer hasn't an icon - show manufacturer link on article details page, if manufacturer hasn't an icon
@ -68,9 +23,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- display manufacturer content as additional tab on article details page - display manufacturer content as additional tab on article details page
- make displaying manufacturer tab on details page configurable - make displaying manufacturer tab on details page configurable
## [1.1.0.0](https://git.d3data.de/D3Private/manufacturer-information/compare/1.0.0.0...1.1.0.0) - 2024-11-13 ## [1.1.0.0](https://git.d3data.de/D3Public/MyModule/compare/1.0.0.0...1.1.0.0) - 2024-11-13
### Added ### Added
- installability OXID 6.2.3 - 6.5.x - installability OXID 6.2.3 - 6.5.x
## [1.0.0.0](https://git.d3data.de/D3Private/manufacturer-information/releases/tag/1.0.0.0) - 2024-11-13 ## [1.0.0.0](https://git.d3data.de/D3Public/MyModule/releases/tag/1.0.0.0) - 2024-11-13
- initial release - initial release

View File

@ -16,22 +16,8 @@
namespace D3\ManufacturerInformation\Modules\Application\Model{ namespace D3\ManufacturerInformation\Modules\Application\Model{
use OxidEsales\Eshop\Application\Model\Manufacturer; use OxidEsales\Eshop\Application\Model\Manufacturer;
use OxidEsales\Eshop\Application\Model\ManufacturerList;
class D3ManufacturerLongDesc_parent extends Manufacturer class D3ManufacturerLongDesc_parent extends Manufacturer
{ {
} }
class ManufacturerInfoList_parent extends ManufacturerList
{
}
}
namespace D3\ManufacturerInformation\Modules\Core{
use OxidEsales\Eshop\Core\Config;
class ManufacturerConfig_parent extends Config
{
}
} }

View File

@ -18,6 +18,7 @@ declare(strict_types=1);
namespace D3\ManufacturerInformation\Modules\Application\Model; namespace D3\ManufacturerInformation\Modules\Application\Model;
use D3\ManufacturerInformation\Application\Model\Constants; use D3\ManufacturerInformation\Application\Model\Constants;
use OxidEsales\Eshop\Application\Model\Manufacturer;
use OxidEsales\Eshop\Core\Field; use OxidEsales\Eshop\Core\Field;
use OxidEsales\Eshop\Core\Registry; use OxidEsales\Eshop\Core\Registry;
@ -25,7 +26,7 @@ class D3ManufacturerLongDesc extends D3ManufacturerLongDesc_parent
{ {
/** /**
* @param string $sValue * @param string $sValue
* @return bool * @return void
*/ */
public function d3SetLongdesc(string $sValue): bool public function d3SetLongdesc(string $sValue): bool
{ {
@ -42,20 +43,11 @@ class D3ManufacturerLongDesc extends D3ManufacturerLongDesc_parent
} }
/** /**
* @return field * @return Field
*/ */
public function d3GetLongdesc(): field public function d3GetLongdesc(): Field
{ {
$longName = $this->getFieldLongName(Constants::D3_OXMANUFACTURERS_LONGDESC_FIELDNAME); $longName = $this->getCoreTableName().'__'.strtolower(Constants::D3_OXMANUFACTURERS_LONGDESC_FIELDNAME);
return $this->$longName ?: oxNew(Field::class); return $this->$longName;
} }
/**
* @return string
*/
public function getD3LongDescTableColumnName(): string
{
return $this->getViewName(true).'__'.Constants::D3_OXMANUFACTURERS_LONGDESC_FIELDNAME;
}
} }

View File

@ -17,15 +17,10 @@ declare(strict_types=1);
namespace D3\ManufacturerInformation\Modules\Application\Model; namespace D3\ManufacturerInformation\Modules\Application\Model;
use D3\ManufacturerInformation\Application\Model\Constants;
use OxidEsales\Eshop\Application\Model\Manufacturer; use OxidEsales\Eshop\Application\Model\Manufacturer;
use OxidEsales\Eshop\Application\Model\ManufacturerList;
use OxidEsales\Eshop\Core\Field; use OxidEsales\Eshop\Core\Field;
use OxidEsales\Eshop\Core\Registry;
use OxidEsales\Eshop\Core\UtilsView;
use OxidEsales\EshopCommunity\Internal\Container\ContainerFactory;
use OxidEsales\EshopCommunity\Internal\Framework\Module\Facade\ModuleSettingService;
use OxidEsales\EshopCommunity\Internal\Framework\Module\Facade\ModuleSettingServiceInterface;
use OxidEsales\EshopCommunity\Internal\Framework\Templating\TemplateRendererBridgeInterface;
use OxidEsales\EshopCommunity\Internal\Framework\Templating\TemplateRendererInterface;
class ManufacturerInfoList extends ManufacturerInfoList_parent class ManufacturerInfoList extends ManufacturerInfoList_parent
{ {
@ -33,33 +28,10 @@ class ManufacturerInfoList extends ManufacturerInfoList_parent
* @param Manufacturer|D3ManufacturerLongDesc $oManufacturer * @param Manufacturer|D3ManufacturerLongDesc $oManufacturer
* @return void * @return void
*/ */
protected function addCategoryFields($oManufacturer): void protected function _addCategoryFields($oManufacturer)
{ {
parent::addCategoryFields($oManufacturer); parent::_addCategoryFields($oManufacturer);
/** @var ModuleSettingService $setting */ $oManufacturer->oxcategories__oxlongdesc = new Field($oManufacturer->getFieldData(Constants::D3_OXMANUFACTURERS_LONGDESC_FIELDNAME), Field::T_RAW);
$setting = ContainerFactory::getInstance()->getContainer()->get(ModuleSettingServiceInterface::class);
if ($setting->getBoolean('d3manufacturerinformation_showManufacturertextOnManufacturerPage', 'd3manufacturerinformation')) {
/** @var UtilsView $oUtilsView */
$oUtilsView = Registry::getUtilsView();
$longdesc = $oManufacturer->d3GetLongdesc( )->getRawValue() ?? '';
$deactivateSmarty = Registry::getConfig()->getConfigParam('deactivateSmartyForCmsContent');
$processLongDescriptions = Registry::getConfig()->getConfigParam('bl_perfParseLongDescinSmarty');
if (!$deactivateSmarty && $processLongDescriptions) {
$longdesc = $this->getRenderer()->renderFragment(
$longdesc,
$oManufacturer->getId() . $oManufacturer->getLanguage(),
[],
true
) ?? '';
}
$oManufacturer->oxcategories__oxlongdesc = new Field(html_entity_decode($longdesc), Field::T_RAW);
}
}
private function getRenderer(): TemplateRendererInterface
{
return $this->getContainer()->get(TemplateRendererBridgeInterface::class)->getTemplateRenderer();
} }
} }

View File

@ -1,36 +0,0 @@
<?php
/**
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Max Buhe, Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
declare(strict_types=1);
namespace D3\ManufacturerInformation\Modules\Core;
use D3\ManufacturerInformation\Application\Model\Constants;
use OxidEsales\EshopCommunity\Core\Di\ContainerFacade;
use OxidEsales\EshopCommunity\Internal\Framework\Module\Facade\ModuleSettingServiceInterface;
class ManufacturerConfig extends ManufacturerConfig_parent
{
/**
* @param string $sName
* @return bool
*/
public function d3GetBoolModuleSettingByName(string $sName): bool
{
$moduleSettingService = ContainerFacade::get(ModuleSettingServiceInterface::class);
return $moduleSettingService->getBoolean(Constants::OXID_MODULE_ID.$sName, Constants::OXID_MODULE_ID);
}
}

View File

@ -17,8 +17,7 @@ Dieses Paket erfordert einen mit Composer installierten OXID eShop in einer in d
```bash ```bash
composer config repositories.d3manufacturerinformation vcs https://git.d3data.de/D3Public/manufacturer-information.git composer require d3/manufacturerinformation:"~1.1.0"
composer require d3/manufacturerinformation:"~2.0.0"
``` ```
Sofern nötig, bestätigen Sie bitte, dass Sie `package-name` erlauben, Code auszuführen. Sofern nötig, bestätigen Sie bitte, dass Sie `package-name` erlauben, Code auszuführen.
@ -26,9 +25,9 @@ Sofern nötig, bestätigen Sie bitte, dass Sie `package-name` erlauben, Code aus
```bash ```bash
./vendor/bin/oe-eshop-db_migrate migrations:migrate d3manufacturerinformation ./vendor/bin/oe-eshop-db_migrate migrations:migrate d3manufacturerinformation
./vendor/bin/oe-console oe:module:install source/modules/d3/manufacturerinformation ./vendor/bin/oe-console o:m:i source/modules/d3/manufacturerinformation
./vendor/bin/oe-console oe:module:deactivate d3manufacturerinformation ./vendor/bin/oe-console o:m:deact d3manufacturerinformation
./vendor/bin/oe-console oe:module:activate d3manufacturerinformation ./vendor/bin/oe-console o:m:act d3manufacturerinformation
./vendor/bin/oe-eshop-db_views_generate ./vendor/bin/oe-eshop-db_views_generate
``` ```
@ -37,7 +36,7 @@ Leeren Sie anschlieĂźend den Temp Ordner des Shops.
## Lizenz ## Lizenz
(Stand: 19.12.2024) (Stand: 13.11.2024)
``` ```
Copyright (c) D3 Data Development (Inh. Thomas Dartsch) Copyright (c) D3 Data Development (Inh. Thomas Dartsch)

View File

@ -1,192 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
x="0px"
y="0px"
width="201px"
height="124px"
viewBox="-25.453 -14.933 201 124"
enable-background="new -25.453 -14.933 201 124"
xml:space="preserve"
id="svg937"
sodipodi:docname="picture.svg"
inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"><metadata
id="metadata941"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1848"
inkscape:window-height="1016"
id="namedview939"
showgrid="false"
inkscape:zoom="4.3299648"
inkscape:cx="100.26905"
inkscape:cy="55.441687"
inkscape:window-x="72"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="svg937" />
<defs
id="defs815">
</defs>
<linearGradient
id="SVGID_1_"
gradientUnits="userSpaceOnUse"
x1="13.207"
y1="16.7153"
x2="13.207"
y2="29.6128"
gradientTransform="matrix(1 0 0 -1 8.3999 69.2939)">
<stop
offset="0.0056"
style="stop-color:#3266A9"
id="stop817" />
<stop
offset="1"
style="stop-color:#0099FF"
id="stop819" />
</linearGradient>
<path
fill="url(#SVGID_1_)"
d="M24.829,40.569c-0.784-0.592-2.104-0.888-3.961-0.888h-1.376l-2.283,12.897h1.779 c3.76,0,6.032-2.244,6.815-6.733c0.134-0.871,0.202-1.642,0.202-2.313C26.004,42.148,25.611,41.16,24.829,40.569z"
id="path822" />
<linearGradient
id="SVGID_2_"
gradientUnits="userSpaceOnUse"
x1="32.1064"
y1="35.123"
x2="32.1064"
y2="47.2842"
gradientTransform="matrix(1 0 0 -1 8.3999 69.2939)">
<stop
offset="0.0056"
style="stop-color:#3266A9"
id="stop824" />
<stop
offset="1"
style="stop-color:#0099FF"
id="stop826" />
</linearGradient>
<path
fill="url(#SVGID_2_)"
d="M40.267,25.549c1.074,0,1.611,0.381,1.611,1.143c0,0.701-0.321,1.201-0.962,1.5 c-0.209,0.119-0.366,0.194-0.471,0.224c-0.065,0.019-0.158,0.037-0.271,0.056c1.98,1.621,3.702,3.544,5.097,5.699 c0.117-0.321,0.21-0.658,0.277-1.013l0.09-1.008c0-1.223-0.568-2.081-1.701-2.574c0.776-0.402,1.376-0.94,1.801-1.611 c0.425-0.672,0.638-1.418,0.638-2.239c0-0.642-0.198-1.265-0.593-1.868c-0.396-0.605-0.98-1.049-1.757-1.333 c-0.433-0.193-0.876-0.328-1.332-0.402c-0.456-0.075-1.003-0.113-1.645-0.113c-0.82,0-1.663,0.124-2.529,0.37 c-0.865,0.246-1.6,0.563-2.204,0.952c-0.604,0.389-1.13,0.907-1.578,1.557c-0.036,0.052-0.066,0.109-0.101,0.163 c1.196,0.534,2.341,1.163,3.426,1.874C38.494,26.01,39.227,25.549,40.267,25.549z"
id="path829" />
<linearGradient
id="SVGID_3_"
gradientUnits="userSpaceOnUse"
x1="16.2036"
y1="-2.8335"
x2="16.2036"
y2="46.3721"
gradientTransform="matrix(1 0 0 -1 8.3999 69.2939)">
<stop
offset="0.0056"
style="stop-color:#3266A9"
id="stop831" />
<stop
offset="1"
style="stop-color:#0099FF"
id="stop833" />
</linearGradient>
<path
fill="url(#SVGID_3_)"
d="M45.272,34.171c-0.433,1.189-1.208,2.147-2.331,2.871c-1.425,0.918-3.182,1.377-5.271,1.377 c-1.179,0-2.175-0.176-2.988-0.525c-0.813-0.35-1.444-0.864-1.891-1.543c-0.448-0.678-0.671-1.481-0.671-2.405l0.022-0.694 l0.156-0.693h4.367l-0.028,0.179v0.179v0.246c0,1.164,0.628,1.746,1.884,1.746c0.635,0,1.201-0.217,1.696-0.649 c0.495-0.434,0.742-0.94,0.742-1.522c0-0.522-0.194-0.887-0.582-1.097c-0.329-0.208-1.007-0.313-2.036-0.313l0.47-2.754l1.141-0.067 c0.083-0.011,0.154-0.022,0.221-0.033c-0.674-0.551-1.378-1.067-2.11-1.546c-0.044,0.096-0.087,0.195-0.125,0.302h-4.185 c0.192-0.837,0.49-1.56,0.884-2.175c-3.064-1.372-6.46-2.133-10.034-2.133C11.015,22.922,0,33.936,0,47.523 c0,13.59,11.015,24.604,24.603,24.604c13.588,0,24.604-11.018,24.604-24.607C49.207,42.599,47.761,38.016,45.272,34.171z M33.96,44.3l-0.168,1.275c-0.538,2.953-1.511,5.404-2.921,7.35c-1.298,1.836-3.016,3.18-5.153,4.028 c-2.138,0.851-4.494,1.274-7.067,1.274H8.278l4.264-24.198h10.441c1.141,0,2.204,0.073,3.189,0.218 c0.984,0.146,1.868,0.364,2.651,0.655c1.611,0.537,2.887,1.471,3.827,2.802c0.94,1.332,1.41,2.992,1.41,4.984L33.96,44.3z"
id="path836" />
<linearGradient
id="SVGID_4_"
gradientUnits="userSpaceOnUse"
x1="73.4502"
y1="-21.6289"
x2="59.2201"
y2="68.2165"
gradientTransform="matrix(1 0 0 -1 8.3999 69.2939)">
<stop
offset="0"
style="stop-color:#B2B2B2;stop-opacity:0"
id="stop838" />
<stop
offset="0.2"
style="stop-color:#B2B2B2"
id="stop840" />
<stop
offset="0.8"
style="stop-color:#B2B2B2"
id="stop842" />
<stop
offset="1"
style="stop-color:#B2B2B2;stop-opacity:0"
id="stop844" />
</linearGradient>
<rect
x="74.422"
fill="url(#SVGID_4_)"
width="0.625"
height="92"
id="rect847" />
<g
style="clip-rule:evenodd;fill-rule:evenodd;image-rendering:optimizeQuality;shape-rendering:geometricPrecision;text-rendering:geometricPrecision"
id="g1654"
transform="matrix(0.10671339,0,0,0.10671339,102.89032,19.747305)"><path
id="path1643"
d="m 324.87,279.77 c 32.01,0 61.01,13.01 82.03,34.02 21.09,21 34.1,50.05 34.1,82.1 0,32.06 -13.01,61.11 -34.02,82.11 l -1.32,1.22 c -20.92,20.29 -49.41,32.8 -80.79,32.8 -32.06,0 -61.1,-13.01 -82.1,-34.02 -21.01,-21 -34.02,-50.05 -34.02,-82.11 0,-32.06 13.01,-61.1 34.02,-82.1 21,-21.01 50.04,-34.02 82.1,-34.02 z M 243.11,38.08 v 54.18 c 0.99,12.93 5.5,23.09 13.42,29.85 8.2,7.01 20.46,10.94 36.69,11.23 l 37.92,-0.04 z m 91.21,120.49 -41.3,-0.04 c -22.49,-0.35 -40.21,-6.4 -52.9,-17.24 -13.23,-11.31 -20.68,-27.35 -22.19,-47.23 l -0.11,-1.74 V 25.29 H 62.87 c -10.34,0 -19.75,4.23 -26.55,11.03 -6.8,6.8 -11.03,16.21 -11.03,26.55 v 336.49 c 0,10.3 4.25,19.71 11.06,26.52 6.8,6.8 16.22,11.05 26.52,11.05 h 119.41 c 2.54,8.79 5.87,17.25 9.92,25.29 H 62.87 c -17.28,0 -33.02,-7.08 -44.41,-18.46 C 7.08,432.37 0,416.64 0,399.36 V 62.87 C 0,45.61 7.08,29.89 18.45,18.51 29.89,7.08 45.61,0 62.87,0 h 173.88 c 4.11,0 7.76,1.96 10.07,5 l 109.39,118.34 c 2.24,2.43 3.34,5.49 3.34,8.55 l 0.03,119.72 c -8.18,-1.97 -16.62,-3.25 -25.26,-3.79 z m -229.76,54.49 c -6.98,0 -12.64,-5.66 -12.64,-12.64 0,-6.99 5.66,-12.65 12.64,-12.65 h 150.49 c 6.98,0 12.65,5.66 12.65,12.65 0,6.98 -5.67,12.64 -12.65,12.64 z m 0,72.3 c -6.98,0 -12.64,-5.66 -12.64,-12.65 0,-6.98 5.66,-12.64 12.64,-12.64 h 142.52 c 3.71,0 7.05,1.6 9.37,4.15 a 149.03,149.03 0 0 0 -30.54,21.14 z m 0,72.3 c -6.98,0 -12.64,-5.66 -12.64,-12.65 0,-6.98 5.66,-12.64 12.64,-12.64 h 86.2 c -3.82,8.05 -6.95,16.51 -9.29,25.29 z m 239.61,-18.85 c 7.41,7.43 4.68,18.9 -3.05,25.23 -7.46,6.01 -20.97,8.92 -28.68,1.83 -7.77,-7.23 -4.68,-18.87 2.76,-25.24 7.18,-6.05 21.39,-9.37 28.97,-1.82 z m -43.88,95 h 6.34 V 392.48 H 294.6 c 0,-16.37 30.05,-5.74 52.18,-11.32 v 52.65 h 8.37 v 17.58 h -54.86 z"
inkscape:connector-curvature="0" /></g></svg>

Before

Width:  |  Height:  |  Size: 7.3 KiB

View File

@ -6,9 +6,7 @@
"oxid", "oxid",
"modules", "modules",
"eShop", "eShop",
"d3", "d3"
"manufacturer",
"information"
], ],
"authors": [ "authors": [
{ {
@ -26,21 +24,30 @@
"proprietary" "proprietary"
], ],
"require": { "require": {
"php": "^8.0", "php": "~7.1 || ~8.0",
"oxid-esales/oxideshop-ce": "7.0 - 7.2" "oxid-esales/oxideshop-ce": "v6.6.0 - v6.14.3"
}, },
"require-dev": { "require-dev": {
"friendsofphp/php-cs-fixer": "^3.9", "oxid-esales/oxideshop-ce": "~6.14.0",
"phpunit/phpunit": "^9.1.1" "friendsofphp/php-cs-fixer": "^3.9"
},
"extra": {
"oxideshop": {
"blacklist-filter": [
"*.md",
"composer.json",
".php-cs-fixer.php",
"*.neon"
],
"target-directory": "d3/manufacturerinformation"
}
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"D3\\ManufacturerInformation\\": "" "D3\\ManufacturerInformation\\": "../../../source/modules/d3/manufacturerinformation"
} }
}, },
"scripts": { "scripts": {
"phpunit": "XDEBUG_MODE=coverage ./vendor/bin/phpunit --config=vendor/d3/manufacturerinformation/Tests/ --no-coverage",
"phpunit-coverage": "XDEBUG_MODE=coverage ./vendor/bin/phpunit --config=vendor/d3/manufacturerinformation/Tests/ --coverage-html=vendor/d3/manufacturerinformation/tests/result/coverage",
"php-cs-fixer_audit": "./vendor/bin/php-cs-fixer list-files --config=./vendor/d3/manufacturerinformation/.php-cs-fixer.php", "php-cs-fixer_audit": "./vendor/bin/php-cs-fixer list-files --config=./vendor/d3/manufacturerinformation/.php-cs-fixer.php",
"php-cs-fixer_fix": "./vendor/bin/php-cs-fixer fix --config=./vendor/d3/manufacturerinformation/.php-cs-fixer.php" "php-cs-fixer_fix": "./vendor/bin/php-cs-fixer fix --config=./vendor/d3/manufacturerinformation/.php-cs-fixer.php"
} }

BIN
image-file.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -19,29 +19,27 @@ use D3\ManufacturerInformation\Application\Controller\Admin\ManufacturerInfoLong
use D3\ManufacturerInformation\Application\Model\Constants; use D3\ManufacturerInformation\Application\Model\Constants;
use D3\ManufacturerInformation\Modules\Application\Model\D3ManufacturerLongDesc; use D3\ManufacturerInformation\Modules\Application\Model\D3ManufacturerLongDesc;
use D3\ManufacturerInformation\Modules\Application\Model\ManufacturerInfoList; use D3\ManufacturerInformation\Modules\Application\Model\ManufacturerInfoList;
use D3\ManufacturerInformation\Modules\Core\ManufacturerConfig;
use OxidEsales\Eshop\Application\Model\Manufacturer as OEManufacturer; use OxidEsales\Eshop\Application\Model\Manufacturer as OEManufacturer;
use OxidEsales\Eshop\Application\Model\ManufacturerList as OEManufacturerList; use OxidEsales\Eshop\Application\Model\ManufacturerList as OEManufacturerList;
use OxidEsales\Eshop\Core\Config as OEConfig;
$sMetadataVersion = '2.1'; $sMetadataVersion = '2.1';
$sModuleId = Constants::OXID_MODULE_ID; $sModuleId = Constants::OXID_MODULE_ID;
$logo = '<img src="https://logos.oxidmodule.com/d3logo.svg" alt="(D3)" style="height:1em;width:1em">';
/** /**
* Module information * Module information
*/ */
$aModule = [ $aModule = [
'id' => $sModuleId, 'id' => $sModuleId,
'title' => [ 'title' => $logo.' Herstellerinformationen',
'de' => '(D3) Herstellerinformationen',
'en' => '(D3) Manufacturer information',
],
'description' => [ 'description' => [
'de' => 'fĂĽgt Informationen der Hersteller zur Artikelliste hinzu', 'de' => 'fĂĽgt Informationen der Hersteller zur Artikelliste hinzu',
'en' => 'adds manufacturer information to the article list', 'en' => 'adds manufacturer information to the article list',
], ],
'thumbnail' => 'picture.svg', 'thumbnail' => 'image-file.png',
'version' => '2.0.3.0', 'version' => '1.1.2.0',
'author' => '(D3) Data Development (Inh.: Thomas Dartsch)', 'author' => $logo.' Data Development (Inh.: Thomas Dartsch)',
'email' => 'support@shopmodule.com', 'email' => 'support@shopmodule.com',
'url' => 'https://www.oxidmodule.com/', 'url' => 'https://www.oxidmodule.com/',
'controllers' => [ 'controllers' => [
@ -50,10 +48,9 @@ $aModule = [
'extend' => [ 'extend' => [
OEManufacturer::class => D3ManufacturerLongDesc::class, OEManufacturer::class => D3ManufacturerLongDesc::class,
OEManufacturerList::class => ManufacturerInfoList::class, OEManufacturerList::class => ManufacturerInfoList::class,
OEConfig::class => ManufacturerConfig::class,
], ],
'templates' => [ 'templates' => [
'@' . Constants::OXID_MODULE_ID . '/admin/d3manufacturerlongdesc.tpl' => 'views/smarty/admin/d3manufacturerlongdesc.tpl', 'd3manufacturerlongdesc.tpl' => 'd3/manufacturerinformation/Application/views/admin/tpl/d3manufacturer_longdesc.tpl',
], ],
'settings' => [ 'settings' => [
[ [
@ -62,12 +59,6 @@ $aModule = [
'type' => 'bool', 'type' => 'bool',
'value' => true, 'value' => true,
], ],
[
'group' => $sModuleId.'_main',
'name' => $sModuleId.'_showManufacturertextOnManufacturerPage',
'type' => 'bool',
'value' => true,
],
], ],
'blocks' => [ 'blocks' => [
[ [

View File

@ -1,4 +1,4 @@
table_storage: name: D3 manufacturerinformation
table_name: d3migrations_manufacturerinformation migrations_namespace: D3\ManufacturerInformation\Migrations
migrations_paths: table_name: d3migrations_manufacturerinformation
'D3\ManufacturerInformation\Migrations': data migrations_directory: data

View File

@ -1,41 +0,0 @@
{% include "headitem.html.twig" with {title: "GENERAL_ADMIN_TITLE"|translate} %}
<script type="text/javascript">
function loadLang(obj)
{
var langvar = document.getElementById("catlang");
if (langvar != null )
langvar.value = obj.value;
document.myedit.submit();
}
</script>
{% if readonly %}
{% set readonly = "readonly disabled" %}
{% else %}
{% set readonly = "" %}
{% endif %}
<form name="transfer" id="transfer" action="{{ oViewConf.getSelfLink() }}" method="post">
{{ oViewConf.getHiddenSid()|raw }}
<input type="hidden" name="oxid" value="{{ oxid }}">
<input type="hidden" name="cl" value="d3manufacturerinfolongdesc">
<input type="hidden" name="editlanguage" value="{{ editlanguage }}">
</form>
<form name="myedit" id="myedit" action="{{ oViewConf.getSelfLink() }}" method="post" onSubmit="copyLongDesc( 'oxmanufacturers__d3description' );" style="padding: 0px;margin: 0px;height:0px;">
{{ oViewConf.getHiddenSid()|raw }}
<input type="hidden" name="cl" value="d3manufacturerinfolongdesc">
<input type="hidden" name="fnc" value="">
<input type="hidden" name="oxid" value="{{ oxid }}">
<input type="hidden" name="voxid" value="{{ oxid }}">
<input type="hidden" name="editval[oxmanufacturers__oxid]" value="{{ oxid }}">
<input type="hidden" name="catlang" value="{{ catlang }}">
<input type="hidden" name="editval[oxmanufacturers__d3description]" value="">
{% include "include/category_text_editor.html.twig" %}
</form>
{% include "bottomnaviitem.html.twig" %}
{% include "bottomitem.html.twig" %}

View File

@ -1,20 +0,0 @@
{% extends "page/details/inc/accordeon.html.twig" %}
{% block details_longdescription %}
{{ parent() }}
{% set oManufacturer = oView.getManufacturer() %}
{% set sShopURL = config.getConfigParam('sShopURL') %}
{% set description = oManufacturer.d3GetLongdesc() %}
{% if oManufacturer and config.d3GetBoolModuleSettingByName('_showManufacturertextOnDetailsPage') and description|striptags|trim %}
<div class="col-12 col-md-6">
<div id="manufacturer-collapsible" class="h4" data-bs-target="#manufacturer" data-bs-toggle="collapse" role="button" aria-expanded="false" aria-controls="manufacturer">
{{ translate({ ident: "D3_MANUFACTURERINFO_TAB" }) }}
</div>
<div id="manufacturer" class="collapse" aria-labelledby="manufacturer-collapsible">
{{ include(template_from_string(description)) }}
</div>
</div>
{% endif %}
{% endblock %}

View File

@ -1,126 +0,0 @@
{% extends "page/list/list.html.twig" %}
{% block page_list_listhead %}
{% if listType=='manufacturer' or listType=='vendor'%}
<div class="bg-white list-header mb-4">
<div class="container-xxl">
<div class="row">
<div class="col-12{% if actCategory.getIconUrl() %} col-md-6 order-2 order-md-1 {% endif %}">
{% if showPopBreadcrump %}
<div class="row">
{% include "widget/breadcrumb.html.twig" %}
</div>
{% endif %}
<h1{% if actCategory.oxcategories__oxthumb.value and actCategory.getThumbUrl() %} class="text-white"{% endif %}>
{{ actCategory.getTitle() }}
</h1>
{% if actCategory and actCategory.getShortDescription() and oPageNavigation.actPage == 1 %}
<div id="catDescLocator" class="categoryDescription pb-5">
{{ actCategory.getShortDescription()|raw() }}
</div>
{% endif %}
{% if actCategory.oxcategories__oxlongdesc.value and oPageNavigation.actPage == 1 %}
{% block d3_page_list_long_desc %}
<div id="d3catLongDescLocator" class="categoryDescription">
{{ include(template_from_string(actCategory.oxcategories__oxlongdesc)) }}
</div>
{% endblock %}
{% endif %}
</div>
{% if actCategory.getIconUrl() %}
<div class="col-12 col-md-6 order-1 order-md-1 py-4">
<img src="{{ actCategory.getIconUrl()|raw }}" alt="{{ translate({ ident: "MANUFACTURER_IMAGE_ALT", args: actCategory.getTitle() }) }}">
</div>
{% endif %}
</div>
</div>
</div>
{% else %}
<div class="bg-white list-header mb-4">
<div class="container-xxl">
<div class="row">
<div class="col-12{% if actCategory.oxcategories__oxthumb.value and actCategory.getThumbUrl() %} col-md-6 order-2 order-md-1 {% endif %}">
{% if showPopBreadcrump %}
<div class="row">
{% include "widget/breadcrumb.html.twig" %}
</div>
{% endif %}
<h1 class="h2">
{{ oView.getTitle() }}
</h1>
{% if actCategory and actCategory.getShortDescription() and oPageNavigation.actPage == 1 %}
<div id="catDescLocator" class="categoryDescription pb-3">
{{ actCategory.getShortDescription()|raw() }}
</div>
{% endif %}
{% if actCategory.oxcategories__oxlongdesc.value and oPageNavigation.actPage == 1 %}
{% block page_list_long_desc %}
<div id="catLongDescLocator" class="categoryDescription">
{{ include(template_from_string(actCategory.oxcategories__oxlongdesc)) }}
</div>
{% endblock %}
{% endif %}
</div>
{% if actCategory.oxcategories__oxthumb.value and actCategory.getThumbUrl() %}
<div class="col-12 col-md-6 order-1 order-md-1 py-4 text-right">
<img src="{{ actCategory.getThumbUrl()|raw }}" alt="{{ translate({ ident: "CATEGORY_IMAGE_ALT", args: actCategory.oxcategories__oxtitle.value }) }}" class="w-100 img-fluid">
</div>
{% endif %}
</div>
</div>
</div>
{% endif %}
{% if oView.hasVisibleSubCats() %}
<div class="container-xxl">
{% set iSubCategoriesCount = 0 %}
<div class="cat-list mb-4 pb-3">
{% for category in oView.getSubCatList() %}
{% if category.getIsVisible() %}
{% set iSubCategoriesCount = iSubCategoriesCount+1 %}
{% set iconUrl = category.getIconUrl() %}
{% if listType=='manufacturer' or listType=='vendor' %}
{% set iconAltAttribute = translate({ ident: "MANUFACTURER_IMAGE_ALT", args: category.oxcategories__oxtitle.value }) %}
{% else %}
{% set iconAltAttribute = translate({ ident: "CATEGORY_IMAGE_ALT", args: category.oxcategories__oxtitle.value }) %}
{% endif %}
<a href="{{ category.getLink()|raw }}" class="cat-list-item">
{% if iconUrl %}
<img loading="lazy" src="{{ category.getIconUrl()|raw }}" alt="{{ iconAltAttribute }}" class="cat-list-item-img">
{% else %}
<img loading="lazy" src="{{ oViewConf.getImageUrl('subcat-placeholder.png')|raw }}" alt="{{ iconAltAttribute }}" class="cat-list-item-img">
{% endif %}
<span class="cat-list-item-name">
{{ category.oxcategories__oxtitle.value }}
{% if oView.showCategoryArticlesCount() and (category.getNrOfArticles() > 0) %}
<span class="text-muted">({{ category.getNrOfArticles() }})</span>
{% endif %}
</span>
</a>
{% endif %}
{% if category.getContentCats() %}
{% for ocont in category.getContentCats() %}
<a href="{{ ocont.getLink()|raw }}" class="cat-list-item">
{% if listType=='manufacturer' or listType=='vendor' %}
{% set iconAltAttribute = translate({ ident: "MANUFACTURER_IMAGE_ALT", args: category.oxcategories__oxtitle.value }) %}
{% else %}
{% set iconAltAttribute = translate({ ident: "CATEGORY_IMAGE_ALT", args: category.oxcategories__oxtitle.value }) %}
{% endif %}
<img loading="lazy" src="{{ oViewConf.getImageUrl('subcat-placeholder.png')|raw }}" alt="{{ iconAltAttribute }}" class="cat-list-item-img">
<span class="cat-list-item-name">
{{ ocont.oxcontents__oxtitle.value }}
</span>
</a>
{% endfor %}
{% endif %}
{% endfor %}
</div>
</div>
{% endif %}
{% endblock %}