-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
38 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
src/Sylius/Bundle/AdminBundle/Resources/views/Product/Show/_imageVariants.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<div class="sylius-image-variants"> | ||
{% if product.getVariantSelectionMethod() == 'match' %} | ||
{% for variant in image.productVariants %} | ||
<div data-variant-options="{% for option in variant.optionValues %}{{ option.code }} {% endfor %}"></div> | ||
{% endfor %} | ||
{% else %} | ||
{% for variant in image.productVariants %} | ||
<div data-variant-code="{{ variant.code }}"></div> | ||
{% endfor %} | ||
{% endif %} | ||
</div> |
9 changes: 9 additions & 0 deletions
9
src/Sylius/Bundle/AdminBundle/Resources/views/Product/Show/_mainImage.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{% if product.imagesByType('thumbnail') is not empty %} | ||
{% set path = product.imagesByType('thumbnail').first.path|imagine_filter(filter|default('sylius_admin_product_thumbnail')) %} | ||
{% elseif product.images.first %} | ||
{% set path = product.images.first.path|imagine_filter(filter|default('sylius_admin_product_thumbnail')) %} | ||
{% else %} | ||
{% set path = '//placehold.it/200x200' %} | ||
{% endif %} | ||
|
||
<img src="{{ path }}" alt="{{ product.name }}" class="ui bordered image" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters