Skip to content

Commit

Permalink
Fixed to render the umlauts file name
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherDosin committed Oct 13, 2020
2 parents 78a44c2 + 816ced8 commit cff853b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG_de-DE.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG_en-GB.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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":[
{
Expand Down
7 changes: 7 additions & 0 deletions src/Service/EsdService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cff853b

Please sign in to comment.