diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..6b7184b --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,10 @@ +# Changelog + +## 1.0.0.0 (2022-07-25) + +### Added +- performs POST forwarding in the following controllers + - Search + - Article lists (categories, manufacturers, vendors) + - Contact +- no forwarding in case of errors in the contact form diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000..78d2a67 --- /dev/null +++ b/README.en.md @@ -0,0 +1,55 @@ +[![deutsche Version](https://logos.oxidmodule.com/de2_xs.svg)](README.md) +[![english version](https://logos.oxidmodule.com/en2_xs.svg)](README.en.md) + +# D³ PRG Redirects for OXID eShop + +For forms sent via the FORM method, the browser's back function can only be used after the form has been resent. Depending on the browser, prompts will be shown. The additional sending can trigger unwanted actions. + +By applying an additional GET request to the source address, the additional sending is prevented at the first "back". (see [Wikipedia](https://en.wikipedia.org/wiki/Post/Redirect/Get)) + +## Installation + +This package requires an Composer installed OXID eShop as defined in [composer.json](composer.json). + +Open a command line interface and navigate to the shop root directory (parent of source and vendor). Execute the following command. Adapt the paths to your environment. + +```bash +php composer require d3/prg-redirects:^1.0 +``` + +Activate the module in the admin area of the shop in "Extensions -> Modules". + +## Usage + +In the "Settings" tab, activate all controllers that are to use this additional redirection. + +## Extensibility + +In principle, every controller can be equipped with this technology. If a controller is missing, it is welcome to add it. Note the handling of special cases, e.g. if the sending of the form was not successful and forwarding would interfere with error handling. + +## Changelog + +See [CHANGELOG](CHANGELOG.md) for further informations. + +## Contributing + +If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue. Don't forget to give the project a star! Thanks again! + +- Fork the Project +- Create your Feature Branch (git checkout -b feature/AmazingFeature) +- Commit your Changes (git commit -m 'Add some AmazingFeature') +- Push to the Branch (git push origin feature/AmazingFeature) +- Open a Pull Request + +## Licence +(status: 2022-07-25) + +Distributed under the GPLv3 license. + +``` +Copyright (c) D3 Data Development (Inh. Thomas Dartsch) + +This software is distributed under the GNU GENERAL PUBLIC LICENSE version 3. +``` + +For full copyright and licensing information, please see the [LICENSE](LICENSE.md) file distributed with this source code. \ No newline at end of file diff --git a/README.md b/README.md index fea9fb9..e9f0314 100644 --- a/README.md +++ b/README.md @@ -3,26 +3,9 @@ # D³ PRG Weiterleitungen für OXID eShop -Das Modul `DataWizard` bietet ein Framework zur einfachen Integration von Exporten und ausführbaren Tasks über den Adminbereich des OXID Shops. +Bei via FORM-Methode abgesendete Formulare kann die Zurück-Funktion des Browsers nur nach dem erneuten Senden des Formulars verwendet werden. Je nach Browser werden Rückfragen gezeigt. Das zusätzliche Absenden kann ungewollte Aktionen auslösen. -Die Exporte werden über Datenbankabfragen oder fertige Datenlisten definiert. Es stehen verschiedene Exportformate zur Verfügung. Die Generierung ist jederzeit und immer wiederkehrend möglich (im Rahmen der Systemgrenzen). Diese werden im Browser als Download angeboten. - -Alle Exporte bzw. Tasks sind für eine bessere Übersichtlichkeit in Gruppen zusammengefasst. - -Im Paket `d3/datawizardtasks` sind Beispielexporte enthalten. Diese sollen als Implementierungsreferenz für individuelle Exporte dienen. - -![Adminbereich](assets/administration_exports.jpg "Adminbereich") - -## Inhaltsverzeichnis - -- [Installation](#installation) -- [Verwendung](#verwendung) -- [Erweiterbarkeit](#erweiterbarkeit) - - [Erweiterungspakete](#erweiterungspakete) -- [Changelog](#changelog) -- [Beitragen](#beitragen) -- [Lizenz](#lizenz) -- [weitere Lizenzen und Nutzungsbedingungen](#weitere-lizenzen-und-nutzungsbedingungen) +Durch Anwenden eines zusätzlichen GET-Requests auf die Ursprungsadresse wird das zusätzliche Absenden beim ersten "Zurück" unterbunden. (siehe [Wikipedia](https://de.wikipedia.org/wiki/Post/Redirect/Get)) ## Installation @@ -32,32 +15,18 @@ Dieses Paket erfordert einen mit Composer installierten OXID eShop in einer in d ```bash -php composer require d3/datawizard:^2.0 +php composer require d3/prg-redirects:^1.0 ``` Aktivieren Sie das Modul im Shopadmin unter "Erweiterungen -> Module". ## Verwendung -Dieses Paket enthält keine Exporte oder Aktionen. In [Erweiterungspakete](#erweiterungspakete) finden Sie installierbare Beispieleinträge. - -Melden Sie sich im Adminbereich Ihres Shops an und navigieren Sie zu "D³ Module -> Data Wizard". Wechseln Sie je nach Wunsch zu "Exporte" oder "Aktionen". Wählen Sie den gewünschten Eintrag und starten Sie den Export bzw. die Aktion. +Aktivieren Sie im Tab "Einstell." alle Controller, die diese zusätzliche Umleitung nutzen sollen. ## Erweiterbarkeit -Das Modul stellt das technische Grundgerüst der Exporte dar und erhebt keinen Anspruch auf Vollständigkeit. Um den Umfang an die individuellen Anforderungen anzupassen, sind folgende Erweiterungen vorbereitet: - -- Exporte oder Tasks hinzufügen -- Verwendung bestehender und neuer Gruppen -- Exportformate ergänzen - -Unabhängig dessen stehen alle Erweiterungsmöglichkeiten zur Verfügung, die der OXID Shop für Module bereitstellt. - -### Erweiterungspakete - -- `d3/datawizardtasks` - liefert Beispielexporte und deren Implementierungsreferenz -- `d3/datawizardcli` - ermöglicht die Ausführung der Exporte oder Tasks über die Eingabeaufforderung (z.B. als Cronjobs) -- `d3/datawizardlink` - stellt URLs zur Verfügung, um Exporte von Drittsystemen generieren zu lassen +Grundsätzlich kann jeder Controller mit dieser Technik ausgerüstet werden. Fehlt ein Controller, kann dieser gern ergänzt werden. Beachten Sie die Behandlung von Sonderfällen, wenn z.B. das Absenden des Formulars nicht erfolgreich war und die Weiterleitung eine Fehlerbehandlung stören würde. ## Changelog @@ -74,7 +43,7 @@ Wenn Sie eine Verbesserungsvorschlag haben, legen Sie einen Fork des Repositorie - Öffnen Sie einen Pull Request ## Lizenz -(Stand: 06.05.2021) +(Stand: 25.07.2022) Vertrieben unter der GPLv3 Lizenz. @@ -84,70 +53,4 @@ Copyright (c) D3 Data Development (Inh. Thomas Dartsch) Diese Software wird unter der GNU GENERAL PUBLIC LICENSE Version 3 vertrieben. ``` -Die vollständigen Copyright- und Lizenzinformationen entnehmen Sie bitte der [LICENSE](LICENSE.md)-Datei, die mit diesem Quellcode verteilt wurde. - -## weitere Lizenzen und Nutzungsbedingungen - -### Hintergrundgradienten in src/Application/views/admin/tpl/ Templates -(https://www.gradientmagic.com/licensing - Stand: 07.05.2021) - -``` -Image courtesy of gradientmagic.com - -Free Gradients - -Gradients available on the site are free to use on personal and commercial projects, with attribution. -``` - -------------------------------------------------------------------------------- - -Die folgenden Softwarepakete sind nicht Teil dieses Moduls. Sie werden diese jedoch zur Verwendung benötigt. Die verlinkten Pakete stehen unter den folgenden Lizenzen: - -### league/csv [MIT] -(https://github.com/thephpleague/csv - Stand: 06.05.2021) - -``` -Copyright (c) 2013-2017 ignace nyamagana butera - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -``` - -### mathieuviossat/arraytotexttable [MIT] -(https://github.com/viossat/arraytotexttable - Stand: 06.05.2021) - -``` -Copyright (c) 2015 Mathieu Viossat - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -``` +Die vollständigen Copyright- und Lizenzinformationen entnehmen Sie bitte der [LICENSE](LICENSE.md)-Datei, die mit diesem Quellcode verteilt wurde. \ No newline at end of file