271 lines
16 KiB
HTML
271 lines
16 KiB
HTML
{% set products = __SELF__.products %}
|
|
{% set params = __SELF__.params %}
|
|
{% set keyword = __SELF__.keyword %}
|
|
|
|
|
|
{% for product in products %}
|
|
<!-- Quick View Modal Area -->
|
|
<div class="modal fade" id="quickview{{product.id}}" tabindex="-1" role="dialog" aria-labelledby="quickview" aria-hidden="true">
|
|
<div class="modal-dialog modal-lg modal-dialog-centered" role="document">
|
|
<div class="modal-content">
|
|
<button type="button" class="close btn" data-dismiss="modal" aria-label="Close">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
<div class="modal-body">
|
|
<div class="quickview_body">
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-12 col-lg-5">
|
|
<div class="quickview_pro_img">
|
|
<img class="first_img" src="{{ product.images[0].thumb(500,625,{'mode':'crop'}) }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, gipsler merkezi, {{ product.name }}">
|
|
{% if product.images_count > 1 %}
|
|
<img class="hover_img" src="{{ product.images[1].thumb(500,625,{'mode':'crop'}) }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, gipsler merkezi, {{ product.name }}">
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
<div class="col-12 col-lg-7">
|
|
<div class="quickview_pro_des">
|
|
<h4 class="title">{{ product.name }}</h4>
|
|
<div class="top_seller_product_rating mb-15">
|
|
<i class="fa fa-star" aria-hidden="true"></i>
|
|
<i class="fa fa-star" aria-hidden="true"></i>
|
|
<i class="fa fa-star" aria-hidden="true"></i>
|
|
<i class="fa fa-star" aria-hidden="true"></i>
|
|
<i class="fa fa-star" aria-hidden="true"></i>
|
|
</div>
|
|
<h5 class="price">
|
|
{% if product.vendor.web2 > 0 %}
|
|
<del style="color: rgb(253, 0, 24);">{{ product.price }} TMT</del>
|
|
{{ product.getDiscountedPrice(product.vendor.web2) }} TMT
|
|
{% else %}
|
|
{{ product.price }} TMT
|
|
{% endif %}
|
|
</h5>
|
|
<span class="badge ml-2 {{ product.stock == 0 ? 'badge-secondary' : 'badge-success' }}">{{ product.stock == 0 ? 'productAdd.ZakazaGelyar'|_ : 'productAdd.ElimizdeBar'|_ }}</span>
|
|
<p>{{ html_limit(product.description, 100) }}</p>
|
|
<a href="{{ 'product'|page({id: product.id}) }}">{{ 'modal.GinisleyinMaglumat'|_ }}</a>
|
|
|
|
</div>
|
|
<!-- Add to Cart Form -->
|
|
<form class="cart" method="post">
|
|
<div class="quantity">
|
|
<input type="number" class="qty-text form-control" id="quantity{{ product.id }}" step="1" min="1" value="1">
|
|
</div>
|
|
{% if user %}
|
|
<div class="product_add_to_cart addToCard" data-id="{{ product.id }}" data-price="{{ product.price }}" data-image="{{ product.images[0].path }}" data-name="{{ product.name }}" data-vendor="{{ product.vendor.id }}">
|
|
<a href="#" class="btn btn-primary mt-1 mt-md-0 ml-1 ml-md-3">{{ 'product.SebedeGos'|_ }}</a>
|
|
</div>
|
|
{% else %}
|
|
<div class="product_add_to_cart" data-id="{{ product.id }}" data-price="{{ product.price }}" data-image="{{ product.images[0].path }}" data-name="{{ product.name }}" data-vendor="{{ product.vendor.id }}">
|
|
<a href="{{ 'login'|page }}" class="btn btn-primary mt-1 mt-md-0 ml-1 ml-md-3">{{ 'product.SebedeGos'|_ }}</a>
|
|
</div>
|
|
{% endif %}
|
|
<!-- Wishlist -->
|
|
<div class="modal_pro_wishlist">
|
|
{% if user %}
|
|
<a
|
|
data-request="onCreateFav"
|
|
data-request-flash
|
|
data-request-validate
|
|
data-request-data="product_id: {{ product.id }}"
|
|
href="#"><i class="icofont-heart"></i></a>
|
|
{% else %}
|
|
<a href="{{ 'login'|page }}"><i class="icofont-heart"></i></a>
|
|
{% endif %}
|
|
</div>
|
|
|
|
</form>
|
|
<!-- Share -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Quick View Modal Area -->
|
|
{% endfor %}
|
|
|
|
|
|
|
|
|
|
<!-- Breadcumb Area -->
|
|
<div class="breadcumb_area">
|
|
<div class="container h-100">
|
|
<div class="row h-100 align-items-center">
|
|
<div class="col-12">
|
|
<h5>{{ 'breadcrumbHarytlar'|_ }}</h5>
|
|
<ol class="breadcrumb">
|
|
<li class="breadcrumb-item"><a href="{{ 'index'|page }}">{{ 'breadcrumbEsasySahypa'|_ }}</a></li>
|
|
<li class="breadcrumb-item active">{{ 'breadcrumbHarytGozleg'|_ }}</li>
|
|
<li class="breadcrumb-item active">{{ keyword }}</li>
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Breadcumb Area -->
|
|
|
|
<section class="shop_grid_area section_padding_50">
|
|
<div class="container">
|
|
|
|
{% if products.count() == 0 %}
|
|
<div class="container mb-5">
|
|
<div class="row d-block justify-content-center align-items-center">
|
|
<div class="col-6 d-block mx-auto">
|
|
<div class="text-center">
|
|
<img src="{{ 'assets/img/core-img/no-products.png'|theme }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, gipsler merkezi">
|
|
</div>
|
|
</div>
|
|
<div class="col-6 d-block mx-auto">
|
|
<div class="text-center">
|
|
<p>{{ 'product.BrandMagazinlarynHarytlaryYuklenyar'|_ }}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
<div class="row mt-50">
|
|
<div class="col-12">
|
|
<!-- Shop Top Sidebar -->
|
|
<div class="shop_top_sidebar_area d-flex flex-wrap align-items-center justify-content-between">
|
|
<div class="row" style="width: 100%">
|
|
<div class="col-8">
|
|
</div>
|
|
<div class="col-4">
|
|
<form id="sortOptionUserProfile" method="GET">
|
|
<input type="hidden" name="name" value="{{ keyword }}">
|
|
</form>
|
|
|
|
<select class="form-control" onchange="sortHandle()" id="sort_input">
|
|
<option value="">{{ 'sortSaylanmadyk'|_ }}</option>
|
|
<option value="-price" {% if input('sort') == '-price' %} selected {% endif %}>{{ 'sortGymmatdanArzana'|_ }}</option>
|
|
<option value="price" {% if input('sort') == 'price' %} selected {% endif %}>{{ 'sortArzandanGymmada'|_ }}</option>
|
|
<option value="-created_at" {% if input('sort') == '-created_at' %} selected {% endif %}>{{ 'sortTazedenKona'|_ }}</option>
|
|
<option value="created_at" {% if input('sort') == 'created_at' %} selected {% endif %}>{{ 'sortKonedenTaza'|_ }}</option>
|
|
</select>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="shop_grid_product_area">
|
|
<div class="row justify-content-center">
|
|
{% for product in products %}
|
|
<!-- Single Product -->
|
|
<div class="col-6 col-xs-6 col-sm-6 col-md-4 col-lg-4">
|
|
<div class="single-product-area mb-30">
|
|
<a href="{{ 'product'|page({id: product.id}) }}">
|
|
<div class="product_image">
|
|
<!-- Product Image -->
|
|
<img class="normal_img" src="{{ product.images[0].thumb(680,700,{'mode':'crop'}) }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, gipsler merkezi, {{ product.name }}">
|
|
{% if product.images_count > 1 %}
|
|
<img class="hover_img" src="{{ product.images[1].thumb(680,700,{'mode':'crop'}) }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, gipsler merkezi, {{ product.name }}">
|
|
{% endif %}
|
|
<!-- Wishlist -->
|
|
<div class="product_wishlist">
|
|
{% if user %}
|
|
<a
|
|
data-request="onCreateFav"
|
|
data-request-flash
|
|
data-request-validate
|
|
data-request-data="product_id: {{ product.id }}"
|
|
href="#"><i class="icofont-heart"></i></a>
|
|
{% else %}
|
|
<a href="{{ 'login'|page }}"><i class="icofont-heart"></i></a>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</a>
|
|
|
|
<!-- Product Description -->
|
|
<div class="product_description">
|
|
<!-- Add to cart -->
|
|
{% if user %}
|
|
<div class="product_add_to_cart addToCard" data-id="{{ product.id }}" data-price="{{ product.price }}" data-image="{{ product.images[0].path }}" data-name="{{ product.name }}" data-vendor="{{ product.vendor.id }}">
|
|
<input type="hidden" min="1" id="quantity{{ product.id }}" value="1">
|
|
<a href="#"><i class="icofont-shopping-cart"></i> {{ 'product.SebedeGos'|_ }}</a>
|
|
</div>
|
|
{% else %}
|
|
<div class="product_add_to_cart">
|
|
<a href="{{ 'login'|page }}"><i class="icofont-shopping-cart"></i> {{ 'product.SebedeGos'|_ }}</a>
|
|
</div>
|
|
{% endif %}
|
|
<!-- Quick View -->
|
|
<div class="product_quick_view">
|
|
<a href="#" data-toggle="modal" data-target="#quickview{{product.id}}"><i class="icofont-eye-alt"></i> {{ 'parallaxDolyMaglumat'|_ }}</a>
|
|
</div>
|
|
<p class="brand_name">{{product.vendor.shop_title}}</p>
|
|
<a href="{{ 'product'|page({id: product.id}) }}">{{ product.name }}</a>
|
|
<h6 class="product-price">
|
|
{% if product.vendor.web2 > 0 %}
|
|
<del style="color: rgb(253, 0, 24);">{{ product.price }} TMT</del>
|
|
{{ product.getDiscountedPrice(product.vendor.web2) }} TMT
|
|
{% else %}
|
|
{{ product.price }} TMT
|
|
{% endif %}
|
|
</h6>
|
|
<span class="badge mt-2 {{ product.stock == 0 ? 'badge-secondary' : 'badge-success' }}">{{ product.stock == 0 ? 'productAdd.ZakazaGelyar'|_ : 'productAdd.ElimizdeBar'|_ }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
|
|
</div>
|
|
</div>
|
|
{% if products.hasPages %}
|
|
<div class="shop_pagination_area mt-30">
|
|
<nav aria-label="Page navigation">
|
|
<ul class="pagination pagination-sm justify-content-center">
|
|
{% if products.currentPage > 1 %}
|
|
<li class="page-item"><a class="page-link" href="{{ products.previousPageUrl }}{{params}}">{{ 'paginationOnki'|_ }}</a></li>
|
|
{% endif %}
|
|
|
|
{% for page in range(1, products.lastPage) %}
|
|
{% if page == products.currentPage %}
|
|
<li class="page-item active"><a class="page-link" href="{{ products.url(page) }}{{params}}">{{ page }}</a></li>
|
|
{% elseif page > products.currentPage - 3 and page < products.currentPage + 3 %}
|
|
<li class="page-item"><a class="page-link" href="{{ products.url(page) }}{{params}}">{{ page }}</a></li>
|
|
{% elseif page == products.currentPage + 3 or page == products.currentPage - 3 %}
|
|
<li>...</li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
{% if products.lastPage > products.currentPage %}
|
|
<li class="page-item"><a class="page-link" href="{{ products.nextPageUrl }}{{params}}">{{ 'paginationIndiki'|_ }}</a></li>
|
|
{% endif %}
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
|
|
</div>
|
|
</section>
|
|
|
|
{% put scripts %}
|
|
<script>
|
|
function sortHandle() {
|
|
event.preventDefault();
|
|
let sort = document.getElementById("sort_input");
|
|
let value = sort.value;
|
|
submitForm(value);
|
|
}
|
|
|
|
function submitForm(value) {
|
|
let form = document.getElementById("sortOptionUserProfile");
|
|
let sort = document.createElement("input");
|
|
sort.name = "sort";
|
|
sort.type = "hidden";
|
|
sort.value = value;
|
|
form.appendChild(sort);
|
|
form.submit()
|
|
}
|
|
</script>
|
|
{% endput %} |