Skip to content

Commit

Permalink
Fix thumbnail variable when no thumbnails available
Browse files Browse the repository at this point in the history
  • Loading branch information
tinect committed Sep 9, 2020
1 parent 69c57c5 commit 4b6a256
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG_de-DE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.0.9

* BUGFIX Behebe Problem mit thumbnail-variable, wenn kein Thumbnail existiert

# 1.0.8

* FEATURE Option zum Verbessern der Standard Gallery auf der Produktseite hinzugefügt
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG_en-GB.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.0.9

* BUGFIX Fix thumbnail-variable, which occurs, when no thumbnail exists

# 1.0.8

* FEATURE Added Option to fix ThumbnailSizes for the gallery on product page
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"thumbnail"
],
"description": "This plugins allows you to use variable thumbnails, without having them on storage.",
"version": "1.0.8",
"version": "1.0.9",
"type": "shopware-platform-plugin",
"license": "mit",
"authors": [
Expand Down
9 changes: 5 additions & 4 deletions src/Resources/views/storefront/utilities/thumbnail.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
{% else %}
{# FROSH: we are just removing max-width here, nothing more #}

{# activate load per default. If it is not activated only a data-src is set instead of the src tag. #}
{% if load is not defined %}
{% set load = true %}
{% endif %}

{# uses cms block column count and all available thumbnails to determine the correct image size for the current viewport #}
{% if media.thumbnails|length > 0 %}
{# activate load per default. If it is not activated only a data-src is set instead of the src tag. #}
{% if load is not defined %}
{% set load = true %}
{% endif %}

{% if columns and sizes is not defined %}
{# set image size for every viewport #}
Expand Down

0 comments on commit 4b6a256

Please sign in to comment.