<div id="xt_cart_popup" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="xt_cart_popup_label" data-ajax-url="{link page='cart' paction='index' conn=SSL}">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="xt_cart_popup_label">{txt key=TEXT_CART}</h4>
            </div>
            <div class="modal-body">
                Loading...
            </div>
            {if $message}
            <div class="modal-footer clearfix">
                {$message}
            </div>
            {/if}
            <div class="modal-footer clearfix">
                <button type="button" class="btn btn-primary pull-left" data-dismiss="modal">{txt key=BUTTON_CONTINUE_SHOPPING}</button>
                <a type="button" class="btn btn-success" href="{link page='checkout' paction='shipping' conn=SSL}">{txt key=BUTTON_CHECKOUT}</a>
                <a type="button" class="btn btn-success" href="{link page='cart' paction='index' conn=SSL}">{txt key=TEXT_CART}</a>
            </div>
        </div>
    </div>
</div>

{* UPDATE: add document.ready for preventing bugs *}
{literal}
<script>
    $(function(){
        // get cart content with jquery ajax load
        $('#xt_cart_popup').on('show.bs.modal', function () {
            var m = $(this)
            var ajaxUrl = m.data('ajax-url') + ' #cart-table';

            m.find('.modal-body').load(ajaxUrl, function() {
                $(this).find('button, input, .form-inline, .btn, .btn-group').hide()
            });
        });
    });
</script>
{/literal}
