{% if (setting_so_onepagecheckout_layout_setting['delivery_method_status'] == 1) %}
    <div class="checkout-content checkout-shipping-methods">
        {% if (error_warning) %}
            <div class="alert alert-warning"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}</div>
        {% endif %}
        {% if (shipping_methods) %}
            <h2 class="secondary-title">{{ text_title_shipping_method }}</h2>
            <div class="box-inner">
                {% for key,shipping_method in shipping_methods %}
                    <p><strong>{{ shipping_method['title'] }}</strong></p>
                    {% if (not shipping_method['error']) %}
                        {% for quote in shipping_method['quote'] %}
                            {% set _status = quote['code']|split('.') %}
                            {% if (setting_so_onepagecheckout_layout_setting[_status|first ~ '_status'] is defined and setting_so_onepagecheckout_layout_setting[_status[0]~'_status'] == 1) %}
                                <div class="radio">
                                    <label>
                                        {% if (quote['code'] == code or not code or setting_so_onepagecheckout_layout_setting['so_onepagecheckout_default_shipping'] == _status[0]) %}
                                            {% set code = quote['code'] %}
                                            <input type="radio" name="shipping_method" value="{{ quote['code'] }}" checked="checked"/>
                                        {% else %}
                                            <input type="radio" name="shipping_method" value="{{ quote['code'] }}"/>
                                        {% endif %}
                                        {{ quote['title'] }} - {{ quote['text'] }}
                                    </label>
                                </div>
                            {% endif %}
                        {% endfor %}
                    {% else %}
                        <div class="alert alert-danger">{{ shipping_method['error'] }}</div>
                    {% endif %}
                {% endfor %}
            </div>
        {% endif %}
    </div>
{% endif %}