Compare commits
73 Commits
Author | SHA1 | Date | |
---|---|---|---|
df236f4bfd | |||
2af2e3bbcc | |||
ba123ad789 | |||
889f721279 | |||
0f6c3c41af | |||
a4bd6d5bfd | |||
2b0a3dc2a1 | |||
47a0759ced | |||
2838ab70be | |||
3a34f0e5f5 | |||
07224f9530 | |||
b278f8a185 | |||
bb6b465445 | |||
6f7acce537 | |||
ed92b443f9 | |||
cb0bd3fc0b | |||
3d2cb0e94b | |||
99854e9409 | |||
a790ebcb07 | |||
ef5f4039d0 | |||
eb489933c9 | |||
ce4a96c279 | |||
beb67d992e | |||
13ee1b7340 | |||
8bbe6262af | |||
ca9f9141ce | |||
5a6f8a1577 | |||
fcecc396df | |||
dfdc0b1ecd | |||
7d5eeb59d2 | |||
bd9b8b6515 | |||
27cb316b74 | |||
c99a7bc93c | |||
d7865aebe4 | |||
febe1e7f8c | |||
45e719d9f3 | |||
d269745dac | |||
77cb1d4594 | |||
449f901976 | |||
8794a005d7 | |||
4c374ff39c | |||
8f046ed231 | |||
8d3421450b | |||
b46175f5ab | |||
99ea814987 | |||
38b12bc3c0 | |||
ebb9450812 | |||
64a70921c5 | |||
ab0ea6cea7 | |||
fe7f3aa621 | |||
2882aac57e | |||
8eaa97d889 | |||
2ef3223e86 | |||
58663d9918 | |||
b5b4268335 | |||
dfd4367066 | |||
e61438f937 | |||
1c2ee9f4f0 | |||
1dc39f4fdd | |||
c9ac21c4bb | |||
21e6d764cc | |||
bf30cf85dc | |||
56d8bbdd72 | |||
c215ef5eef | |||
ce264a357e | |||
75beb308d8 | |||
00a8017731 | |||
67f7bcb77f | |||
6e960b34b2 | |||
67240260b2 | |||
58ef4bb533 | |||
3e30e0491b | |||
a7dfae8c5d |
1
.noencode
Normal file
1
.noencode
Normal file
@ -0,0 +1 @@
|
|||||||
|
copyAsIsFiles=metadata.php, .php-cs-fixer.php, IntelliSenseHelper.php, migration, Application/views
|
34
.php-cs-fixer.php
Normal file
34
.php-cs-fixer.php
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$finder = PhpCsFixer\Finder::create()
|
||||||
|
->in(__DIR__)
|
||||||
|
;
|
||||||
|
|
||||||
|
$header = <<<EOF
|
||||||
|
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
|
||||||
|
EOF;
|
||||||
|
|
||||||
|
$config = new PhpCsFixer\Config();
|
||||||
|
return $config->setRules([
|
||||||
|
'@PHP80Migration' => true,
|
||||||
|
'@PSR12' => true,
|
||||||
|
'header_comment' => [
|
||||||
|
'comment_type' => 'PHPDoc',
|
||||||
|
'header' => $header,
|
||||||
|
'location' => 'after_open',
|
||||||
|
'separate' => 'both',
|
||||||
|
],
|
||||||
|
'php_unit_test_class_requires_covers' => true,
|
||||||
|
'doctrine_annotation_indentation' => true,
|
||||||
|
])
|
||||||
|
->setFinder($finder)
|
||||||
|
;
|
@ -1,131 +1,126 @@
|
|||||||
<?php
|
<?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);
|
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
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function render()
|
public function render()
|
||||||
{
|
{
|
||||||
parent::render();
|
parent::render();
|
||||||
|
|
||||||
$this->_aViewData['edit'] = $oManufacturer = oxNew(\OxidEsales\Eshop\Application\Model\Manufacturer::class);
|
/** @var Manufacturer|D3ManufacturerLongDesc $oManufacturer */
|
||||||
|
$this->_aViewData['edit'] = $oManufacturer = oxNew(Manufacturer::class);
|
||||||
$sOXID = $this->_aViewData["oxid"] = $this->getEditObjectId();
|
|
||||||
if (isset($sOXID) && $sOXID != "-1") {
|
$sOXID = $this->_aViewData["oxid"] = $this->getEditObjectId();
|
||||||
// load object
|
if (isset($sOXID) && $sOXID != "-1") {
|
||||||
$d3manufacturerlang = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("catlang");
|
// load object
|
||||||
|
$d3manufacturerlang = Registry::getRequest()->getRequestEscapedParameter("catlang");
|
||||||
if (!isset($d3manufacturerlang)) {
|
|
||||||
$d3manufacturerlang = $this->_iEditLang;
|
if (!isset($d3manufacturerlang)) {
|
||||||
}
|
$d3manufacturerlang = $this->_iEditLang;
|
||||||
|
}
|
||||||
$this->_aViewData["catlang"] = $d3manufacturerlang;
|
|
||||||
|
$this->_aViewData["catlang"] = $d3manufacturerlang;
|
||||||
$oManufacturer->loadInLang($d3manufacturerlang, $sOXID);
|
|
||||||
|
$oManufacturer->loadInLang($d3manufacturerlang, $sOXID);
|
||||||
//Disable editing for derived items
|
|
||||||
if ($oManufacturer->isDerived()) {
|
//Disable editing for derived items
|
||||||
$this->_aViewData['readonly'] = true;
|
if ($oManufacturer->isDerived()) {
|
||||||
}
|
$this->_aViewData['readonly'] = true;
|
||||||
|
}
|
||||||
foreach (\OxidEsales\Eshop\Core\Registry::getLang()->getLanguageNames() as $id => $language) {
|
|
||||||
$oLang = new \stdClass();
|
foreach (Registry::getLang()->getLanguageNames() as $id => $language) {
|
||||||
$oLang->sLangDesc = $language;
|
$oLang = new stdClass();
|
||||||
$oLang->selected = ($id == $this->_iEditLang);
|
$oLang->sLangDesc = $language;
|
||||||
$this->_aViewData["otherlang"][$id] = clone $oLang;
|
$oLang->selected = ($id == $this->_iEditLang);
|
||||||
}
|
$this->_aViewData["otherlang"][$id] = clone $oLang;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$this->_aViewData["editor"] = $this->generateTextEditor("100%", 280, $oManufacturer, "oxmanufacturers__D3DESCRIPTION", "list.tpl.css");
|
|
||||||
|
$this->_aViewData["editor"] = $this->generateTextEditor("100%", 280, $oManufacturer, $oManufacturer->getD3LongDescTableColumnName(), "list.css");
|
||||||
return "d3manufacturerlongdesc.tpl";
|
|
||||||
}
|
return "@d3manufacturerinformation/admin/d3manufacturerlongdesc";
|
||||||
|
}
|
||||||
/**
|
|
||||||
* @return void
|
/**
|
||||||
* @throws \Exception
|
* @return void
|
||||||
*/
|
* @throws Exception
|
||||||
public function save()
|
*/
|
||||||
{
|
public function save(): void
|
||||||
parent::save();
|
{
|
||||||
|
parent::save();
|
||||||
$iManufacturerLang = intval(\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("catlang"));
|
|
||||||
$sOXID = $this->getEditObjectId();
|
$iManufacturerLang = intval(Registry::getRequest()->getRequestEscapedParameter("catlang"));
|
||||||
$this->setEditObjectId($sOXID);
|
$sOXID = $this->getEditObjectId();
|
||||||
|
$this->setEditObjectId($sOXID);
|
||||||
if ($sOXID == "-1") {
|
|
||||||
return;
|
if ($sOXID == "-1") {
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
/** @var Manufacturer|D3ManufacturerLongDesc $oManufacturer */
|
|
||||||
$oManufacturer = oxNew(Manufacturer::class);
|
/** @var Manufacturer|D3ManufacturerLongDesc $oManufacturer */
|
||||||
$oManufacturer->loadInLang($iManufacturerLang, $sOXID);
|
$oManufacturer = oxNew(Manufacturer::class);
|
||||||
|
$oManufacturer->loadInLang($iManufacturerLang, $sOXID);
|
||||||
if (!$oManufacturer->load($sOXID)) {
|
|
||||||
return;
|
if (!$oManufacturer->load($sOXID)) {
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
$aParams = Registry::getRequest()->getRequestEscapedParameter("editval");
|
|
||||||
$oManufacturer->assign($aParams);
|
$aParams = Registry::getRequest()->getRequestEscapedParameter("editval");
|
||||||
|
$oManufacturer->assign($aParams);
|
||||||
if (false === is_null($this->d3GetLongdescParamValue())) {
|
|
||||||
$oManufacturer->d3SetLongdesc($this->d3GetLongdescParamValue());
|
if (false === is_null($this->d3GetLongdescParamValue($oManufacturer))) {
|
||||||
$oManufacturer->save();
|
$oManufacturer->d3SetLongdesc($this->d3GetLongdescParamValue($oManufacturer));
|
||||||
}
|
$oManufacturer->save();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/**
|
|
||||||
* Returns string which must be edited by editor
|
/**
|
||||||
*
|
* @return string
|
||||||
* @param \OxidEsales\Eshop\Core\Model\BaseModel $oObject object with field will be used for editing
|
*/
|
||||||
* @param string $sField name of editable field
|
public function d3GetLongdescParamValue(Manufacturer $oManufacturer): string
|
||||||
*
|
{
|
||||||
* @return string
|
return (string) Registry::getRequest()->getRequestEscapedParameter("editval")['oxmanufacturers__d3description'];
|
||||||
* @deprecated underscore prefix violates PSR12, will be renamed to "getEditValue" in next major
|
}
|
||||||
*/
|
|
||||||
protected function _getEditValue($oManufacturer, $sField) // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
|
/**
|
||||||
{
|
* inhaltliche Uebernahme analog Article_Main
|
||||||
$sEditObjectValue = '';
|
* wird genutzt zum Abspeichern der Artikel-Langbeschreibung
|
||||||
|
*
|
||||||
if ($oManufacturer and $oManufacturer->getId()) {
|
* @param $sValue
|
||||||
$sEditObjectValue = $this->_processEditValue($oManufacturer->getFieldData(Constants::D3_OXMANUFACTURERS_LONGDESC_FIELDNAME));
|
*
|
||||||
}
|
* @return mixed
|
||||||
|
*/
|
||||||
return $sEditObjectValue;
|
protected function processLongDesc($sValue): mixed
|
||||||
}
|
{
|
||||||
|
$aSearch = ['&nbsp;', '&', '"', '&lang=', '<p> </p>', '<p> </p>'];
|
||||||
/**
|
$aReplace = [' ', '&', '"', '&lang=', '', ''];
|
||||||
* @return string
|
|
||||||
*/
|
return str_replace($aSearch, $aReplace, $sValue);
|
||||||
public function d3GetLongdescParamValue() :string
|
}
|
||||||
{
|
}
|
||||||
return (string) $aParams = Registry::getRequest()->getRequestEscapedParameter("editval")['oxmanufacturers__D3DESCRIPTION'];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* inhaltliche Uebernahme analog Article_Main
|
|
||||||
* wird genutzt zum Abspeichern der Artikel-Langbeschreibung
|
|
||||||
*
|
|
||||||
* @param $sValue
|
|
||||||
*
|
|
||||||
* @return mixed
|
|
||||||
*/
|
|
||||||
protected function _processLongDesc($sValue)
|
|
||||||
{
|
|
||||||
$aSearch = ['&nbsp;', '&', '"', '&lang=', '<p> </p>', '<p> </p>'];
|
|
||||||
$aReplace = [' ', '&', '"', '&lang=', '', ''];
|
|
||||||
|
|
||||||
return str_replace($aSearch, $aReplace, $sValue);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -1,14 +1,26 @@
|
|||||||
<?php
|
<?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);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace D3\ManufacturerInformation\Application\Model;
|
namespace D3\ManufacturerInformation\Application\Model;
|
||||||
|
|
||||||
|
|
||||||
class Constants
|
class Constants
|
||||||
{
|
{
|
||||||
public const OXID_MODULE_ID = 'd3manufacturerinformation';
|
public const OXID_MODULE_ID = 'd3manufacturerinformation';
|
||||||
|
|
||||||
// Tables and Database
|
// Tables and Database
|
||||||
public const D3_OXMANUFACTURERS_LONGDESC_FIELDNAME = 'D3DESCRIPTION';
|
public const D3_OXMANUFACTURERS_LONGDESC_FIELDNAME = 'd3description';
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,24 @@
|
|||||||
|
<?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
|
@ -0,0 +1,26 @@
|
|||||||
|
<?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
|
@ -0,0 +1,24 @@
|
|||||||
|
<?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
|
@ -0,0 +1,26 @@
|
|||||||
|
<?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
|
@ -1,11 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
$sLangName = "Deutsch";
|
|
||||||
// -------------------------------
|
|
||||||
// RESOURCE IDENTITFIER = STRING
|
|
||||||
// -------------------------------
|
|
||||||
$aLang = array(
|
|
||||||
'charset' => 'UTF-8',
|
|
||||||
|
|
||||||
'mxd3manufacturerinfolongdesc' => 'Langtext',
|
|
||||||
);
|
|
@ -1,11 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
$sLangName = "Deutsch";
|
|
||||||
// -------------------------------
|
|
||||||
// RESOURCE IDENTITFIER = STRING
|
|
||||||
// -------------------------------
|
|
||||||
$aLang = array(
|
|
||||||
'charset' => 'UTF-8',
|
|
||||||
|
|
||||||
'mxd3manufacturerinfolongdesc' => 'Text',
|
|
||||||
);
|
|
@ -0,0 +1,27 @@
|
|||||||
|
<?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',
|
||||||
|
];
|
@ -0,0 +1,27 @@
|
|||||||
|
<?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' => 'Text',
|
||||||
|
'SHOP_MODULE_GROUP_d3manufacturerinformation_main' => 'Settings',
|
||||||
|
'SHOP_MODULE_d3manufacturerinformation_showManufacturertextOnDetailsPage' => 'show existing manufacturer texts on item details page as a tab',
|
||||||
|
'SHOP_MODULE_d3manufacturerinformation_showManufacturertextOnManufacturerPage' => 'show manufacturer texts on manufacturer page',
|
||||||
|
];
|
@ -0,0 +1,27 @@
|
|||||||
|
<?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',
|
||||||
|
];
|
@ -0,0 +1,27 @@
|
|||||||
|
<?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' => 'Text',
|
||||||
|
'SHOP_MODULE_GROUP_d3manufacturerinformation_main' => 'Settings',
|
||||||
|
'SHOP_MODULE_d3manufacturerinformation_showManufacturertextOnDetailsPage' => 'display existing manufacturer texts on item details as a tab',
|
||||||
|
'SHOP_MODULE_d3manufacturerinformation_showManufacturertextOnManufacturerPage' => 'show manufacturer texts on manufacturer page',
|
||||||
|
];
|
@ -0,0 +1,10 @@
|
|||||||
|
[{if $oManufacturer->oxmanufacturers__oxicon->value}]
|
||||||
|
[{$smarty.block.parent}]
|
||||||
|
[{else}]
|
||||||
|
<div class="action-links text-left">
|
||||||
|
<a href="[{$oManufacturer->getLink()}]" title="[{$oManufacturer->oxmanufacturers__oxtitle->value}]">
|
||||||
|
[{oxmultilang ident="MANUFACTURER" suffix="COLON"}] [{$oManufacturer->oxmanufacturers__oxtitle->value}]
|
||||||
|
</a>
|
||||||
|
<span itemprop="brand" class="hidden">[{$oManufacturer->oxmanufacturers__oxtitle->value}]</span>
|
||||||
|
</div>
|
||||||
|
[{/if}]
|
@ -0,0 +1,20 @@
|
|||||||
|
[{$smarty.block.parent}]
|
||||||
|
|
||||||
|
[{assign var="registry" value="\OxidEsales\Eshop\Core\Registry"|@oxNew}]
|
||||||
|
[{assign var="oConfig" value=$registry->getConfig()}]
|
||||||
|
[{assign var="oManufacturer" value=$oView->getManufacturer()}]
|
||||||
|
|
||||||
|
[{if $oManufacturer && $oManufacturer->getId()}]
|
||||||
|
[{assign var="sShopURL" value=$oConfig->getConfigParam('sShopURL')}]
|
||||||
|
[{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"}]
|
||||||
|
<div id="manufacturertab" class="tab-pane[{if $blFirstTab}] active[{/if}]">
|
||||||
|
[{oxeval var=$description}]
|
||||||
|
</div>
|
||||||
|
[{assign var="blFirstTab" value=false}]
|
||||||
|
[{/capture}]
|
||||||
|
[{/if}]
|
||||||
|
[{/if}]
|
68
CHANGELOG.md
68
CHANGELOG.md
@ -4,9 +4,73 @@ 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).
|
||||||
|
|
||||||
## [1.1.0.0](https://git.d3data.de/D3Public/MyModule/compare/1.0.0.0...1.1.0.0) - 2024-11-13
|
## [unreleased](https://git.d3data.de/D3Private/manufacturer-information/compare/2.1.0.0...rel_2.x)
|
||||||
|
|
||||||
|
## [2.0.3.0](https://git.d3data.de/D3Private/manufacturer-information/compare/2.0.2.0...2.0.3.0) - 2024-12-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
|
||||||
|
- show hidden save button
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- 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
|
||||||
|
### Fixed
|
||||||
|
- 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
|
||||||
|
|
||||||
|
## [1.1.0.0](https://git.d3data.de/D3Private/manufacturer-information/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/D3Public/MyModule/releases/tag/1.0.0.0) - 2024-11-13
|
## [1.0.0.0](https://git.d3data.de/D3Private/manufacturer-information/releases/tag/1.0.0.0) - 2024-11-13
|
||||||
- initial release
|
- initial release
|
@ -1,21 +1,37 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This Software is the property of Data Development and is protected
|
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
|
||||||
* by copyright law - it is NOT Freeware.
|
*
|
||||||
* Any unauthorized use of this software without a valid license
|
* For the full copyright and license information, please view
|
||||||
* is a violation of the license agreement and will be prosecuted by
|
* the LICENSE file that was distributed with this source code.
|
||||||
* civil and criminal law.
|
*
|
||||||
* http://www.shopmodule.com
|
* https://www.d3data.de
|
||||||
*
|
*
|
||||||
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
|
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
|
||||||
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com>
|
* @author D3 Data Development - Max Buhe, Daniel Seifert <info@shopmodule.com>
|
||||||
* @link http://www.oxidmodule.com
|
* @link https://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
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
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,39 +1,61 @@
|
|||||||
<?php
|
<?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);
|
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\Registry;
|
use OxidEsales\Eshop\Core\Registry;
|
||||||
|
|
||||||
class D3ManufacturerLongDesc extends D3ManufacturerLongDesc_parent
|
class D3ManufacturerLongDesc extends D3ManufacturerLongDesc_parent
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @param string $sValue
|
* @param string $sValue
|
||||||
* @return void
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function d3SetLongdesc(string $sValue) :bool
|
public function d3SetLongdesc(string $sValue): bool
|
||||||
{
|
{
|
||||||
if ($this->getId() and $this->isLoaded()){
|
if ($this->getId() and $this->isLoaded()) {
|
||||||
try {
|
try {
|
||||||
$this->assign([Constants::D3_OXMANUFACTURERS_LONGDESC_FIELDNAME => $sValue]);
|
$this->assign([Constants::D3_OXMANUFACTURERS_LONGDESC_FIELDNAME => $sValue]);
|
||||||
$this->save();
|
$this->save();
|
||||||
}catch (\Exception $exception){
|
} catch (\Exception $exception) {
|
||||||
Registry::getLogger()->error($exception->getMessage());
|
Registry::getLogger()->error($exception->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return field
|
||||||
*/
|
*/
|
||||||
public function d3GetLongdesc(): string
|
public function d3GetLongdesc(): field
|
||||||
{
|
{
|
||||||
return $this->getFieldData(Constants::D3_OXMANUFACTURERS_LONGDESC_FIELDNAME);
|
$longName = $this->getFieldLongName(Constants::D3_OXMANUFACTURERS_LONGDESC_FIELDNAME);
|
||||||
}
|
return $this->$longName ?: oxNew(Field::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getD3LongDescTableColumnName(): string
|
||||||
|
{
|
||||||
|
return $this->getViewName(true).'__'.Constants::D3_OXMANUFACTURERS_LONGDESC_FIELDNAME;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -1,25 +1,65 @@
|
|||||||
<?php
|
<?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);
|
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
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @param Manufacturer|D3ManufacturerLongDesc $oManufacturer
|
* @param Manufacturer|D3ManufacturerLongDesc $oManufacturer
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function _addCategoryFields($oManufacturer)
|
protected function addCategoryFields($oManufacturer): void
|
||||||
{
|
{
|
||||||
parent::_addCategoryFields($oManufacturer);
|
parent::addCategoryFields($oManufacturer);
|
||||||
|
|
||||||
$oManufacturer->oxcategories__oxlongdesc = new Field($oManufacturer->getFieldData(Constants::D3_OXMANUFACTURERS_LONGDESC_FIELDNAME), Field::T_RAW);
|
/** @var ModuleSettingService $setting */
|
||||||
}
|
$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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
36
Modules/Core/ManufacturerConfig.php
Normal file
36
Modules/Core/ManufacturerConfig.php
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<?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);
|
||||||
|
}
|
||||||
|
}
|
23
README.md
23
README.md
@ -17,24 +17,27 @@ Dieses Paket erfordert einen mit Composer installierten OXID eShop in einer in d
|
|||||||
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
composer require d3/manufacturerinformation:"~1.1"
|
composer config repositories.d3manufacturerinformation vcs https://git.d3data.de/D3Public/manufacturer-information.git
|
||||||
|
composer require d3/manufacturerinformation:"~2.0.0"
|
||||||
./vendor/bin/oe-eshop-db_migrate migrations:migrate d3manufacturerinformation
|
|
||||||
|
|
||||||
./vendor/bin/oe-console o:m:i source/modules/d3/manufacturerinformation
|
|
||||||
./vendor/bin/oe-console o:m:deact d3manufacturerinformation
|
|
||||||
./vendor/bin/oe-console o:m:act d3manufacturerinformation
|
|
||||||
```
|
```
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
Aktivieren Sie das Modul im Shopadmin unter "Erweiterungen -> Module".
|
```bash
|
||||||
|
./vendor/bin/oe-eshop-db_migrate migrations:migrate d3manufacturerinformation
|
||||||
|
|
||||||
Aktualisieren Sie anschließend die Datenbank-Views und leeren den Temp Ordner des Shops.
|
./vendor/bin/oe-console oe:module:install source/modules/d3/manufacturerinformation
|
||||||
|
./vendor/bin/oe-console oe:module:deactivate d3manufacturerinformation
|
||||||
|
./vendor/bin/oe-console oe:module:activate d3manufacturerinformation
|
||||||
|
|
||||||
|
./vendor/bin/oe-eshop-db_views_generate
|
||||||
|
```
|
||||||
|
|
||||||
|
Leeren Sie anschließend den Temp Ordner des Shops.
|
||||||
|
|
||||||
|
|
||||||
## Lizenz
|
## Lizenz
|
||||||
(Stand: 13.11.2024)
|
(Stand: 19.12.2024)
|
||||||
|
|
||||||
```
|
```
|
||||||
Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
|
Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
|
||||||
|
192
assets/picture.svg
Normal file
192
assets/picture.svg
Normal file
@ -0,0 +1,192 @@
|
|||||||
|
<?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>
|
After Width: | Height: | Size: 7.3 KiB |
@ -6,7 +6,9 @@
|
|||||||
"oxid",
|
"oxid",
|
||||||
"modules",
|
"modules",
|
||||||
"eShop",
|
"eShop",
|
||||||
"d3"
|
"d3",
|
||||||
|
"manufacturer",
|
||||||
|
"information"
|
||||||
],
|
],
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
@ -24,28 +26,22 @@
|
|||||||
"proprietary"
|
"proprietary"
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": "~7.0 || ~8.0",
|
"php": "^8.0",
|
||||||
"oxid-esales/oxideshop-ce": "v6.6.0 - v6.14.3"
|
"oxid-esales/oxideshop-ce": "7.0 - 7.2"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit" : "^9.5",
|
|
||||||
"friendsofphp/php-cs-fixer": "^3.9",
|
"friendsofphp/php-cs-fixer": "^3.9",
|
||||||
"phpstan/phpstan": "^1.8"
|
"phpunit/phpunit": "^9.1.1"
|
||||||
},
|
|
||||||
"extra": {
|
|
||||||
"oxideshop": {
|
|
||||||
"blacklist-filter": [
|
|
||||||
"*.md",
|
|
||||||
"composer.json",
|
|
||||||
".php-cs-fixer.php",
|
|
||||||
"*.neon"
|
|
||||||
],
|
|
||||||
"target-directory": "d3/manufacturerinformation"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"D3\\ManufacturerInformation\\": "../../../source/modules/d3/manufacturerinformation"
|
"D3\\ManufacturerInformation\\": ""
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"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_fix": "./vendor/bin/php-cs-fixer fix --config=./vendor/d3/manufacturerinformation/.php-cs-fixer.php"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
BIN
image-file.png
BIN
image-file.png
Binary file not shown.
Before Width: | Height: | Size: 13 KiB |
75
metadata.php
75
metadata.php
@ -1,53 +1,84 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For the full copyright and license information, please view the LICENSE
|
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
|
||||||
* file that was distributed with this source code.
|
*
|
||||||
|
* For the full copyright and license information, please view
|
||||||
|
* the LICENSE file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* https://www.d3data.de
|
* https://www.d3data.de
|
||||||
*
|
*
|
||||||
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
|
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
|
||||||
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
|
* @author D3 Data Development - Max Buhe, Daniel Seifert <info@shopmodule.com>
|
||||||
* @link https://www.oxidmodule.com
|
* @link https://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
use D3\ManufacturerInformation\Application\Controller\Admin\ManufacturerInfoLongdesc;
|
use D3\ManufacturerInformation\Application\Controller\Admin\ManufacturerInfoLongdesc;
|
||||||
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' => $logo.' Herstellerinformationen',
|
'title' => [
|
||||||
'description' => [
|
'de' => '(D3) Herstellerinformationen',
|
||||||
|
'en' => '(D3) Manufacturer information',
|
||||||
|
],
|
||||||
|
'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' => 'image-file.png',
|
'thumbnail' => 'picture.svg',
|
||||||
'version' => '1.1.0.0',
|
'version' => '2.0.3.0',
|
||||||
'author' => $logo.' Data Development (Inh.: Thomas Dartsch)',
|
'author' => '(D3) 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' => [
|
||||||
"d3manufacturerinfolongdesc" => ManufacturerInfoLongdesc::class
|
"d3manufacturerinfolongdesc" => ManufacturerInfoLongdesc::class,
|
||||||
],
|
],
|
||||||
'extend' => [
|
'extend' => [
|
||||||
OEManufacturer::class => D3ManufacturerLongDesc::class,
|
OEManufacturer::class => D3ManufacturerLongDesc::class,
|
||||||
OEManufacturerList::class => ManufacturerInfoList::class
|
OEManufacturerList::class => ManufacturerInfoList::class,
|
||||||
|
OEConfig::class => ManufacturerConfig::class,
|
||||||
],
|
],
|
||||||
'templates' => [
|
'templates' => [
|
||||||
'd3manufacturerlongdesc.tpl' => 'd3/manufacturerinformation/Application/views/admin/tpl/d3manufacturer_longdesc.tpl',
|
'@' . Constants::OXID_MODULE_ID . '/admin/d3manufacturerlongdesc.tpl' => 'views/smarty/admin/d3manufacturerlongdesc.tpl',
|
||||||
|
],
|
||||||
|
'settings' => [
|
||||||
|
[
|
||||||
|
'group' => $sModuleId.'_main',
|
||||||
|
'name' => $sModuleId.'_showManufacturertextOnDetailsPage',
|
||||||
|
'type' => 'bool',
|
||||||
|
'value' => true,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'group' => $sModuleId.'_main',
|
||||||
|
'name' => $sModuleId.'_showManufacturertextOnManufacturerPage',
|
||||||
|
'type' => 'bool',
|
||||||
|
'value' => true,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'blocks' => [
|
||||||
|
[
|
||||||
|
'template' => 'page/details/inc/productmain.tpl',
|
||||||
|
'block' => 'details_productmain_manufacturersicon',
|
||||||
|
'file' => 'Application/views/blocks/page/details/inc/details_productmain_manufacturersicon.html.tpl',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'template' => 'page/details/inc/tabs.tpl',
|
||||||
|
'block' => 'details_tabs_invite',
|
||||||
|
'file' => 'Application/views/blocks/page/details/inc/details_tabs_invite.html.tpl',
|
||||||
|
],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
@ -1,5 +1,18 @@
|
|||||||
<?php
|
<?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);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace D3\ManufacturerInformation\Migrations;
|
namespace D3\ManufacturerInformation\Migrations;
|
||||||
@ -13,36 +26,38 @@ use Doctrine\Migrations\AbstractMigration;
|
|||||||
*/
|
*/
|
||||||
final class Version20241023154223 extends AbstractMigration
|
final class Version20241023154223 extends AbstractMigration
|
||||||
{
|
{
|
||||||
public function getDescription() : string
|
public function getDescription(): string
|
||||||
{
|
{
|
||||||
return 'Adds the D3 manufacturer longdesc column';
|
return 'Adds the D3 manufacturer longdesc column';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function up(Schema $schema) : void
|
|
||||||
{
|
|
||||||
$this->connection->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string');
|
|
||||||
|
|
||||||
$this->d3AddLongdescColumnToOxmanufacturers($schema);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function down(Schema $schema) : void
|
public function up(Schema $schema): void
|
||||||
{}
|
{
|
||||||
|
$this->connection->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string');
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
$this->d3AddLongdescColumnToOxmanufacturers($schema);
|
||||||
* @return void
|
}
|
||||||
* @throws \Doctrine\DBAL\Schema\SchemaException
|
|
||||||
*/
|
public function down(Schema $schema): void
|
||||||
public function d3AddLongdescColumnToOxmanufacturers(Schema $schema){
|
{
|
||||||
$table = !$schema->hasTable('oxmanufacturers') ?
|
}
|
||||||
$schema->createTable('oxmanufacturers') :
|
|
||||||
$schema->getTable('oxmanufacturers');
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
// Beschreibung
|
* @return void
|
||||||
if (!$table->hasColumn('D3DESCRIPTION')) {
|
* @throws \Doctrine\DBAL\Schema\SchemaException
|
||||||
$table->addColumn('D3DESCRIPTION', (new TextType())->getName())
|
*/
|
||||||
->setLength($this->connection->getDatabasePlatform()::LENGTH_LIMIT_TEXT)
|
public function d3AddLongdescColumnToOxmanufacturers(Schema $schema)
|
||||||
->setNotnull(true);
|
{
|
||||||
}
|
$table = !$schema->hasTable('oxmanufacturers') ?
|
||||||
}
|
$schema->createTable('oxmanufacturers') :
|
||||||
|
$schema->getTable('oxmanufacturers');
|
||||||
|
|
||||||
|
// Beschreibung
|
||||||
|
if (!$table->hasColumn('D3DESCRIPTION')) {
|
||||||
|
$table->addColumn('D3DESCRIPTION', (new TextType())->getName())
|
||||||
|
->setLength($this->connection->getDatabasePlatform()::LENGTH_LIMIT_TEXT)
|
||||||
|
->setNotnull(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,18 @@
|
|||||||
<?php
|
<?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);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace D3\ManufacturerInformation\Migrations;
|
namespace D3\ManufacturerInformation\Migrations;
|
||||||
@ -13,50 +26,52 @@ use Doctrine\Migrations\AbstractMigration;
|
|||||||
*/
|
*/
|
||||||
final class Version20241028172608 extends AbstractMigration
|
final class Version20241028172608 extends AbstractMigration
|
||||||
{
|
{
|
||||||
public function getDescription() : string
|
public function getDescription(): string
|
||||||
{
|
{
|
||||||
return 'Adds multilang tables for the D3 manufacturer longdesc';
|
return 'Adds multilang tables for the D3 manufacturer longdesc';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function up(Schema $schema) : void
|
|
||||||
{
|
|
||||||
$this->connection->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string');
|
|
||||||
|
|
||||||
$this->d3AddLongdescMultilangColumnsToOxmanufacturers($schema);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function down(Schema $schema) : void
|
public function up(Schema $schema): void
|
||||||
{}
|
{
|
||||||
|
$this->connection->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string');
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
$this->d3AddLongdescMultilangColumnsToOxmanufacturers($schema);
|
||||||
* @return void
|
}
|
||||||
* @throws \Doctrine\DBAL\Schema\SchemaException
|
|
||||||
*/
|
public function down(Schema $schema): void
|
||||||
public function d3AddLongdescMultilangColumnsToOxmanufacturers(Schema $schema){
|
{
|
||||||
$table = !$schema->hasTable('oxmanufacturers') ?
|
}
|
||||||
$schema->createTable('oxmanufacturers') :
|
|
||||||
$schema->getTable('oxmanufacturers');
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
// lang 1
|
* @return void
|
||||||
if (!$table->hasColumn('D3DESCRIPTION_1')) {
|
* @throws \Doctrine\DBAL\Schema\SchemaException
|
||||||
$table->addColumn('D3DESCRIPTION_1', (new TextType())->getName())
|
*/
|
||||||
->setLength($this->connection->getDatabasePlatform()::LENGTH_LIMIT_TEXT)
|
public function d3AddLongdescMultilangColumnsToOxmanufacturers(Schema $schema)
|
||||||
->setNotnull(true);
|
{
|
||||||
}
|
$table = !$schema->hasTable('oxmanufacturers') ?
|
||||||
|
$schema->createTable('oxmanufacturers') :
|
||||||
// lang 2
|
$schema->getTable('oxmanufacturers');
|
||||||
if (!$table->hasColumn('D3DESCRIPTION_2')) {
|
|
||||||
$table->addColumn('D3DESCRIPTION_2', (new TextType())->getName())
|
// lang 1
|
||||||
->setLength($this->connection->getDatabasePlatform()::LENGTH_LIMIT_TEXT)
|
if (!$table->hasColumn('D3DESCRIPTION_1')) {
|
||||||
->setNotnull(true);
|
$table->addColumn('D3DESCRIPTION_1', (new TextType())->getName())
|
||||||
}
|
->setLength($this->connection->getDatabasePlatform()::LENGTH_LIMIT_TEXT)
|
||||||
|
->setNotnull(true);
|
||||||
// lang 3
|
}
|
||||||
if (!$table->hasColumn('D3DESCRIPTION_3')) {
|
|
||||||
$table->addColumn('D3DESCRIPTION_3', (new TextType())->getName())
|
// lang 2
|
||||||
->setLength($this->connection->getDatabasePlatform()::LENGTH_LIMIT_TEXT)
|
if (!$table->hasColumn('D3DESCRIPTION_2')) {
|
||||||
->setNotnull(true);
|
$table->addColumn('D3DESCRIPTION_2', (new TextType())->getName())
|
||||||
}
|
->setLength($this->connection->getDatabasePlatform()::LENGTH_LIMIT_TEXT)
|
||||||
}
|
->setNotnull(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// lang 3
|
||||||
|
if (!$table->hasColumn('D3DESCRIPTION_3')) {
|
||||||
|
$table->addColumn('D3DESCRIPTION_3', (new TextType())->getName())
|
||||||
|
->setLength($this->connection->getDatabasePlatform()::LENGTH_LIMIT_TEXT)
|
||||||
|
->setNotnull(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
name: D3 manufacturerinformation
|
table_storage:
|
||||||
migrations_namespace: D3\ManufacturerInformation\Migrations
|
table_name: d3migrations_manufacturerinformation
|
||||||
table_name: d3migrations_manufacturerinformation
|
migrations_paths:
|
||||||
migrations_directory: data
|
'D3\ManufacturerInformation\Migrations': data
|
@ -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: 0px;margin: 0px;height:0px;">
|
||||||
[{$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="">
|
||||||
@ -33,9 +33,11 @@
|
|||||||
<input type="hidden" name="voxid" value="[{$oxid}]">
|
<input type="hidden" name="voxid" value="[{$oxid}]">
|
||||||
<input type="hidden" name="editval[oxmanufacturers__oxid]" value="[{$oxid}]">
|
<input type="hidden" name="editval[oxmanufacturers__oxid]" value="[{$oxid}]">
|
||||||
<input type="hidden" name="catlang" value="[{$catlang}]">
|
<input type="hidden" name="catlang" value="[{$catlang}]">
|
||||||
<input type="hidden" name="editval[oxmanufacturers__D3DESCRIPTION]" value="">
|
<input type="hidden" name="editval[oxmanufacturers__d3description]" value="">
|
||||||
|
|
||||||
[{include file="include/category_text_editor.tpl"}]
|
<div style="margin-bottom: 40px">
|
||||||
|
[{include file="include/category_text_editor.tpl"}]
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
[{include file="bottomnaviitem.tpl"}]
|
[{include file="bottomnaviitem.tpl"}]
|
41
views/twig/admin/d3manufacturerlongdesc.html.twig
Normal file
41
views/twig/admin/d3manufacturerlongdesc.html.twig
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
{% 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" %}
|
@ -0,0 +1,20 @@
|
|||||||
|
{% 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 %}
|
126
views/twig/extensions/themes/default/page/list/list.html.twig
Normal file
126
views/twig/extensions/themes/default/page/list/list.html.twig
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
{% 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 %}
|
Loading…
x
Reference in New Issue
Block a user