35 Commits

Author SHA1 Message Date
c78e3f01df adjust version information 2024-11-21 20:53:46 +01:00
0dc4d5904c change logo 2024-11-21 20:51:26 +01:00
9110687cef make displaying manufacturer information on manufacturer list page configurable 2024-11-21 20:49:53 +01:00
4b408d4970 use customized tab description instead of shared term 2024-11-21 13:52:38 +01:00
969952efcf fix links in changelog
# Conflicts:
#	CHANGELOG.md
2024-11-21 13:52:38 +01:00
ea935ce882 adjust version information
# Conflicts:
#	CHANGELOG.md
#	metadata.php
2024-11-21 11:50:06 +01:00
490792894c improve manufacturer block content 2024-11-21 11:42:12 +01:00
a5f245be9b fix WYSIWYG editor content 2024-11-21 11:42:12 +01:00
1cb629cc67 adjust version information
# Conflicts:
#	CHANGELOG.md
#	metadata.php
2024-11-19 10:58:03 +01:00
e533b349fe improve code style by CS Fixer
# Conflicts:
#	composer.json
#	migration/data/Version20241023154223.php
#	migration/data/Version20241028172608.php
2024-11-19 10:56:15 +01:00
117cce87bd add noencode 2024-11-19 10:55:26 +01:00
a95a1ab768 improve code style
# Conflicts:
#	migration/data/Version20241023154223.php
#	migration/data/Version20241028172608.php
2024-11-19 10:55:26 +01:00
814ea3c193 don't hide "save" button on larger input form 2024-11-19 10:55:02 +01:00
547d3ab1dd show no content if it contains only empty elements 2024-11-19 10:55:01 +01:00
0600d16fc6 fix installation instructions 2024-11-19 08:52:16 +01:00
58f1bd33b6 adjust version information
# Conflicts:
#	CHANGELOG.md
#	metadata.php
2024-11-18 16:08:09 +01:00
f26fafda5f change description property name to lowercase (UC is not allowed in OXID), fix HTML entity encode 2024-11-18 16:06:34 +01:00
35ba3478ac make displaying manufacturer tab on details page configurable 2024-11-18 16:06:34 +01:00
2ea2b0f09f display manufacturer content as additional tab on article details page 2024-11-18 16:06:34 +01:00
4cc8391a0a show manufacturer on article details page if manufacturer hasn't an icon 2024-11-18 16:06:34 +01:00
d72a9414f5 update installation instructions 2024-11-18 16:06:30 +01:00
f9d179cf46 [Fixed] Events column types 2024-11-13 22:53:18 +01:00
62f421de26 [Fixed] readme 2024-11-13 22:49:26 +01:00
3beaf1f112 [Changed] readme content 2024-11-13 22:48:36 +01:00
2ebf7650b6 [Removed] dev files 2024-11-13 22:48:36 +01:00
36401177b9 [Fixed] description
[Removed] unnecessary metadata entries
2024-11-13 22:48:36 +01:00
a88866fbaf typo 2024-11-13 22:47:25 +01:00
5344476d62 [Fixed] license 2024-11-13 22:47:24 +01:00
acd9c5a420 [Fixed] defined composer installable 2024-11-07 19:02:26 +01:00
15ada9deac [Removed] unnecessary infos 2024-11-05 20:33:12 +01:00
764df09b17 [Update] descriptions 2024-11-05 20:30:42 +01:00
630f0c68bb [Fixed] sql statement 2024-11-05 20:23:32 +01:00
d3f1f74e89 [Removed] migrations
not working anyway; making module more light-weight
2024-11-05 20:02:44 +01:00
0a38b8a5d6 [Added] event handling 2024-11-05 20:02:14 +01:00
800ae296b5 [Changed] composer reqs 2024-11-05 19:43:48 +01:00
14 changed files with 74 additions and 220 deletions

View File

@ -103,7 +103,7 @@ class ManufacturerInfoLongdesc extends AdminDetailsController
*/
public function d3GetLongdescParamValue(): string
{
return (string) Registry::getRequest()->getRequestEscapedParameter("editval")['oxmanufacturers__d3description'];
return (string) $aParams = Registry::getRequest()->getRequestEscapedParameter("editval")['oxmanufacturers__d3description'];
}
/**

View File

@ -4,60 +4,32 @@ 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/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [unreleased](https://git.d3data.de/D3Private/manufacturer-information/compare/1.1.4.2...rel_1.1.x)
## [unreleased](https://git.d3data.de/D3Private/manufacturer-information/compare/1.0.3.0...rel_1.x)
## [1.1.4.2](https://git.d3data.de/D3Private/manufacturer-information/compare/1.1.4.0...1.1.4.1) - 2025-06-23
### Added
- support for OX 6.5.5
## [1.1.4.1](https://git.d3data.de/D3Private/manufacturer-information/compare/1.1.4.0...1.1.4.1) - 2024-12-12
### Fixed
- fix wrong admin menu section
## [1.1.4.0](https://git.d3data.de/D3Private/manufacturer-information/compare/1.1.3.1...1.1.4.0) - 2024-12-05
### Added
- longdesc will parsed by Smarty
## [1.1.3.1](https://git.d3data.de/D3Private/manufacturer-information/compare/1.1.3.0...1.1.3.1) - 2024-11-26
### Fixed
- rename language files
### Changed
- switch to open source
## [1.1.3.0](https://git.d3data.de/D3Private/manufacturer-information/compare/1.1.2.1...1.1.3.0) - 2024-11-22
## [1.0.3.0](https://git.d3data.de/D3Private/manufacturer-information/compare/1.0.2.1...1.0.3.0) - 2024-11-22
### Fixed
- content encoding on manufacturers list page
### Added
- displaying content on manufacturers list page configurable
## [1.1.2.1](https://git.d3data.de/D3Private/manufacturer-information/compare/1.1.2.0...1.1.2.1) - 2024-11-21
## [1.0.2.1](https://git.d3data.de/D3Private/manufacturer-information/compare/1.0.2.0...1.0.2.1) - 2024-11-21
### Fixed
- tab class for Wave based theme
- encoding error when using the WYSIWYG editor
## [1.1.2.0](https://git.d3data.de/D3Private/manufacturer-information/compare/1.1.1.0...1.1.2.0) - 2024-11-19
## [1.0.2.0](https://git.d3data.de/D3Private/manufacturer-information/compare/1.0.1.0...1.0.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
## [1.0.1.0](https://git.d3data.de/D3Private/manufacturer-information/compare/1.0.0.0...1.0.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
- 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
- initial release

45
Events/Events.php Normal file
View File

@ -0,0 +1,45 @@
<?php
declare(strict_types=1);
namespace D3\ManufacturerInformation\Events;
use OxidEsales\Eshop\Core\DatabaseProvider;
class Events
{
public static function activate()
{
self::d3AddLongdescColumnsToOxmanufacturers();
}
public static function deActivate()
{
}
/**
* @return bool
* @throws Exception
*/
protected static function d3AddLongdescColumnsToOxmanufacturers()
{
try {
DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC)->execute("
ALTER TABLE oxmanufacturers ADD COLUMN D3DESCRIPTION TEXT NOT NULL DEFAULT '';
ALTER TABLE oxmanufacturers ADD COLUMN D3DESCRIPTION_1 TEXT NOT NULL DEFAULT '';
ALTER TABLE oxmanufacturers ADD COLUMN D3DESCRIPTION_2 TEXT NOT NULL DEFAULT '';
ALTER TABLE oxmanufacturers ADD COLUMN D3DESCRIPTION_3 TEXT NOT NULL DEFAULT '';
");
} catch (\Exception $e) {
if ((string)$e->getCode() === '1054') {
return true;
}
throw $e;
}
return false;
}
}

View File

@ -47,7 +47,7 @@ class D3ManufacturerLongDesc extends D3ManufacturerLongDesc_parent
*/
public function d3GetLongdesc(): Field
{
$longName = $this->_getFieldLongName(Constants::D3_OXMANUFACTURERS_LONGDESC_FIELDNAME);
return $this->$longName ?: oxNew(Field::class);
$longName = $this->getCoreTableName().'__'.strtolower(Constants::D3_OXMANUFACTURERS_LONGDESC_FIELDNAME);
return $this->$longName;
}
}

View File

@ -34,22 +34,12 @@ class ManufacturerInfoList extends ManufacturerInfoList_parent
parent::_addCategoryFields($oManufacturer);
if (Registry::getConfig()->getConfigParam('d3manufacturerinformation_showManufacturertextOnManufacturerPage')) {
/** @var \OxidEsales\Eshop\Core\UtilsView $oUtilsView */
$oUtilsView = Registry::getUtilsView();
$longdesc = $oManufacturer->d3GetLongdesc()->getRawValue() ?? '';
$deactivateSmarty = Registry::getConfig()->getConfigParam('deactivateSmartyForCmsContent');
$processLongDescriptions = Registry::getConfig()->getConfigParam('bl_perfParseLongDescinSmarty');
if (!$deactivateSmarty && $processLongDescriptions) {
$longdesc = $oUtilsView->parseThroughSmarty(
$longdesc,
$oManufacturer->getId() . $oManufacturer->getLanguage(),
null,
true
) ?? '';
}
$oManufacturer->oxcategories__oxlongdesc = new Field(html_entity_decode($longdesc), Field::T_RAW);
$oManufacturer->oxcategories__oxlongdesc = new Field(
html_entity_decode(
$oManufacturer->getFieldData( Constants::D3_OXMANUFACTURERS_LONGDESC_FIELDNAME ) ?? ''
),
Field::T_RAW
);
}
}
}

View File

@ -2,10 +2,8 @@
# ![D3 Logo](https://logos.oxidmodule.com/d3logo_24x24.svg) Herstellerinformationen fĂĽr OXID eShop
Fügt die Möglichkeit zur Langtextbeschreibung den Herstellern hinzu. Die Anzeige der Informationen erfolgt einstellbar auf der Herstellerübersicht und/oder als Infotab an den Artikeln der Herstellers.
**Diese Software wird unter einer kommerziellen Lizenz vertrieben.**
Kontaktieren Sie uns fĂĽr eine Nutzungslizenz vor der Installation.
Dieses Modul fĂĽgt Ihren Herstellereinstellungen einen Tab zur
detaillierten Beschreibung Ihrer Hersteller hinzu.
## Inhaltsverzeichnis
@ -19,23 +17,14 @@ Dieses Paket erfordert einen mit Composer installierten OXID eShop in einer in d
Ă–ffnen Sie eine Kommandozeile und navigieren Sie zum Stammverzeichnis des Shops (Elternverzeichnis von source und vendor). FĂĽhren Sie die folgenden Befehle aus. Passen Sie die Pfadangaben an Ihre Installationsumgebung an.
```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:"~1.0.0"
```
Sofern nötig, bestätigen Sie bitte, dass Sie `package-name` erlauben, Code auszuführen.
```bash
./vendor/bin/oe-eshop-db_migrate migrations:migrate d3manufacturerinformation
Aktivieren Sie das Modul im Shopadmin unter "Erweiterungen -> Module".
./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
./vendor/bin/oe-eshop-db_views_generate
```
Leeren Sie anschlieĂźend den Temp Ordner des Shops.
Aktualisieren Sie anschlieĂźend die Datenbank-Views und leeren den Temp Ordner des Shops.
## Lizenz
(Stand: 13.11.2024)

View File

@ -24,13 +24,10 @@
"proprietary"
],
"require": {
"php": "~7.1 || ~8.0",
"oxid-esales/oxideshop-ce": "v6.6.0 - v6.14.4"
},
"require-dev": {
"oxid-esales/oxideshop-ce": "~6.14.0",
"friendsofphp/php-cs-fixer": "^3.9"
"php": ">=7.0",
"oxid-esales/oxideshop-ce": "v6.0 - v6.5.6"
},
"require-dev": {},
"extra": {
"oxideshop": {
"blacklist-filter": [

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="ISO-8859-15"?>
<OX>
<OXMENU id="NAVIGATION_ESHOPADMIN">
<MAINMENU id="mxmainmenu">
<MAINMENU id="mxuadmin">
<SUBMENU id="mxmanufacturer" cl="manufacturer" list="manufacturer_list">
<TAB id="mxd3manufacturerinfolongdesc" cl="d3manufacturerinfolongdesc" />
</SUBMENU>

View File

@ -17,6 +17,7 @@ declare(strict_types=1);
use D3\ManufacturerInformation\Application\Controller\Admin\ManufacturerInfoLongdesc;
use D3\ManufacturerInformation\Application\Model\Constants;
use D3\ManufacturerInformation\Events\Events;
use D3\ManufacturerInformation\Modules\Application\Model\D3ManufacturerLongDesc;
use D3\ManufacturerInformation\Modules\Application\Model\ManufacturerInfoList;
use OxidEsales\Eshop\Application\Model\Manufacturer as OEManufacturer;
@ -38,7 +39,7 @@ $aModule = [
'en' => 'adds manufacturer information to the article list',
],
'thumbnail' => 'picture.svg',
'version' => '1.1.4.2',
'version' => '1.0.3.0',
'author' => $logo.' Data Development (Inh.: Thomas Dartsch)',
'email' => 'support@shopmodule.com',
'url' => 'https://www.oxidmodule.com/',
@ -49,6 +50,10 @@ $aModule = [
OEManufacturer::class => D3ManufacturerLongDesc::class,
OEManufacturerList::class => ManufacturerInfoList::class,
],
'events' => [
'onActivate' => Events::class.'::activate',
'onDeactivate' => Events::class.'::deActivate',
],
'templates' => [
'd3manufacturerlongdesc.tpl' => 'd3/manufacturerinformation/Application/views/admin/tpl/d3manufacturer_longdesc.tpl',
],

View File

@ -1,63 +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\Migrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Types\TextType;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20241023154223 extends AbstractMigration
{
public function getDescription(): string
{
return 'Add 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
{
}
/**
* @param Schema $schema
* @return void
* @throws \Doctrine\DBAL\Schema\SchemaException
*/
public function d3AddLongdescColumnToOxmanufacturers(Schema $schema)
{
$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);
}
}
}

View File

@ -1,77 +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\Migrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Types\TextType;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20241028172608 extends AbstractMigration
{
public function getDescription(): string
{
return 'Add 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
{
}
/**
* @param Schema $schema
* @return void
* @throws \Doctrine\DBAL\Schema\SchemaException
*/
public function d3AddLongdescMultilangColumnsToOxmanufacturers(Schema $schema)
{
$table = !$schema->hasTable('oxmanufacturers') ?
$schema->createTable('oxmanufacturers') :
$schema->getTable('oxmanufacturers');
// lang 1
if (!$table->hasColumn('D3DESCRIPTION_1')) {
$table->addColumn('D3DESCRIPTION_1', (new TextType())->getName())
->setLength($this->connection->getDatabasePlatform()::LENGTH_LIMIT_TEXT)
->setNotnull(true);
}
// lang 2
if (!$table->hasColumn('D3DESCRIPTION_2')) {
$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);
}
}
}

View File

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