8
0

14 Commits

Autor SHA1 Nachricht Datum
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
8 geänderte Dateien mit 56 neuen und 129 gelöschten Zeilen

Datei anzeigen

@ -4,9 +4,5 @@ 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).
## [1.1.0.0](https://git.d3data.de/D3Public/MyModule/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/D3Public/MyModule/releases/tag/1.0.0.0) - 2024-11-13
- initial release

45
Events/Events.php Normale Datei
Datei anzeigen

@ -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;
}
}

Datei anzeigen

@ -2,7 +2,8 @@
# ![D3 Logo](https://logos.oxidmodule.com/d3logo_24x24.svg) Herstellerinformationen für OXID eShop
Fügt die Möglichkeit zur Langtextbeschreibung den Hersteller hinzu
Dieses Modul fügt Ihren Herstellereinstellungen einen Tab zur
detaillierten Beschreibung Ihrer Hersteller hinzu.
## Inhaltsverzeichnis
@ -17,13 +18,7 @@ Dieses Paket erfordert einen mit Composer installierten OXID eShop in einer in d
```bash
composer require d3/manufacturerinformation:"~1.1"
./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
composer require d3/manufacturerinformation:"~1.0"
```
Sofern nötig, bestätigen Sie bitte, dass Sie `package-name` erlauben, Code auszuführen.

Datei anzeigen

@ -24,8 +24,8 @@
"proprietary"
],
"require": {
"php": "~7.0 || ~8.0",
"oxid-esales/oxideshop-ce": "v6.6.0 - v6.14.3"
"php": ">=7.0",
"oxid-esales/oxideshop-ce": "v6.0 - v6.5.6"
},
"require-dev": {
"phpunit/phpunit" : "^9.5",

Datei anzeigen

@ -15,6 +15,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;
@ -36,7 +37,7 @@ $aModule = [
'en' => 'adds manufacturer information to the article list',
],
'thumbnail' => 'image-file.png',
'version' => '1.1.0.0',
'version' => '1.0.0.0',
'author' => $logo.' Data Development (Inh.: Thomas Dartsch)',
'email' => 'support@shopmodule.com',
'url' => 'https://www.oxidmodule.com/',
@ -47,6 +48,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',
],

Datei anzeigen

@ -1,48 +0,0 @@
<?php
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 '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
{}
/**
* @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);
}
}
}

Datei anzeigen

@ -1,62 +0,0 @@
<?php
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 '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
{}
/**
* @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);
}
}
}

Datei anzeigen

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