<?php $__env->startSection('title', 'Pedido finalizado'); ?>

<?php $__env->startSection('content'); ?>
    <article id="checkout">
        <div class="breadcrumb">
            <div class="container d-flex align-items-center">
                <a href="<?php echo e(url('/')); ?>">Inicio</a>
                <span><?php echo $__env->yieldContent('title'); ?></span>
            </div>
        </div>
        <section>
            <div class="container">
                <?php if($order->success): ?>
                    <h2 class="text-center">Gracias por tu compra</h2>
                    <div class="text-center mt-5">
                        <a href="<?php echo e(url('cuenta')); ?>" class="btn">
                            <span>Ir a Mi cuenta</span>
                            <i class="far fa-arrow-right"></i>
                        </a>
                    </div>
                <?php else: ?>
                    <h2 class="text-center">No se ha podido finalizar tu compra</h2>
                    <p class="text-center">Por favor, intentá de nuevo</p>
                    <div class="text-center mt-5">
                        <a href="<?php echo e(url('carrito')); ?>" class="btn">
                            <span>Ir a Mi carrito</span>
                            <i class="far fa-arrow-right"></i>
                        </a>
                    </div>
                <?php endif; ?>
            </div>
        </section>
    </article>
<?php $__env->stopSection(); ?>

<?php $__env->startPush('scripts'); ?>
    <script>
      $(function() {
        $('#toggleShipping').on('change', function() {
          if($(this).is(':checked')) {
            $('.optional').removeAttr('disabled');
            $('.optional').parents('.form-group').removeClass('d-none');
          } else {
            $('.optional').attr('disabled', 'disabled');
            $('.optional').parents('.form-group').addClass('d-none');
          }
        });

        $('.shipping_method').on('change', function() {
          $('#shipping').text($(this).data('formatted-price'));
          $('#total').text((parseInt($('#total').data('value')) + parseInt($(this).data('price'))).toLocaleString('es-ES', {
            maximumFractionDigits: 0
          }));
        });
      });
    </script>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('layouts.frontend', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/bgreen/test.bgreen.com.py/resources/views/templates/finish.blade.php ENDPATH**/ ?>