{{ header }}
<div class="container">
    <ul class="breadcrumb">
        {% for breadcrumb in breadcrumbs %}
            <li><a href="{{ breadcrumb['href'] }}">{{ breadcrumb['text'] }}</a></li>
        {% endfor %}
    </ul>
    {% if (error_warning) %}
        <div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
            <button type="button" class="close" data-dismiss="alert">&times;</button>
        </div>
    {% endif %}
    <div class="row">
        {{ column_left }}
        {% if (column_left and column_right) %}
            {% set class = 'col-sm-6' %}
        {% elseif (column_left or column_right) %}
            {% set class = 'col-sm-9' %}
        {% else %}
            {% set class = 'col-sm-12' %}
        {% endif %}
        <div id="content" class="{{ class }}">
            {{ content_top }}
            <h1>{{ heading_title }}</h1>
            <div class="so-onepagecheckout layout1 {% if (is_logged_in) %} is_customer{% endif %}">
                <div class="col-left col-lg-6 col-md-6 col-sm-6 col-xs-12">
                    {% if (not is_logged_in) %}
                        <div class="checkout-content login-box">
                            <h2 class="secondary-title"><i class="fa fa-user"></i>{{ text_checkout_create_account_login }}</h2>
                            <div class="box-inner">
                                {% if (setting_so_onepagecheckout_layout_setting['so_onepagecheckout_register_checkout'] == 1) %}
                                    <div class="radio">
                                        <label><input type="radio" name="account" value="register" {% if (default_auth == 'register') %} checked="checked" {% endif %}>{{ text_register }}</label>
                                    </div>
                                {% endif %}
                                {% if (allow_guest_checkout and setting_so_onepagecheckout_layout_setting['so_onepagecheckout_guest_checkout'] == 1) %}
                                    <div class="radio">
                                        <label><input type="radio" name="account" value="guest" {% if (default_auth == 'guest') %} checked="checked" {% endif %} />{{ text_guest }}</label>
                                    </div>
                                {% endif %}
                                {% if (setting_so_onepagecheckout_layout_setting['so_onepagecheckout_enable_login'] == 1) %}
                                    <div class="radio">
                                        <label><input type="radio" name="account" value="login" {% if (default_auth == 'login') %} checked="checked" {% endif %}>{{ text_returning_customer }}</label>
                                    </div>
                                {% endif %}
                            </div>
                        </div>
                    {% endif %}

                    {% if (not is_logged_in and setting_so_onepagecheckout_layout_setting['so_onepagecheckout_enable_login'] == 1) %}
                        <div class="checkout-content checkout-login">
                            <fieldset>
                                <h2 class="secondary-title"><i class="fa fa-unlock"></i>{{ text_returning_customer }}</h2>
                                <div class="box-inner">
                                    <div class="form-group">
                                        <input type="text" name="login_email" value="" placeholder="{{ entry_email }}" id="input-login_email" class="form-control"/>
                                    </div>
                                    <div class="form-group">
                                        <input type="password" name="login_password" value="" placeholder="{{ entry_password }}" id="input-login_password" class="form-control"/>
                                        <a href="{{ forgotten }}">{{ text_forgotten }}</a>
                                    </div>
                                    <div class="form-group">
                                        <input type="button" value="{{ button_login }}" id="button-login" data-loading-text="{{ text_loading }}" class="btn-primary button"/>
                                    </div>
                                </div>
                            </fieldset>
                        </div>
                    {% endif %}
                    {{ register_form }}
                </div>

                <div class="col-right col-lg-6 col-md-6 col-sm-6 col-xs-12">
                    <section class="section-left">
                        {% if (is_logged_in) %}
                            {{ payment_address }}
                            {% if (is_shipping_required) %}
                                {{ shipping_address }}
                            {% endif %}
                        {% endif %}
                        <div class="ship-payment">
                            {% if (is_shipping_required) %}
                                {{ shipping_methods }}
                            {% endif %}
                            {{ payment_methods }}
                        </div>
                    </section>
                    <section class="section-right">
                        <div id="coupon_voucher_reward">
                            {{ coupon_voucher_reward }}
                        </div>
                        {{ cart }}
                        <div class="checkout-content confirm-section">
                            {% if (setting_so_onepagecheckout_layout_setting['comment_status']) %}
                                <div>
                                    <h2 class="secondary-title"><i class="fa fa-comment"></i>{{ text_comments }}</h2>
                                    <label>
                                        <textarea name="comment" rows="8" class="form-control {% if (setting_so_onepagecheckout_layout_setting['require_comment_status']) %} requried{% endif %}">{{ comment }}</textarea>
                                    </label>
                                </div>
                            {% endif %}
                            {% if (entry_newsletter and setting_so_onepagecheckout_layout_setting['show_newsletter']) %}
                                <div class="checkbox check-newsletter">
                                    <label for="newsletter">
                                        <input type="checkbox" name="newsletter" value="1" id="newsletter"/>
                                        {{ entry_newsletter }}
                                    </label>
                                </div>
                            {% endif %}
                            {% if (text_privacy and setting_so_onepagecheckout_layout_setting['show_privacy']) %}
                                <div class="checkbox check-privacy">
                                    <label>
                                        <input type="checkbox" name="privacy" value="1"/>
                                        {{ text_privacy }}
                                    </label>
                                </div>
                            {% endif %}

                            {% if (text_agree and setting_so_onepagecheckout_layout_setting['show_term']) %}
                                <div class="checkbox check-terms">
                                    <label>
                                        <input type="checkbox" name="agree" value="1"/>
                                        {{ text_agree }}
                                    </label>
                                </div>
                            {% endif %}
                            <div class="confirm-order">
                                <button id="so-checkout-confirm-button" data-loading-text="{{ text_loading }}" class="btn btn-primary confirm-button">{{ text_confirm_order }}</button>
                            </div>
                        </div>
                    </section>
                </div>
            </div>
            {{ content_bottom }}
        </div>
    </div>
</div>
{{ footer }}