Viewing file: 1199957bda8ba66f35901c9106faef37.php (5.2 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
$grandSubtotal = 0;
$qty = 0;
$option_price = 0;
$user = auth()->user()->id ?? '';
$cartKey = 'cart_' . $user;
?>
<?php if(Session::has('cart_' . $user)): ?>
<div class="aside-header d-flex align-items-center justify-content-between">
<h3 class="mb-0">SHOPPING BAG (<?php echo e(Session::has('cart_' . $user) ? count(Session::get('cart_' . $user)) : '0'); ?>)</h3>
<button class="close-aside-bar open-cart"><i class="far fa-times"></i></button>
</div>
<div class="aside-body cart-items-list">
<div id="cart-items-section">
<?php $__currentLoopData = Session::get('cart_' . $user); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $cart): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php
$grandSubtotal+= $cart['qty'] * ($cart['main_price'] + $cart['attribute_price']);
?>
<div class="cart-items-list2">
<div class="entry-delete"><a href="#" id="add-cart-destroy" data-id="<?php echo e($key); ?>"><i class="icon-x"></i></a></div>
<div class="cart-item d-flex position-relative">
<div class="position-relative">
<a href=""><img src="<?php echo e(asset('assets/images/'.$cart['photo'])); ?>" alt="Cart Img" class="cart-item-img-fluid"></a>
</div>
<div class="cart-item-info flex-grow-1">
<h6><?php echo e(Str::limit($cart['name'], 45)); ?></h6>
<div class="d-flex align-items-center justify-content-between mt-1">
<div class="position-relative d-flex" style="width: 3.375rem;">
<?php if($cart['item_type'] == 'normal'): ?>
<span class="decreaseQtycart cartsubclick" data-id="<?php echo e($key); ?>" data-action="decrement"
data-target="<?php echo e(PriceHelper::GetItemId($key)); ?>" style="cursor: pointer"><i
class="fas fa-minus"></i></span>
<input type="number" disabled data-id="<?php echo e($key); ?>" class=" cartcart-amount qty qty-solo-product border-0 text-center"
value="<?php echo e($cart['qty']); ?>">
<span class="increaseQtycart cartaddclick" data-id="<?php echo e($key); ?>"
data-target="<?php echo e(PriceHelper::GetItemId($key)); ?>"
data-action="increment"
data-item="<?php echo e(implode(',', $cart['options_id'])); ?>" style="cursor: pointer"><i
class="fas fa-plus"></i></span>
<input type="hidden" value="3333" id="current_stock">
<?php endif; ?>
</div>
<span style="font-size: 1.125rem;"><?php echo e(PriceHelper::setCurrencyPrice($cart['main_price'])); ?></span>
</div>
<span>
<?php $__currentLoopData = $cart['attribute']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $optionkey => $option_name): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<span><em><?php echo e($option_name['name']); ?>:</em>
<small> (<?php echo e(PriceHelper::setCurrencyPrice($option_name['price'])); ?>) </small>
</span>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</span>
</div>
</div>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
<!-- Add more items as needed -->
</div>
<div class="cart-footer">
<hr class="cart-hr">
<div class="d-flex justify-content-between mb-3">
<h6>SUBTOTAL:</h6>
<input type="hidden" id="current_sub_total" value="<?php echo e(PriceHelper::setCurrencyPrice($grandSubtotal)); ?>">
<span class="sub-total"><?php echo e(PriceHelper::setCurrencyPrice($grandSubtotal)); ?></span>
</div>
<a href="<?php echo e(route('front.cart')); ?>" class="btn btn-light w-100 mb-2 common-btn">View Cart</a>
<a href="<?php echo e(route('front.checkout.billing')); ?>" class="btn checkout-btn w-100 text-white" style="background-color: #000;">Checkout</a>
</div>
<?php else: ?>
<div class="aside-header d-flex align-items-center justify-content-between">
<h3 class="mb-0">SHOPPING BAG (<?php echo e(Session::has('cart_' . $user) ? count(Session::get('cart_' . $user)) : '0'); ?>)</h3>
<button class="close-aside-bar open-cart"><i class="far fa-times"></i></button>
</div>
<div class="aside-body cart-items-list">
<div id="cart-items-section ">
<div class="emty-cart">
<img src="https://media.tenor.com/8Bt28MKNs7sAAAAj/shopping-cart-ecomm.gif" alt="">
</div>
</div>
<div class="cart-footer mt-2">
<a href="<?php echo e(route('front.index')); ?>" class="btn btn-light w-100 mb-2">Buy Now</a>
</div>
</div>
<?php endif; ?>
</div><?php /**PATH D:\PicTech\unipin\unipin\core\resources\views/includes/header_cart.blade.php ENDPATH**/ ?>
|