11 Commits

Auteur SHA1 Bericht Datum
a826d54f57 [Fixed] column length 2024-11-13 23:24:34 +01:00
f83495cb02 [Fixed] column type 2024-11-13 22:33:11 +01:00
1f31efbd31 [Changed] readme content 2024-11-13 22:32:55 +01:00
48a2160836 [Removed] dev files 2024-11-13 22:28:24 +01:00
ce6fcf3b4b correct/add description
remove unnecessary metadata blocks
2024-11-13 17:07:14 +01:00
0faa57ecb2 typo 2024-11-13 17:02:04 +01:00
2982326cdc correct license information to proprietary 2024-11-13 17:01:03 +01:00
51a375bbb7 change fieldtype to "text" 2024-11-13 16:34:45 +01:00
4c7472ef82 [Changed] composer installable 2024-11-07 18:59:52 +01:00
4067084676 [Changed] version 2024-11-07 18:44:58 +01:00
538021335a [Changed] composer installable 2024-11-07 18:44:50 +01:00
8 gewijzigde bestanden met toevoegingen van 129 en 56 verwijderingen

Bestand weergeven

@ -4,5 +4,9 @@ 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

Bestand weergeven

@ -1,45 +0,0 @@
<?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;
}
}

Bestand weergeven

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

Bestand weergeven

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

Bestand weergeven

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

Bestand weergeven

@ -0,0 +1,48 @@
<?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);
}
}
}

Bestand weergeven

@ -0,0 +1,62 @@
<?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);
}
}
}

4
migration/migrations.yml Normal file
Bestand weergeven

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