|
1 | | -{% import "@SyliusAdmin/Common/Macro/money.html.twig" as money %} |
2 | | - |
3 | 1 | <div class="ui segment"> |
4 | 2 | <div class="ui small header"> |
5 | | - {{ 'sylius.ui.pricing'|trans }} |
| 3 | + {{ 'sylius.ui.shipping'|trans }} |
6 | 4 | </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> |
27 | 15 | </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 %} |
31 | 35 | </div> |
0 commit comments