{% block _shipping_methods_widget %} {% import '@OroFrontend/layouts/default/utils.html.twig' as utils %} {% set currentShippingMethod = currentShippingMethod|default(null) %} {% set currentShippingMethodType = currentShippingMethodType|default(null) %} {% set shippingMethodsTemplate %} {% apply spaceless %} {{ block_widget(block) }} {% endapply %} {% endset %} {% set attr = layout_attr_defaults(attr, { 'data-page-component-module': 'oroui/js/app/components/view-component', '~data-page-component-options': { view: 'oroshipping/js/app/views/shipping-methods-view', data: { methods: methods, currentShippingMethod: currentShippingMethod, currentShippingMethodType: currentShippingMethodType }, template: utils.underscoreRaw('<%#' ~ shippingMethodsTemplate ~ '#%>') }, 'data-shipping-method-forms': '', 'role': 'group', '~class': ' grid-col-12' }) %}
{% endblock %} {% block _shipping_methods_template_widget %} <% if (!_.isEmpty(methods)) { %> {{ block_widget(block) }} <% } else { %> <% } %> {% endblock %} {% block _shipping_methods_template_methods_widget %} {{ 'oro.shipping.methods.select_method'|trans }} <% _.each(methods, function(method, key) { %> <% if (method.types) { %> <% _.each(method.types, function(type, key) { %> <% if (type.price) { %> <% var selected = currentShippingMethodType === type.identifier && currentShippingMethod === method.identifier %>
<% } %> <% }); %> <% } %> <% }); %> {% endblock %}