{extends file="layout.tpl"}

{* Security *}
{block name="no-return-functions" prepend}
    {check_auth role="CUSTOMER" login_tpl="login"}
{/block}

{* Body Class *}
{block name="body-class"}page-order-payment{/block}

{* Breadcrumb *}
{block name='no-return-functions' append}
    {$breadcrumbs = [
        ['title' => {intl l="Cart"}, 'url'=>{url path="/cart"}],
        ['title' => {intl l="Secure Payment"}, 'url'=>{url path="/order/pay"}]
    ]}
{/block}


{block name="main-content"}
    <div class="main">
        <article class="col-main clearfix" role="main" aria-labelledby="main-label">

            <h1 id="main-label" class="page-header">{intl l="Your Cart"}</h1>

            {include file="misc/checkout-progress.tpl" step="last"}

            {loop type="order" name="placed-order" id=$placed_order_id}
            {ifhook rel="order-placed.body"}
                {hook name="order-placed.body" module="$PAYMENT_MODULE"}
            {/ifhook}
            {elsehook rel="order-placed.body"}
                <div id="payment-success" class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title">{intl l="You choose"} : <span class="payment-method label label-primary">{loop name="payment-module" type="module" id=$PAYMENT_MODULE}{$TITLE}{/loop}</span></h3>
                    </div>
                    <div class="panel-body">
                        <h3>{intl l="Thank you for the trust you place in us."}</h3>
                        <p>{intl l="A summary of your order has been sent to the following address"} : {customer attr="email"}</p>
                        <p>{intl l="Your order will be confirmed by us upon receipt of your payment."}</p>
                        <dl class="dl-horizontal">
                            <dt>{intl l="Order number"} : </dt>
                            <dd>{$REF}</dd>
                            <dt>{intl l="Date"} : </dt>
                            <dd>{format_date date=$CREATE_DATE output="date"}</dd>
                            <dt>{intl l="Total"} : </dt>
                            <dd>{format_money number={$TOTAL_TAXED_AMOUNT} currency_id=$CURRENCY}</dd>
                        </dl>

                        {block name='additional-payment-info'}{/block}

                        {hook name="order-placed.additional-payment-info" module="$PAYMENT_MODULE" placed_order_id=$placed_order_id}
                    </div>
                </div>
            {/elsehook}
            {/loop}

            <a href="{navigate to="index"}" role="button" class="btn btn-default">{intl l="Go home"}</a>

        </article>

    </div>
{/block}


{block name="stylesheet"}
{hook name="order-placed.stylesheet"}
{/block}

{block name="after-javascript-include"}
{hook name="order-placed.after-javascript-include"}
{/block}

{block name="javascript-initialization"}
{hook name="order-placed.javascript-initialization"}
{/block}
