<div class="cartpage-title clearfix">
    <h1>
        <?php echo $this->__('Order submitted successfully');?>
    </h1>
    <?php echo $this->getChildHtml('shopcar_guid');?>
</div>
<?php echo $this->getMessagesBlock()->getGroupedHtml(); ?>
<div class="onepage_success">
    <b class="icon icon_msg4 icon_msg4_right"></b>

    <h2><?php echo $this->__('Thank you for your patronage! Your order has been successfully submitted.');?></h2>
    <?php $order = $this->getOrder()?>
    <p><?php
        echo $this->__('You will receive an order confirmation e-mail, the confirmation email will be sent to your mailbox') . '：' .
             $order->getData('customer_email');
        ?></p>

    <div class="wrap_info">

        <span><?php echo $this->__('订单编号');?> ：
			<strong>
                <?php if ($this->canPrint()) : ?>
                <?php echo $this->__('<a href="%s">%s</a>', $this->getViewOrderUrl(), $this->getOrderId()) ?>
                <?php else : ?>
                <?php echo $this->__('%s', $this->getOrderId()) ?>
                <?php endif;?>
            </strong>
		</span><br/>
        <?php echo $this->__('应付金额') . '：' . $order->formatPrice($order->getGrandTotal()) ?>
        <br/>
        <?php echo $this->__('付款方式') . '：' . $order->getPayment()->getMethodInstance()->getTitle() ?>
    </div>
    <div class="wrap_btn">
        <?php if ($this->canOnlinePayment()) : ?>
        <a href="<?php echo $order->getPayment()->getMethodInstance()->getOnlinePaymentUrl() ?>" target="_blank"
           class="btn_strong btn_strong_big pay"><?php echo $this->__('To pay');?></a>
        <?php endif;?>
        <?php if ($this->canPrint()) : ?>
        &nbsp;<?php echo $this->__('<a href="%s" onclick="this.target=\'_blank\'" class="btn_common ">打印</a> ', $this->getPrintUrl()) ?>
        <?php endif;?></div>
    <?php echo $this->__('You can');?>: <br/>
    <a href="#" onclick="window.location='<?php echo Mage::getUrl();?>'"><?php echo $this->__('Back home');?></a>
    |
    <a href="<?php echo Mage::getUrl('customer/account') ?>"><?php echo $this->__('User Center');?></a>
</div>
    <div class="success-item"><?php echo $this->getChildHtml('item');?></div>
<div id="loadblock" style="display:none;" class="pay_light">

    <div class="note"><?php echo $this->__('Please Pay In New Website And Choose Your Operation');?></div>
    <ul class="form-list">
        <li class="control"><strong><?php echo $this->__('Pay Successfully');?></strong> <a class="reg"  target="_blank" href='<?php echo $this->getReturnUrl();?>'><?php echo $this->__('View Order');?></a>
        </li>
        <li class="control">
            <strong><?php echo $this->__('Pay Unsuccessfully');?></strong> <a class="reg"
                                                                              href='javascript:returnPay()'><?php echo $this->__('Return To Pay');?></a>
        </li>
    </ul>
</div>
<script type="text/javascript">
    //<![CDATA[
    var showDialog = function() {
        $('#loadblock').dialog({width:430, height: 210, modal: true,title:"<?php echo $this->__('Login Payment Website To Pay');?>"});
    }
    $(function() {
        $('.pay').click(function() {
            showDialog();
        });
    });
    function returnPay() {
        $('.ui-dialog-titlebar-close').click();
    }

    //]]>
</script>

