|
Server : Apache/2.4.41 (Ubuntu) System : Linux vmi1525618.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64 User : www-data ( 33) PHP Version : 8.2.12 Disable Function : NONE Directory : /var/www/easysfm.edukrypt.in/storage/framework/views/ |
Upload File : |
<?php $__env->startSection('content'); ?>
<div class="main-wrapper scrollspy-container">
<div class="breadcrumb-wrapper">
<div class="container">
<h1 class="page-title">Shopping Cart</h1>
<div class="row">
<div class="col-xs-12 col-sm-8">
<ol class="breadcrumb">
<li><a href="#">Home</a></li>
<li class="active">Cart</li>
</ol>
</div>
<?php echo $__env->make('includes.breadcrum', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
</div>
</div>
</div>
<div class="equal-content-sidebar-by-gridLex right-sidebar">
<div class="container">
<?php if( $carts != null): ?>
<div class="GridLex-grid-noGutter-equalHeight">
<div class="GridLex-col-9_sm-8_xs-12_xss-12">
<div class="content-wrapper">
<?php if (isset($component)) { $__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74 = $component; } ?>
<?php $component = $__env->getContainer()->make(App\View\Components\FlashMessage::class, []); ?>
<?php $component->withName('flashMessage'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74)): ?>
<?php $component = $__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74; ?>
<?php unset($__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74); ?>
<?php endif; ?>
<?php
$grandTotal = 0;
$mrpTotal = 0;
$discountPercent = 0;
$couponApplyName="";
$couponApplyStatus = "no";
$couponDiscount = 0;
?>
<div class="blog-item">
<?php $__currentLoopData = $carts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cart): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php
$priceAfterdiscount = ($cart['price']*$cart['discount_percnt'])/100;
$chooseDiscountPrice = ($cart['max_discount']>$priceAfterdiscount)?$cart['max_discount']:$priceAfterdiscount;
$finalProductPrice = round($cart['price']- $chooseDiscountPrice);
if($cart['coupon_apply_status'] == 'yes')
{
$finalProductPrice = $finalProductPrice - $cart['coupon_discount_amount'];
$couponApplyStatus = "yes";
$couponApplyName = $cart['coupon_name'];
}
$grandTotal +=$finalProductPrice;
$mrpTotal +=$cart['price'];
if($mrpTotal>0){
$discountPercent = round(((($mrpTotal-$grandTotal)/$mrpTotal)*100));
}
// exit;
?>
<div style="border:1px solid #f1f1f1; padding: 10px;" class="teacher-item-list-02 clearfix">
<div class="row gap-20">
<div class="col-xs-12 col-sm-3 col-md-2">
<img src="<?php echo e(asset('public/uploads/products/').'/'.$cart['image']); ?>" alt="Image" />
</div>
<div class="col-xs-12 col-sm-6 col-md-7">
<div class="content">
<h5 style="margin-bottom:0px"><a href="javascript:;"><?php echo e($cart['name']); ?></a></h5>
<p class="short-info">
<?php echo '<b>Mode</b>: '. ucfirst(str_replace('_',' ',$cart['mode'])); ?> |
<?php echo '<b>Duration</b>: '.$cart['duration'].' days'; ?> |
<?php echo '<b>Views</b>: '.$cart['views']; ?> <br>
<?php echo e('By '.$cart['teacher']); ?>
</p>
</div>
</div>
<div class="col-xs-12 col-sm-3 col-md-1">
<a class="text-danger" href="<?php echo e(asset('remove-cart/'.$cart['productId'])); ?>">Remove</a>
</div>
<div class="col-xs-12 col-sm-3 col-md-2">
<h5 style="margin-bottom: 0px" class="pull-right">
<a href="javascript:;">
<i class="fa fa-inr"></i>
<?php echo e($finalProductPrice); ?> <i class="fa fa-tag"></i>
</a>
</h5>
<div class="clearfix"></div>
<a class="pull-right" style="margin-right:18px;text-decoration: line-through;" href="javascript:;">
<i style="text-decoration: line-through" class="fa fa-inr"></i><?php echo e($cart['price']); ?>
</a>
</div>
</div>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
</div>
</div>
<div class="GridLex-col-3_sm-4_xs-12_xss-12">
<aside class="sidebar-wrapper">
<h4 style="margin-bottom:0px;">Total:</h4>
<h3 style="color: black; font-weight: bold; margin-top:0px; margin-bottom:0px;"><i class="fa fa-inr fa-1x"></i> <?php echo e($grandTotal); ?></h3>
<h5 style="color:gray; margin-top:0px;margin-bottom:0px; text-decoration: line-through;">
<i class="fa fa-inr" style="text-decoration: line-through;"></i><?php echo e($mrpTotal); ?>
</h5>
<h5 style="margin-top:0px;color:gray;">
<?php echo e($discountPercent.'% off'); ?>
</h5>
<?php if(empty(Session::get('login_data')['id'])): ?>
<a href="<?php echo e(asset('sign-in')); ?>" class="btn btn-primary btn-lg" style="width: 100%;border-radius: 0px;">Sign In</a>
<?php else: ?>
<a href="<?php echo e(asset('checkout')); ?>" class="btn btn-primary btn-lg" style="width: 100%;border-radius: 0px;" type="submit">Checkout</a>
<?php endif; ?>
<hr>
<form method="post" action="<?php echo e(asset('apply-promocode')); ?>">
<?php echo csrf_field(); ?>
<div class="form-group">
<div class="row">
<div class="col-md-12">
<input <?php echo e(($couponApplyStatus == 'yes')?'readonly':''); ?> type="text" style="vertical-align:middle;text-transform:uppercase;" value="<?php echo e($couponApplyName); ?>" name="coupon" class="form-control" placeholder="Apply Coupon Code" />
</div>
<div class="col-md-12">
<?php if($couponApplyStatus == 'yes'): ?>
<a href="<?php echo e(asset('/remove-promocode')); ?>" style="vertical-align:middle;width: 100%;border-radius: 0px;" type="submit" class="btn btn-danger btn-sm" >Remove applied code</a>
<?php else: ?>
<button style="vertical-align:middle;width: 100%;border-radius: 0px;" type="submit" class="btn btn-info btn-sm" >Apply coupon code</button>
<?php endif; ?>
</div>
</div>
</div>
</form>
</aside>
</div>
</div>
<?php else: ?>
<div class="row">
<div class="col-md-6 col-md-offset-3">
<div style="min-height: 200px; margin-top: 80px;">
<center>
<i style="font-size: 100px;" class="fa fa-shopping-cart"></i>
<h4 class="text-center">Your cart is empty. Keep shopping to <span class="text-black-50"><a href="<?php echo e(asset('courses')); ?>">find a course!</a></span></h4>
</center>
</div>
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startPush('footer-script'); ?>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/easysfm.edukrypt.in/resources/views/cart.blade.php ENDPATH**/ ?>