diff --git a/CHANGELOG_de-DE.md b/CHANGELOG_de-DE.md index 5fcf8bb..0b526db 100644 --- a/CHANGELOG_de-DE.md +++ b/CHANGELOG_de-DE.md @@ -1,3 +1,6 @@ +# 1.2.4 +* Fehler bei Umlaute behoben, beim downloaden der .zip Datei + # 1.2.3 * added various filetypes to be able to upload also documents * it's also possible to upload your very own .zip file diff --git a/CHANGELOG_en-GB.md b/CHANGELOG_en-GB.md index 4e1de90..bc2ffa2 100644 --- a/CHANGELOG_en-GB.md +++ b/CHANGELOG_en-GB.md @@ -1,3 +1,6 @@ +# 1.2.4 +* fixed umlauts while downloading the .zip within the storefront + # 1.2.3 * added various filetypes to be able to upload also documents * it's also possible to upload your very own .zip file diff --git a/composer.json b/composer.json index 83f941a..3d376df 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description":"ESD / Download plugin", "type":"shopware-platform-plugin", "keywords": ["esd", "download"], - "version":"1.2.3", + "version":"1.2.4", "license":"proprietary", "authors":[ { diff --git a/src/Service/EsdService.php b/src/Service/EsdService.php index a5b0308..00905fc 100644 --- a/src/Service/EsdService.php +++ b/src/Service/EsdService.php @@ -243,6 +243,13 @@ private function createCriteriaEsdOrder(string $customerId, ?string $productId = private function convertFileName($string): string { $string = str_replace(' ', '-', $string); + $string = str_replace('ä', 'ae', $string); + $string = str_replace('ü', 'ue', $string); + $string = str_replace('ö', 'oe', $string); + $string = str_replace('Ä', 'Ae', $string); + $string = str_replace('Ö', 'Oe', $string); + $string = str_replace('Ü', 'Ue', $string); + $string = str_replace('ß', 'ss', $string); $string = preg_replace('/[^A-Za-z0-9\-]/', '', $string); return preg_replace('/-+/', '-', $string);