Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
f9d179cf46 | |||
62f421de26 | |||
3beaf1f112 | |||
2ebf7650b6 | |||
36401177b9 | |||
a88866fbaf | |||
5344476d62 | |||
acd9c5a420 | |||
15ada9deac | |||
764df09b17 | |||
630f0c68bb | |||
d3f1f74e89 | |||
0a38b8a5d6 | |||
800ae296b5 |
@ -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/),
|
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
|
45
Events/Events.php
Normal file
45
Events/Events.php
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
11
README.md
11
README.md
@ -2,7 +2,8 @@
|
|||||||
|
|
||||||
#  Herstellerinformationen fĂĽr OXID eShop
|
#  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
|
## Inhaltsverzeichnis
|
||||||
|
|
||||||
@ -17,13 +18,7 @@ Dieses Paket erfordert einen mit Composer installierten OXID eShop in einer in d
|
|||||||
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
composer require d3/manufacturerinformation:"~1.1"
|
composer require d3/manufacturerinformation:"~1.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.
|
||||||
|
@ -24,8 +24,8 @@
|
|||||||
"proprietary"
|
"proprietary"
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": "~7.0 || ~8.0",
|
"php": ">=7.0",
|
||||||
"oxid-esales/oxideshop-ce": "v6.6.0 - v6.14.3"
|
"oxid-esales/oxideshop-ce": "v6.0 - v6.5.6"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit" : "^9.5",
|
"phpunit/phpunit" : "^9.5",
|
||||||
|
@ -15,6 +15,7 @@ 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;
|
||||||
@ -36,7 +37,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.1.0.0',
|
'version' => '1.0.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/',
|
||||||
@ -47,6 +48,10 @@ $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',
|
||||||
],
|
],
|
||||||
|
@ -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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,4 +0,0 @@
|
|||||||
name: D3 manufacturerinformation
|
|
||||||
migrations_namespace: D3\ManufacturerInformation\Migrations
|
|
||||||
table_name: d3migrations_manufacturerinformation
|
|
||||||
migrations_directory: data
|
|
Reference in New Issue
Block a user