Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
a826d54f57 | |||
f83495cb02 | |||
1f31efbd31 | |||
48a2160836 | |||
ce6fcf3b4b | |||
0faa57ecb2 | |||
2982326cdc | |||
51a375bbb7 | |||
4c7472ef82 | |||
4067084676 | |||
538021335a |
@ -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/),
|
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
|
||||||
|
### 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
|
## [1.0.0.0](https://git.d3data.de/D3Public/MyModule/releases/tag/1.0.0.0) - 2024-11-13
|
||||||
- initial release
|
- initial release
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
11
README.md
11
README.md
@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
#  Herstellerinformationen fĂĽr OXID eShop
|
#  Herstellerinformationen fĂĽr OXID eShop
|
||||||
|
|
||||||
Dieses Modul fĂĽgt Ihren Herstellereinstellungen einen Tab zur
|
Fügt die Möglichkeit zur Langtextbeschreibung den Hersteller hinzu
|
||||||
detaillierten Beschreibung Ihrer Hersteller hinzu.
|
|
||||||
|
|
||||||
## Inhaltsverzeichnis
|
## Inhaltsverzeichnis
|
||||||
|
|
||||||
@ -18,7 +17,13 @@ Dieses Paket erfordert einen mit Composer installierten OXID eShop in einer in d
|
|||||||
|
|
||||||
|
|
||||||
```bash
|
```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.
|
Sofern nötig, bestätigen Sie bitte, dass Sie `package-name` erlauben, Code auszuführen.
|
||||||
|
@ -24,8 +24,8 @@
|
|||||||
"proprietary"
|
"proprietary"
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.0",
|
"php": "~7.0 || ~8.0",
|
||||||
"oxid-esales/oxideshop-ce": "v6.0 - v6.5.6"
|
"oxid-esales/oxideshop-ce": "v6.6.0 - v6.14.3"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit" : "^9.5",
|
"phpunit/phpunit" : "^9.5",
|
||||||
|
@ -15,7 +15,6 @@ 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\Events\Events;
|
|
||||||
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 OxidEsales\Eshop\Application\Model\Manufacturer as OEManufacturer;
|
use OxidEsales\Eshop\Application\Model\Manufacturer as OEManufacturer;
|
||||||
@ -37,7 +36,7 @@ $aModule = [
|
|||||||
'en' => 'adds manufacturer information to the article list',
|
'en' => 'adds manufacturer information to the article list',
|
||||||
],
|
],
|
||||||
'thumbnail' => 'image-file.png',
|
'thumbnail' => 'image-file.png',
|
||||||
'version' => '1.0.0.0',
|
'version' => '1.1.0.0',
|
||||||
'author' => $logo.' Data Development (Inh.: Thomas Dartsch)',
|
'author' => $logo.' Data Development (Inh.: Thomas Dartsch)',
|
||||||
'email' => 'support@shopmodule.com',
|
'email' => 'support@shopmodule.com',
|
||||||
'url' => 'https://www.oxidmodule.com/',
|
'url' => 'https://www.oxidmodule.com/',
|
||||||
@ -48,10 +47,6 @@ $aModule = [
|
|||||||
OEManufacturer::class => D3ManufacturerLongDesc::class,
|
OEManufacturer::class => D3ManufacturerLongDesc::class,
|
||||||
OEManufacturerList::class => ManufacturerInfoList::class
|
OEManufacturerList::class => ManufacturerInfoList::class
|
||||||
],
|
],
|
||||||
'events' => [
|
|
||||||
'onActivate' => Events::class.'::activate',
|
|
||||||
'onDeactivate' => Events::class.'::deActivate',
|
|
||||||
],
|
|
||||||
'templates' => [
|
'templates' => [
|
||||||
'd3manufacturerlongdesc.tpl' => 'd3/manufacturerinformation/Application/views/admin/tpl/d3manufacturer_longdesc.tpl',
|
'd3manufacturerlongdesc.tpl' => 'd3/manufacturerinformation/Application/views/admin/tpl/d3manufacturer_longdesc.tpl',
|
||||||
],
|
],
|
||||||
|
48
migration/data/Version20241023154223.php
Normal file
48
migration/data/Version20241023154223.php
Normal file
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
62
migration/data/Version20241028172608.php
Normal file
62
migration/data/Version20241028172608.php
Normal file
@ -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
4
migration/migrations.yml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
name: D3 manufacturerinformation
|
||||||
|
migrations_namespace: D3\ManufacturerInformation\Migrations
|
||||||
|
table_name: d3migrations_manufacturerinformation
|
||||||
|
migrations_directory: data
|
Reference in New Issue
Block a user