Server : nginx/1.18.0 System : Linux localhost 6.14.3-x86_64-linode168 #1 SMP PREEMPT_DYNAMIC Mon Apr 21 19:47:55 EDT 2025 x86_64 User : www-data ( 33) PHP Version : 8.0.16 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /var/www/ecommerce/storage/framework/views/ |
<?php $__env->startSection('title', 'Product Page'); ?>
<?php $__env->startSection('main-content'); ?>
<!-- Breadcrumbs -->
<div class="breadcrumbs">
<div class="container">
<div class="row">
<div class="col-12">
<div class="bread-inner">
<ul class="bread-list">
<li><a href="<?php echo e(route('home')); ?>">Home<i class="ti-arrow-right"></i></a></li>
<li class="active"><span>Shop Grid</span></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<!-- End Breadcrumbs -->
<!-- Product Style -->
<section class="product-area shop-sidebar shop section">
<div class="container">
<div class="row flex-xs-reverse-column">
<div class="col-lg-3 col-md-4 col-12">
<div class="shop-sidebar">
<!-- Shop By Price -->
<div class="single-widget range">
<h3 class="title">Shop by Price</h3>
<div class="price-filter">
<div class="price-filter-inner">
<?php
$max = DB::table('products')
->where('status', 'active')
->max('price');
?>
<div id="slider-range" data-min="0" data-max="<?php echo e($max); ?>"></div>
<div class="product_filter">
<button type="button" class="filter_button btn"
onclick="return addFilterBy('price_range')">Filter</button>
<div class="label-input">
<span>Range:</span>
<input style="" type="text" id="amount" readonly />
<input type="hidden" name="price_range" id="price_range"
value="<?php if(!empty($_GET['price'])): ?><?php echo e($_GET['price']); ?><?php endif; ?>" />
</div>
</div>
</div>
</div>
</div>
<!--/ End Shop By Price -->
<!-- Single Widget -->
<div class="single-widget recent-post">
<h3 class="title">Recent post</h3>
<?php $__currentLoopData = $recent_products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<!-- Single Post -->
<?php
$photo = explode(',', $product->photo);
?>
<div class="single-post">
<div class="image d-inline-block">
<img class="img-fluid lazyload" data-src="<?php echo e(Helper::imagePath($photo[0])); ?>" alt="<?php echo e($photo[0]); ?>">
</div>
<div class="content d-inline-block">
<h5><a
href="<?php echo e(route('product-detail', $product->slug)); ?>"><?php echo e($product->title); ?></a>
</h5>
<?php if($product->discount): ?>
<p class="price">
<del class="text-muted">
<?php echo config('shop.currency_symbol') . ' ' . number_format($product->price, 2); ?>
</del>
<span class="d-block font-weight-bold">
<?php echo config('shop.currency_symbol') . ' ' . number_format($product->discounted_price, 2); ?>
</span>
</p>
<?php else: ?>
<p class="price">
<span><?php echo config('shop.currency_symbol'); ?>
<?php echo e(number_format($product->price, 2)); ?></span>
</p>
<?php endif; ?>
</div>
</div>
<!-- End Single Post -->
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
<!--/ End Single Widget -->
<!-- Single Widget -->
<?php
$brands = DB::table('brands')
->orderBy('title', 'ASC')
->where('status', 'active')
->get();
?>
<?php if($brands->count()): ?>
<div class="single-widget category">
<h3 class="title">Vendors</h3>
<ul class="categor-list">
<?php $__currentLoopData = $brands; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $brand): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<li><a href="<?php echo e(route('product-brand', $brand->slug)); ?>"><?php echo e($brand->title); ?></a>
</li>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</ul>
</div>
<?php endif; ?>
<!--/ End Single Widget -->
</div>
</div>
<div class="col-lg-9 col-md-8 col-12">
<div class="row">
<div class="col-12">
<!-- Shop Top -->
<div class="shop-top">
<div class="shop-shorter">
<div class="single-shorter">
<label>Show :</label>
<select class="show nice-select" name="show" onchange="return addFilterBy('show')">
<option value="">Default</option>
<?php $__currentLoopData = [10, 20, 30, 40]; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $text): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo $text; ?>" <?php echo request()->input('show') == $text ? 'selected' : ''; ?>>
<?php echo $text; ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
</div>
<div class="single-shorter">
<label>Sort By :</label>
<select class='sortBy nice-select' name='sortBy'
onchange="return addFilterBy('sortBy')">
<option value="">Default</option>
<?php $__currentLoopData = ['title' => 'Name', 'price' => 'Price', 'category' => 'Category', 'brand' => 'Vendor']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value => $text): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo $value; ?>" <?php echo request()->input('sortBy') === $value ? 'selected' : ''; ?>>
<?php echo $text; ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
</div>
</div>
<ul class="view-mode">
<li class="active"><a href="javascript:void(0)"><i
class="fa fa-th-large"></i></a></li>
<li><a
href="<?php echo e(route(
request()->route()->getName(),
request()->route()->parameters() + ['mode' => 'list'] +
request()->query(),
)); ?>"><i
class="fa fa-th-list"></i></a>
</li>
</ul>
</div>
<!--/ End Shop Top -->
</div>
</div>
<div class="row">
<?php if($products->count() > 0): ?>
<?php $__currentLoopData = $products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php echo $__env->make('frontend.partials.grid-product', [
'product' => $product
], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php else: ?>
<h4 class="text-warning" style="margin:100px auto;">There are no products.</h4>
<?php endif; ?>
</div>
<div class="row">
<div class="col-md-12 justify-content-center d-flex">
<?php echo e($products->appends(request()->query())->links()); ?>
</div>
</div>
</div>
</div>
</div>
</section>
<!--/ End Product Style 1 -->
<!-- Modal -->
<!-- Modal end -->
<?php $__env->stopSection(); ?>
<?php $__env->startPush('styles'); ?>
<!-- Jquery Ui -->
<link rel="stylesheet" href="<?php echo e(asset('frontend/css/jquery-ui.css')); ?>">
<style>
.pagination {
display: inline-flex;
}
.filter_button {
text-align: center;
background: #3CC78F;
padding: 8px 16px;
margin-top: 10px;
color: white;
border: none;
}
</style>
<?php $__env->stopPush(); ?>
<?php $__env->startPush('scripts'); ?>
<script src="<?php echo e(asset('frontend/js/jquery-ui.min.js')); ?>"></script>
<script>
function addFilterBy(elementName) {
let filterKey = elementName;
let filterVal = $('[name="' + elementName + '"]').val();
const url = new URL(window.location);
if (filterVal) {
url.searchParams.set(filterKey, filterVal);
} else {
url.searchParams.delete(filterKey);
}
window.location.assign(url.toString());
}
$(function() {
/*----------------------------------------------------*/
/* Jquery Ui slider js
/*----------------------------------------------------*/
if ($("#slider-range").length > 0) {
const max_value = parseInt($("#slider-range").data('max')) || 500;
const min_value = parseInt($("#slider-range").data('min')) || 0;
const currency = $("#slider-range").data('currency') || '';
let price_range = min_value + '-' + max_value;
if ($("#price_range").length > 0 && $("#price_range").val()) {
price_range = $("#price_range").val().trim();
}
let price = price_range.split('-');
$("#slider-range").slider({
range: true,
min: min_value,
max: max_value,
values: price,
slide: function(event, ui) {
$("#amount").val(currency + ui.values[0] + " - " + currency + ui.values[1]);
$("#price_range").val(ui.values[0] + "-" + ui.values[1]);
}
});
}
if ($("#amount").length > 0) {
const m_currency = $("#slider-range").data('currency') || '';
$("#amount").val(m_currency + $("#slider-range").slider("values", 0) +
" - " + m_currency + $("#slider-range").slider("values", 1));
}
});
</script>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('frontend.layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/ecommerce/resources/views/frontend/pages/product-grids.blade.php ENDPATH**/ ?>