

<?php $__env->startSection('title'); ?>Korpa <?php $__env->stopSection(); ?>
<?php $__env->startSection('description'); ?>Korpa <?php $__env->stopSection(); ?>
<?php $__env->startSection('keywords'); ?>Korpa <?php $__env->stopSection(); ?>
<?php $__env->startSection('h1'); ?>Korpa <?php $__env->stopSection(); ?>
<?php $__env->startSection('breadcumbs'); ?> <?php $__env->stopSection(); ?>

<?php $prices = app('App\Lib\Prices'); ?>

<?php $__env->startSection('content'); ?>
    <section id="maincontent" class="pad">
    <div class="container-fluid">
        <div class="row">
            <div class="col-xs-12">
                <h2>Korpa</h2>
                <hr>
            </div>
        </div>
        <div class="row">
            <div id="cartow">
                <div id="cartiw">
                <div class="col-md-3 col-lg-2  cart-side" id="leftcol">
                    <a href="<?php echo e(locRoute('contact')); ?>"><img class="cart-help-v" src="/assets/img/<?php echo e(app()->getLocale()); ?>-cart-help-v.gif" alt="<?php echo e(__('frontside.cart.contactus')); ?>"></a>
                    <a href="<?php echo e(locRoute('contact')); ?>"><img class="cart-help-h" src="/assets/img/<?php echo e(app()->getLocale()); ?>-cart-help-h.gif" alt="<?php echo e(__('frontside.cart.contactus')); ?>"></a>
                </div>
            <?php
                $info = '';
                if(isset($_SESSION['cartactmsg']) && trim($_SESSION['cartactmsg']) != '') {

                    $info = trim($_SESSION['cartactmsg']);
                    $_SESSION['cartactmsg'] = NULL;
                    unset($_SESSION['cartactmsg']);
                }
            ?>
            <div class="col-md-9 col-lg-10" id="maincol">
                <div id="cartinfo"><?php echo e($info); ?></div><!--end cartinfo -->
                <div id="cartwrap">
                <?php if(count($products)): ?>

                    <form action="<?php echo e(locRoute('cart.post')); ?>" method="post" name="cartForm" id="cartForm">

                        <table id="shopping-cart-table" class="data-table cart-table">
                            
                            <thead>
                            <tr class="first last">
                                <th rowspan="1"><?php echo e(__('frontside.cart.remove')); ?></th>
                                <th class="a-center" rowspan="1"><?php echo e(__('frontside.cart.image')); ?></th>
                                <th rowspan="1"><span class="nobr"><?php echo e(__('frontside.cart.product')); ?></span></th>
                                <th colspan="1" class="a-center"><span class="nobr"><?php echo e(__('frontside.cart.price')); ?></span></th>
                                <th class="a-center" rowspan="1"><?php echo e(__('frontside.cart.quantity')); ?></th>
                                <th colspan="1" class="a-center"><?php echo e(__('frontside.cart.subtotal')); ?></th>
                            </tr>
                            </thead>
                            <tbody>

                            <?php $total = 0; ?>

                    <?php $__currentLoopData = $products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $p): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                        <?php
                            $prodid = $p->prod_id;
                            // Ful name
                            $fullname = strtoupper($p->brand_name).' '.ucfirst($p->prod_name);

                            // Link
                            $link = url($p->slug);

                            // Image
                            $imgpath = public_path($p->prod_timg);
                            $imgsrc = (file_exists($imgpath) && is_readable($imgpath)) ? $p->prod_timg : config('images.no_image_paths.t');

                            $price = $prices->getPrice($p); //$p->sc_price;
                            $qty = $p->sc_qty;
                            $subtotal = $price*$qty;

                            $total = $total+$subtotal;

                        ?>




                        <tr class="cartitem first last odd">
                            <td class="a-center">
                                <a href="<?php echo e(locRoute('cart.remove', ['ind' => $prodid])); ?>" rel="nofollow" style="color:#333; text-decoration: none;">
                                    <i class="glyphicon glyphicon-trash"></i>
                                    <span class="c-info"> <?php echo e(__('frontside.cart.remove')); ?></span>
                                </a>
                            </td>
                            <td class="prod-img" colspan="">
                                <a href="<?php echo e($link); ?>">
                                <img width="90" height="90" border="0" alt="<?php echo e($fullname); ?>" src="<?php echo e(asset($imgsrc)); ?>">
                                </a>
                            </td>
                            <td>
                                <input name="pid[]" type="hidden" value="<?php echo e($prodid); ?>">
                                <span class="product-name">
                                  <a href="<?php echo e($link); ?>"><?php echo e($fullname); ?></a>
                                  </span>
                                            </td>
                                            <td class="a-right">
                                  <span class="cart-price">
                                  <span class="cprice"><span class="c-info"><?php echo e(__('frontside.cart.price')); ?>: </span>
                                  <span data-price="<?php echo e($price); ?>" class="item-price"><?php echo e($prices::formatPrice($price)); ?></span> </span>
                                  </span>
                                            </td>
                                            <td class="a-center">
                                                <span class="c-info"><?php echo e(__('frontside.cart.quantity')); ?>: </span>
                                                <input maxlength="12" class="input-text qty" title="Qty" size="4" value="<?php echo e($qty); ?>" name="pqty[]" autocomplete="off">
                                            </td>
                                            <td class="a-right last">
                                  <span class="cart-price">
                                  <span class="cprice"><span class="c-info"><?php echo e(__('frontside.cart.subtotal')); ?>: </span><span class="item-stot"><?php echo e($prices::formatPrice($subtotal)); ?></span> </span>
                                  </span>
                            </td>
                        </tr>


                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                            </tbody>
                        <tfoot>
                        <tr class="first">
                            <td class="a-right" colspan="5"><label><?php echo e(__('frontside.cart.total')); ?></label></td>
                            <td class="a-right gt" colspan="6">
                              <span class="cart-price">
                              <span class="cprice"><span class="c-info"><?php echo e(__('frontside.cart.total')); ?>: </span><span id="grandtotal"><?php echo e($prices::formatPrice($total)); ?></span> </span>
                              </span>
                            </td>
                        </tr>
                        </tfoot>
                    </table>

                        <div class="row cartbtns">
                            <div class="col-xs-6 a-left"><a href="<?php echo e(url(tr_url('/'))); ?>" class="btn btn-default"><?php echo e(__('frontside.cart.continue_shopping')); ?></a></div>
                            <div class="col-xs-6 a-right"><a href="<?php echo e(url(tr_url('checkout'))); ?>" id="make-order" class="btn btn-default"><?php echo e(__('frontside.cart.make_order')); ?></a>
                            </div>
                            <br clear="all" />
                        </div>

                    </form>
                <?php else: ?>
                    <div class="text-center">
                        <br /><br /><br /><?php echo e(__('frontside.cart.cart_empty')); ?><br /><br /><a href="/"><?php echo e(__('frontside.cart.go_to_homepage')); ?></a>
                    </div>
                <?php endif; ?>
                </div>
            </div><!-- / #main -->
                </div>
            </div>
        </div><!-- / .row -->
    </div><!-- /.container-fluid -->
    </section>
<?php $__env->stopSection(); ?>

<?php $__env->startPush('css'); ?>
    <link rel="stylesheet" href="<?php echo e(asset('assets/css/jquery.bootstrap-touchspin.css')); ?>">
    <link rel="stylesheet" href="<?php echo e(asset('assets/css/cart.css')); ?>">
<?php $__env->stopPush(); ?>

<?php $__env->startPush('scripts'); ?>
    <script src="<?php echo e(asset('assets/js/jquery.bootstrap-touchspin.js')); ?>"></script>
    <script src="<?php echo e(asset('assets/js/jquery.number.min.js')); ?>"></script>
    <script src="<?php echo e(asset('assets/js/cart.js')); ?>"></script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('layouts.frontend', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>