<?php $__env->startSection('Rcontent'); ?>
<?php
use App\Models\Coins;
use App\Models\SalesDefaultData;
use App\Models\ResturantCartCheckStyle;
$style=ResturantCartCheckStyle::orderBy('id','desc')->first();
$Def=SalesDefaultData::orderBy('id','desc')->first();
$coin=Coins::find($Def->CountryResturantWebsite);
?>


<style>
   .bredcrumb_section.blog_list_page {
 

        background: linear-gradient(to left, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url(<?php echo e(URL::to($style->Cart_Top_Image)); ?>) !important;

    }
    
    .section_title .sub_text {

    color: <?php echo e($style->Cart_Title_Color); ?> !important;
    }
    

  .blog_list_section .blog_left_side .blog_panel{

          background-color: <?php echo e($style->Cart_Box_BG); ?> !important;
          border: <?php echo e($style->Cart_Box_Border); ?> solid 6px !important;
    }
    
    .blog_list_section .blog_left_side .blog_panel .blog_info h2 a{
         color: <?php echo e($style->Cart_Txt_Color); ?> !important;
    }
    
  .text-center{
          color: <?php echo e($style->Cart_Txt_Color); ?> !important;
    }
    
    .action_bar button, .action_bar a{
          background: <?php echo e($style->Cart_Btn_BG); ?> !important;
          color: <?php echo e($style->Cart_Btn_Color); ?> !important;
    }

</style>    



<title><?php echo e(trans('admin.Cart')); ?></title>


    <!-- Bread Crumb Start -->
    <section class="bredcrumb_section blog_list_page">
      <div class="container">
        <div class="section_title text-center" data-aos="fade-up" data-aos-duration="1500">
          <span class="sub_text"><?php echo e(trans('admin.Cart')); ?></span>
        </div>
      </div>
    </section>
    <!-- Bread Crumb End -->

    <!-- Main Blog List Section Start-->


  <?php if($style->Cart_BG_Type == 1): ?>  

    <section class="blog_list_section"  style="background-image: url(<?php echo e(URL::to($style->Cart_BG_Image)); ?>);">
  <?php elseif($style->Cart_BG_Type == 2): ?>

    <section class="blog_list_section" style="background: <?php echo e($style->Cart_BG_Color); ?>;">
<?php elseif($style->Cart_BG_Type == 0): ?>
    <section class="blog_list_section">
 <?php endif; ?>

      <div class="container" style="    max-width: 1800px;">
        <div class="row">
            
            
          <div class="col-lg-8">
            <!-- Blog Left Side -->
              
            <form action="<?php echo e(url('UpdateCartResturant')); ?>" method="post">
                            <?php echo csrf_field(); ?>          
            <div class="blog_left_side">
              <div class="blog_panel" data-aos="fade-up" data-aos-duration="1500">
                  
                   
                  

                         <div class="blog_info">
                            <div class="table-responsive"> 
                <table id="dtHorizontalExample" class="table table-bordered " style="color: <?php echo e($style->Cart_Table_Color); ?>; background: <?php echo e($style->Cart_Table_BG); ?>">
                  <thead>
                    <tr>
                        <th class="text-center"><a>x</a></th>
                        <th style="width: 50px;" class="text-center"><a><?php echo e(trans('admin.Image')); ?></a></th>
                        <th class="text-center"><a><?php echo e(trans('admin.Product_Name')); ?></a></th>
                        <th class="text-center" style="width: 15%;"><a><?php echo e(trans('admin.Qty')); ?></a></th>
                        <th class="text-center"><a><?php echo e(trans('admin.Price')); ?></a></th>
                        <th class="text-center"><a><?php echo e(trans('admin.Total')); ?></a></th>
                      </tr>
                    </thead>
                  <tbody>
                    <?php $__currentLoopData = $Carts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cart): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> 
                        <input type="hidden" name="RowID[]" value="<?php echo e($cart->rowId); ?>">   

                    <tr>
                      <td class="text-center"><a href="<?php echo e(url('DeleteCartResturant/'.$cart->rowId)); ?>"><i class="icofont-trash"></i></a></td>
                      <td>
                
               <div class="img text-center">
                   
             
                   <?php if($cart->options->image != ''): ?>
                    <img src="<?php echo e(URL::to($cart->options->image)); ?>" alt="img" style="width:100%">
                   <?php else: ?>
                   <img src="<?php echo e(asset('RFront/images/title_icon.png')); ?>" alt="img"style="width:100%">
                   <?php endif; ?>
                  </div>

                        </td>
                         <td class="text-center"><a>  <?php echo e(app()->getLocale() == 'ar' ?$cart->name :$cart->options->other_name); ?> 
                             
                            <?php if($cart->options->type == 'Variable_Aggregate'): ?> 
                             (<?php echo e($cart->options->typeName); ?>)
                             <?php endif; ?>
                             </a></td>
                         <td class="text-center"><input type="number"  name="qty[]" value="<?php echo e($cart->qty); ?>" required></td>
                         <td class="text-center"><a><?php echo e($cart->price); ?>  <?php echo e($coin->Symbol); ?></a></td>
                         <td class="text-center"><a><?php echo e($cart->total); ?> <?php echo e($coin->Symbol); ?></a></td>
                  
                      
                      
                      </tr>     
                    
                      <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </tbody>
                  </table>  
                             </div>
      
              </div>
              </div>
                                 <div class="action_bar">
            <button type="submit" class="btn btn_primary" style="width: 100%"><?php echo e(trans('admin.Update')); ?></button>

          </div>  
            </div>
              </form>    
          </div>
            
         
             <div class="col-lg-4">
            <!-- Blog Left Side -->
            <div class="blog_left_side">
                
             <div class="blog_info" style="padding: 10px;"> 
               <div class="action_bar">
                   
                       <form action="<?php echo e(url('UpdateCuponCodeResturant')); ?>" method="post">
                        <?php echo csrf_field(); ?>  
       
                   <div class="row">
                       
                   <div class="col-md-9">
                       
                      <?php if($x == 0): ?>  
              <input type="text" class="form-control" placeholder="<?php echo e(trans('admin.Discount_Code')); ?>" name="code" id="code" style="height: 100%;">
                        <?php else: ?>
                         <input type="text" class="form-control" placeholder="<?php echo e(trans('admin.Discount_Code')); ?>" name="code" id="code" style="height: 100%;" readonly>           
                        <?php endif; ?>   
                       
                       </div>
                        <div class="col-md-3">   
                      <button type="submit" class="btn btn_primary" style="width: 100%;height: 100%;"><i class="icofont-check-circled"></i></button>        
                       </div>
        </div>               
                   </form>  
          </div>
          </div>
                
              <div class="blog_panel" data-aos="fade-up" data-aos-duration="1500">
          
              <div class="blog_info" style="padding: 10px;">
       <h2 class="text-center"><a class="text-center" href="#"><?php echo e(trans('admin.Order_Summary')); ?></a></h2>
           <hr style="background: #9a9a9a;width: 80%;">       
                    </div>
                       
          
                  
                       
           <div class="blog_info" style="padding: 10px;">
       <h4 class="text-center"><a class="text-center" href="#"><?php echo e(trans('admin.Sub_Total')); ?></a></h4>
       <h5 class="text-center"><a class="text-center" href="#">   <?php echo e(Cart::subtotal()); ?> <?php echo e($coin->Symbol); ?></a></h5>
               <hr style="background: #9a9a9a;width: 80%;">        
                    </div>
                  
                  
                            <div class="blog_info" style="padding: 10px;">
       <h4 class="text-center"><a class="text-center" href="#"><?php echo e(trans('admin.Cupon_Code')); ?></a></h4>
       <h5 class="text-center"><a class="text-center" href="#"><?php echo e($x); ?> <?php echo e($coin->Symbol); ?></a></h5>
            <hr style="background: #9a9a9a;width: 80%;">        
                    </div>
                  
                  
                            <div class="blog_info" style="padding: 10px;">
       <h4 class="text-center"><a class="text-center" href="#"><?php echo e(trans('admin.Grand_Total')); ?></a></h4>
       <h5 class="text-center"><a class="text-center" href="#"><?php echo e(str_replace(',', '', Cart::total()) - $x); ?> <?php echo e($coin->Symbol); ?></a></h5>
                            <?php    session()->put('CODE',$x); ?>        
               <hr style="background: #9a9a9a;width: 80%;">          
                    </div>
                  
                


  
          
                  
                                                    <div class="blog_info" style="padding: 10px;"> 
               <div class="action_bar">
            <a href="<?php echo e(url('CheckoutResturantSite')); ?>" class="btn btn_primary" style="width: 100%"><?php echo e(trans('admin.Checkout')); ?></a>

          </div>
          </div>
     
          
              </div>
            </div>
                 
      
          </div>
            

        </div>


      </div>
    </section>
    <!-- Main Service Section End-->


<?php $__env->stopSection(); ?>  
<?php echo $__env->make('resturant-view.index', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /Applications/MAMP/htdocs/laravel/ERP/resources/views/resturant-view/Cart.blade.php ENDPATH**/ ?>