Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 380fcc4

Browse files
authored
bug #10723 [Admin][Product] Fix displaying variants on product show page (GSadee)
This PR was merged into the 1.7-dev branch. Discussion ---------- | Q | A | --------------- | ----- | Branch? | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Related tickets | after #10694 | License | MIT Commits ------- ceaaeee [Admin][Product] Fix displaying variants on product show page
2 parents e21f6ce + ceaaeee commit 380fcc4

1 file changed

Lines changed: 30 additions & 26 deletions

File tree

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,35 @@
1-
{% import "@SyliusAdmin/Common/Macro/money.html.twig" as money %}
2-
31
<div class="ui segment">
42
<div class="ui small header">
5-
{{ 'sylius.ui.pricing'|trans }}
3+
{{ 'sylius.ui.shipping'|trans }}
64
</div>
7-
<table class="ui very basic celled table">
8-
<tbody>
9-
<tr>
10-
<td class="gray text"><strong>{{ 'sylius.ui.channels'|trans }}</strong></td>
11-
<td class="gray text"><strong>{{ 'sylius.ui.price'|trans }}</strong></td>
12-
<td class="gray text"><strong>{{ 'sylius.ui.original_price'|trans }}</strong></td>
13-
</tr>
14-
{% set currencies = sylius_channels_currencies() %}
15-
{% for channelPricing in variant.channelPricings %}
16-
<tr class="pricing">
17-
<td class="five wide gray text">
18-
<strong>{{ channelPricing.channelCode }}</strong>
19-
</td>
20-
{% set channelCode = channelPricing.channelCode %}
21-
<td>{{ money.format(channelPricing.price, currencies[channelCode]) }}</td>
22-
{% if channelPricing.originalPrice != null %}
23-
<td>{{ money.format(channelPricing.originalPrice, currencies[channelCode]) }}</td>
24-
{% else %}
25-
<td><span class="gray text">-</span></td>
26-
{% endif %}
5+
{% if variant.shippingCategory is same as(null) and variant.width is same as(null) and variant.height is same as(null) and variant.depth is same as(null) and variant.weight is same as(null) %}
6+
<div class="ui teal message">
7+
<p>{{ 'sylius.ui.no_shipping_data'|trans }}</p>
8+
</div>
9+
{% else %}
10+
<table class="ui very basic celled table">
11+
<tbody>
12+
<tr>
13+
<td class="five wide gray text"><strong>{{ 'sylius.ui.shipping_category'|trans }}</strong></td>
14+
<td>{{ variant.shippingCategory }}</td>
2715
</tr>
28-
{% endfor %}
29-
</tbody>
30-
</table>
16+
<tr>
17+
<td class="five wide gray text"><strong>{{ 'sylius.ui.width'|trans }}</strong></td>
18+
<td>{{ variant.width }}</td>
19+
</tr>
20+
<tr>
21+
<td class="five wide gray text"><strong>{{ 'sylius.ui.height'|trans }}</strong></td>
22+
<td>{{ variant.height }}</td>
23+
</tr>
24+
<tr>
25+
<td class="five wide gray text"><strong>{{ 'sylius.ui.depth'|trans }}</strong></td>
26+
<td>{{ variant.depth }}</td>
27+
</tr>
28+
<tr>
29+
<td class="five wide gray text"><strong>{{ 'sylius.ui.weight'|trans }}</strong></td>
30+
<td>{{ variant.weight }}</td>
31+
</tr>
32+
</tbody>
33+
</table>
34+
{% endif %}
3135
</div>

0 commit comments

Comments
 (0)