<?php if(isset($payment_page) && $payment_page): ?> <?php $payment_page = true; ?> <?php else: ?> <?php $payment_page = false; ?> <?php endif; ?> <div class="table-responsive"> <table class="table"> <thead> <?php if(!$payment_page): ?> <tr> <td colspan="7" class="imp-p-0"> <div> <span> <a href="#" class="btn btn-upper btn-danger pull-right outer-right-xs" onclick="this.disabled = true; this.innerText ='Please Wait...'; window.location.href = '<?=url('/')?>/cart/empty'; return true;"> <i class="fa fa-trash"></i> <?php echo app('translator')->getFromJson('Empty Cart'); ?> </a> </span> </div> </td> </tr> <?php endif; ?> <tr> <?php if(!$payment_page): ?> <th class="cart-remove item"><?php echo app('translator')->getFromJson('Remove'); ?></th> <?php endif; ?> <th class="cart-description item"><?php echo app('translator')->getFromJson('Image'); ?></th> <th class="cart-product-name item"><?php echo app('translator')->getFromJson('Product Name'); ?></th> <th class="cart-qty item"><?php echo app('translator')->getFromJson('Quantity'); ?></th> <th class="cart-sub-total item"><?php echo app('translator')->getFromJson('Unit Price'); ?></th> <th class="cart-unit-tax item"><?php echo app('translator')->getFromJson('Unit Tax (%)'); ?></th> <th class="cart-total last-item"><?php echo app('translator')->getFromJson('Total'); ?></th> </tr> </thead> <tbody> <?php $__currentLoopData = $cartItems; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php $product_data = \App\Product::select('file_id','virtual','downloadable')->where('id',$product->id)->get()->first()->toArray(); ?> <tr> <?php if(!$payment_page): ?> <td class="remove-item"> <?php echo Form::open(['method'=>'delete', 'route'=>['front.cart.destroy', $product->rowId], 'onsubmit'=>'submit_button.disabled = true; submit_button.value = "X"; return true;']); ?> <button type="submit" name="submit_button" title="cancel" class="icon"> <i class="fa fa-trash-o"></i> </button> <?php echo Form::close(); ?> </td> <?php endif; ?> <td class="cart-image"> <?php if($product->options->has('photo')): ?> <?php if($product->options->photo): ?> <?php
                                    $image_url = \App\Helpers\Helper::check_image_avatar($product->options->photo, 75);
                                ?> <div class="img-box"> <img class="product-image" width="75" src="<?php echo e($image_url); ?>" alt="<?php echo e($product->name); ?>" /> </div> <?php else: ?> <div class="img-box"> <img src="https://via.placeholder.com/75x75?text=No+Image" class="product-image" width="75" alt="<?php echo e($product->name); ?>" /> </div> <?php endif; ?> <?php endif; ?> </td> <td class="cart-product-name-info"> <h4 class='cart-product-description'> <a href="<?php echo e(route('front.product.show', [$product->options->slug])); ?>"><?php echo e($product->name); ?></a> </h4> <?php if(is_array($product->options->spec) && count($product->options->spec)): ?> <div class="cart-product-info"> <?php $__currentLoopData = $product->options->spec; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $spec): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <span class="product-color"> <?php echo e($spec['name']); ?> : <span> <?php echo e($spec['value']); ?> </span> </span> <?php if(!$loop->last): ?><br> <?php endif; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </div> <?php endif; ?> </td> <td class="cart-product-quantity"> <div class="quant-input"> <?php if($payment_page): ?> <?php if($product_data['virtual'] && $product_data['downloadable'] && $product_data['file_id']): ?> <label class="form-control text-center"><strong>1</strong></label> <?php else: ?> <label class="form-control text-center"><strong><?php echo e($product->qty); ?></strong></label> <?php endif; ?> <?php else: ?> <?php echo Form::open(['method'=>'patch', 'route'=>['front.cart.update', $product->rowId, $product->qty], 'onsubmit'=>'this.disabled = true; return true;']); ?> <div class="col-md-12"> <?php if($product_data['virtual'] && $product_data['downloadable'] && $product_data['file_id']): ?> <label class="form-control"> <strong>1</strong> </label> <?php else: ?> <span class="input-group-btn"> <button type="submit" <?php echo e($product->qty == 1 ? 'disabled' : ''); ?> class="btn btn-danger" value="decrease" name="submit"> <span class="glyphicon glyphicon-minus"></span> </button> <span> <input disabled type="number" value="<?php echo e($product->qty); ?>" class="form-control text-center" step="1" min="0"> </span> <button type="submit" class="btn btn-success" value="increase" name="submit"> <span class="glyphicon glyphicon-plus"></span> </button> </span> <?php endif; ?> </div> <?php echo Form::close(); ?> <?php endif; ?> </div> </td> <td class="cart-product-sub-total"> <span class="cart-sub-total-price"><?php echo e(currency_format($product->options->unit_price)); ?></span> </td> <td class="cart-product-unit-tax"> <span class="cart-sub-unit-tax"><?php echo e(currency_format($product->options->unit_tax)); ?>%</span> </td> <td class="cart-product-grand-total"> <span class="cart-grand-total-price"><?php echo e(currency_format($product->total)); ?></span> </td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tbody> </table> </div>