{% if shipping_methods is not empty %}
    {% for code, sm in shipping_methods %}
        {% set title = sm.title is not empty ? sm.title : '' %}
        {% set image = images[code]['image'] %}

        <div class="shipping_method {{ code }}">
            <strong class="title">{{ image is not empty ? '<img class="shipping_method_image" src="'~image~'">' : '' }}{{ title }}</strong>
            {% if sm.quote is not empty %}
                {% for key, quote in sm.quote %}
                    {% set final_code = quote.code is not empty ? quote.code : code %}
                    {% set title_quote = quote.title is not empty ? quote.title : '' %}
                    {% set price_format = quote.text is not empty ? quote.text : '' %}
                    {% set checked = quote.checked %}
                    {% set desc = quote.desc is not empty ? quote.desc : '' %}

                    <div class="radio-input radio">
                        <label for="{{ final_code }}">
                            <input name="shipping_method" onchange="set_shipping_method($(this));" value="{{ final_code }}" id="{{ final_code }}" {{ checked ? 'checked="checked"' : '' }} type="radio"> 
                            <span class="text">{{ title_quote }}</span><span class="price">{{ price_format }}</span>
                            {% if desc is not empty %}
                                <span class="desc">{{ desc }}</span>
                            {% endif %}
                        </label>
                    </div>
                {% endfor %}
            {% elseif sm.error is not empty %}
                <div class="poc_alert poc_alert-warning">{{ sm.error }}</div>
            {% endif %}
        </div>
    {% endfor %}
    {% if method_chossed is not empty %}
        <script type="text/javascript">
            _complete_step('shipping');
        </script>
    {% endif %}
{% else %}
    <div class="poc_alert poc_alert-warning">{{ poc_icon_error }} {{ error_no_shipping }}</div>
    
    <script type="text/javascript">
        _uncomplete_step('shipping');
    </script>
{% endif %}