<?php /* Smarty version Smarty-3.1.19, created on 2024-06-19 06:16:08
         compiled from "/home/wel10000/cbdkiraly.hu/modules/paypal/views/templates/front/order-confirmation-plus.tpl" */ ?>
<?php /*%%SmartyHeaderCode:56520966866725b88e82bc1-21927988%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '929ed46d07683df7fe1832bc4cf4565c31d186d2' => 
    array (
      0 => '/home/wel10000/cbdkiraly.hu/modules/paypal/views/templates/front/order-confirmation-plus.tpl',
      1 => 1600257518,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '56520966866725b88e82bc1-21927988',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'use_mobile' => 0,
    'base_dir' => 0,
    'paypal_cart_summary' => 0,
    'state' => 0,
    'totalAmount' => 0,
    'PayerID' => 0,
    'paymentId' => 0,
    'id_cart' => 0,
    'linkSubmitPlus' => 0,
    'is_guest' => 0,
    'link' => 0,
    'order_reference' => 0,
    'img_dir' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.19',
  'unifunc' => 'content_66725b88ef84c2_82321685',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_66725b88ef84c2_82321685')) {function content_66725b88ef84c2_82321685($_smarty_tpl) {?>

<?php if (@constant('_PS_VERSION_')<1.5&&isset($_smarty_tpl->tpl_vars['use_mobile']->value)&&$_smarty_tpl->tpl_vars['use_mobile']->value) {?>
    <?php echo $_smarty_tpl->getSubTemplate (((string)$_smarty_tpl->tpl_vars['tpl_dir']->value)."./modules/paypal/views/templates/front/order-confirmation-plus.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<?php } else { ?>
<?php $_smarty_tpl->_capture_stack[0][] = array('path', null, null); ob_start(); ?><?php echo smartyTranslate(array('s'=>'Order confirmation','mod'=>'paypal'),$_smarty_tpl);?>
<?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
if (!empty($_capture_buffer)) {
 if (isset($_capture_assign)) $_smarty_tpl->assign($_capture_assign, ob_get_contents());
 if (isset( $_capture_append)) $_smarty_tpl->append( $_capture_append, ob_get_contents());
 Smarty::$_smarty_vars['capture'][$_capture_buffer]=ob_get_clean();
} else $_smarty_tpl->capture_error();?>
<?php if (@constant('_PS_VERSION_')<1.6) {?>
    <?php echo $_smarty_tpl->getSubTemplate (((string)$_smarty_tpl->tpl_vars['tpl_dir']->value)."./breadcrumb.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<?php }?>
<h1><?php echo smartyTranslate(array('s'=>'Order confirmation','mod'=>'paypal'),$_smarty_tpl);?>
</h1>

<?php $_smarty_tpl->tpl_vars['current_step'] = new Smarty_variable('payment', null, 0);?>
<?php echo $_smarty_tpl->getSubTemplate (((string)$_smarty_tpl->tpl_vars['tpl_dir']->value)."./order-steps.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>


<?php echo $_smarty_tpl->getSubTemplate (((string)$_smarty_tpl->tpl_vars['tpl_dir']->value)."./errors.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>


<?php if (@constant('_PS_VERSION_')<1.5) {?>
	<link rel="stylesheet" href="<?php echo mb_convert_encoding(htmlspecialchars($_smarty_tpl->tpl_vars['base_dir']->value, ENT_QUOTES, 'UTF-8', true), "HTML-ENTITIES", 'UTF-8');?>
modules/paypal/views/css/paypal_1_4.css">
<?php }?>

<?php echo $_smarty_tpl->tpl_vars['paypal_cart_summary']->value;?>

<div class="inforeturn"></div>
<div class="confirm_PPP">
    

    <?php if ($_smarty_tpl->tpl_vars['state']->value=='approved'||$_smarty_tpl->tpl_vars['state']->value=='created') {?>
        <h2><?php echo smartyTranslate(array('s'=>'Order Confirmation ?','mod'=>'paypal'),$_smarty_tpl);?>
</h2>
        <p><?php echo smartyTranslate(array('s'=>'Do you want to confirm your order for total amount of ','mod'=>'paypal'),$_smarty_tpl);?>
<?php echo mb_convert_encoding(htmlspecialchars($_smarty_tpl->tpl_vars['totalAmount']->value, ENT_QUOTES, 'UTF-8', true), "HTML-ENTITIES", 'UTF-8');?>
</p>
        <form method="POST" action="" id="formConfirm">
            <input type="hidden" name="payerID" value="<?php echo mb_convert_encoding(htmlspecialchars($_smarty_tpl->tpl_vars['PayerID']->value, ENT_QUOTES, 'UTF-8', true), "HTML-ENTITIES", 'UTF-8');?>
" />
            <input type="hidden" name="paymentId" value="<?php echo mb_convert_encoding(htmlspecialchars($_smarty_tpl->tpl_vars['paymentId']->value, ENT_QUOTES, 'UTF-8', true), "HTML-ENTITIES", 'UTF-8');?>
" />
            <input type="hidden" name="id_cart" value="<?php echo mb_convert_encoding(htmlspecialchars($_smarty_tpl->tpl_vars['id_cart']->value, ENT_QUOTES, 'UTF-8', true), "HTML-ENTITIES", 'UTF-8');?>
" />

            <input id="cancel" class="<?php if (@constant('_PS_VERSION_')<1.5) {?>button_large<?php } else { ?>button btn btn-large<?php }?>" type="submit" name="confirmCancel" value="<?php echo smartyTranslate(array('s'=>'Cancel your order','mod'=>'paypal'),$_smarty_tpl);?>
" />
            <input id="confirm" class="<?php if (@constant('_PS_VERSION_')<1.5) {?>button_large<?php } else { ?>button btn btn-large<?php }?>" type="submit" name="confirmPayment" value="<?php echo smartyTranslate(array('s'=>'Confirm your payment','mod'=>'paypal'),$_smarty_tpl);?>
" />
        </form>
        <script type="text/javascript">

            $(document).ready(function () {


                $("#formConfirm input[type=submit]").click(function () {
                    $("input[type=submit]", $(this).parents("form")).removeAttr("clicked");
                    $(this).attr("clicked", "true");
                });

                $('#formConfirm').submit(function () {

                    var form = $('#formConfirm');
                    var nameSubmit = $("input[type=submit][clicked=true]").attr('name');
					
                    $('#cancel').attr('disabled','disabled');
                    $('#confirm').attr('disabled','disabled');

                    $.ajax({
                        url: '<?php echo addslashes($_smarty_tpl->tpl_vars['linkSubmitPlus']->value);?>
',
                        type: 'POST',
                        data: form.serialize() + '&ajax=true&submit=' + nameSubmit,
                        success: function (data) {

                            var json = JSON.parse(data);

                            $('.paypal-error').remove();

                            if (typeof json.success != 'undefined') {
                                $('.inforeturn').html('<p class="alert alert-success">' + json.success + '</p>');
                            }

                            if (typeof json.error != 'undefined') {
                                $('.inforeturn').html('<p class="alert alert-warning paypal-error">' + json.error + '</p>');
                            }
                        }
                    });

                    return false;
                });

            });

        </script>
        <div style="margin-top:15px;">
            <?php if (isset($_smarty_tpl->tpl_vars['is_guest']->value)&&$_smarty_tpl->tpl_vars['is_guest']->value) {?>
                <a href="<?php echo mb_convert_encoding(htmlspecialchars($_smarty_tpl->tpl_vars['link']->value->getPageLink('guest-tracking.php',true), ENT_QUOTES, 'UTF-8', true), "HTML-ENTITIES", 'UTF-8');?>
?id_order=<?php echo mb_convert_encoding(htmlspecialchars($_smarty_tpl->tpl_vars['order_reference']->value, ENT_QUOTES, 'UTF-8', true), "HTML-ENTITIES", 'UTF-8');?>
" title="<?php echo smartyTranslate(array('s'=>'Follow my order','mod'=>'paypal'),$_smarty_tpl);?>
" data-ajax="false">
                    <?php if (@constant('_PS_VERSION_')<1.6) {?>
                        <img src="<?php echo mb_convert_encoding(htmlspecialchars($_smarty_tpl->tpl_vars['img_dir']->value, ENT_QUOTES, 'UTF-8', true), "HTML-ENTITIES", 'UTF-8');?>
icon/order.gif" alt="<?php echo smartyTranslate(array('s'=>'Follow my order','mod'=>'paypal'),$_smarty_tpl);?>
" class="icon" />
                    <?php } else { ?>
                        <i class="icon-chevron-left"></i>
                    <?php }?>
                </a>
                <a href="<?php echo mb_convert_encoding(htmlspecialchars($_smarty_tpl->tpl_vars['link']->value->getPageLink('guest-tracking.php',true), ENT_QUOTES, 'UTF-8', true), "HTML-ENTITIES", 'UTF-8');?>
?id_order=<?php echo mb_convert_encoding(htmlspecialchars($_smarty_tpl->tpl_vars['order_reference']->value, ENT_QUOTES, 'UTF-8', true), "HTML-ENTITIES", 'UTF-8');?>
" title="<?php echo smartyTranslate(array('s'=>'Follow my order','mod'=>'paypal'),$_smarty_tpl);?>
" data-ajax="false"><?php echo smartyTranslate(array('s'=>'Follow my order','mod'=>'paypal'),$_smarty_tpl);?>
</a>
            <?php } else { ?>
                <a href="<?php echo mb_convert_encoding(htmlspecialchars($_smarty_tpl->tpl_vars['link']->value->getPageLink('history.php',true), ENT_QUOTES, 'UTF-8', true), "HTML-ENTITIES", 'UTF-8');?>
" title="<?php echo smartyTranslate(array('s'=>'Back to orders','mod'=>'paypal'),$_smarty_tpl);?>
" data-ajax="false"><?php if (@constant('_PS_VERSION_')<1.6) {?>
                    <img src="<?php echo mb_convert_encoding(htmlspecialchars($_smarty_tpl->tpl_vars['img_dir']->value, ENT_QUOTES, 'UTF-8', true), "HTML-ENTITIES", 'UTF-8');?>
icon/order.gif" alt="<?php echo smartyTranslate(array('s'=>'Follow my order','mod'=>'paypal'),$_smarty_tpl);?>
" class="icon" />
                <?php } else { ?>
                    <i class="icon-chevron-left"></i>
                <?php }?></a>
            <a href="<?php echo mb_convert_encoding(htmlspecialchars($_smarty_tpl->tpl_vars['link']->value->getPageLink('history.php',true), ENT_QUOTES, 'UTF-8', true), "HTML-ENTITIES", 'UTF-8');?>
" title="<?php echo smartyTranslate(array('s'=>'Back to orders','mod'=>'paypal'),$_smarty_tpl);?>
" data-ajax="false"><?php echo smartyTranslate(array('s'=>'Back to orders','mod'=>'paypal'),$_smarty_tpl);?>
</a>
            <?php }?>
        </div>

<?php } elseif ($_smarty_tpl->tpl_vars['state']->value=='failed'||$_smarty_tpl->tpl_vars['state']->value=='expired') {?>
    <p class="alert alert-warning paypal-error"><?php echo smartyTranslate(array('s'=>'An error occured during your payment','mod'=>'paypal'),$_smarty_tpl);?>
</p>

<?php } elseif ($_smarty_tpl->tpl_vars['state']->value=='canceled') {?>
    <p class="alert alert-warning paypal-error"><?php echo smartyTranslate(array('s'=>'Your order has been canceled','mod'=>'paypal'),$_smarty_tpl);?>
</p>
<?php }?>
</div>
<?php }?>
<?php }} ?>
