gurl_o/plugins/tps/birzha/components/searchoffers/default.htm

275 lines
16 KiB
HTML
Raw Normal View History

2023-10-03 12:00:10 +00:00
{% 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">&times;</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">
2023-10-15 20:26:14 +00:00
<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 }}">
2023-10-04 07:17:11 +00:00
{% if product.images_count > 1 %}
2023-10-15 20:26:14 +00:00
<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 }}">
2023-10-04 07:17:11 +00:00
{% endif %}
2023-10-03 12:00:10 +00:00
</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>
2023-10-25 16:09:40 +00:00
<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>
2023-12-05 20:03:21 +00:00
{% if product.stock != 'not_selected' %}
<span class="badge ml-2 {{ product.stock == 0 ? 'badge-secondary' : 'badge-success' }}">{{ product.stock == 0 ? 'productAdd.ZakazaGelyar'|_ : 'productAdd.ElimizdeBar'|_ }}</span>
{% endif %}
2023-10-03 12:00:10 +00:00
<p>{{ html_limit(product.description, 100) }}</p>
2023-10-25 16:09:40 +00:00
<a href="{{ 'product'|page({id: product.id}) }}">{{ 'modal.GinisleyinMaglumat'|_ }}</a>
2023-10-22 13:08:31 +00:00
2023-10-03 12:00:10 +00:00
</div>
<!-- Add to Cart Form -->
<form class="cart" method="post">
<div class="quantity">
2023-10-15 20:26:14 +00:00
<input type="number" class="qty-text form-control" id="quantity{{ product.id }}" step="1" min="1" value="1">
2023-10-03 12:00:10 +00:00
</div>
2023-10-15 20:26:14 +00:00
{% if user %}
2023-12-05 20:03:21 +00:00
<div class="product_add_to_cart addToCard" data-id="{{ product.id }}" data-price="{{ product.getDiscountedPrice(product.vendor.web2) }}" data-image="{{ product.images[0].path }}" data-name="{{ product.name }}" data-vendor="{{ product.vendor.id }}">
2023-10-25 16:09:40 +00:00
<a href="#" class="btn btn-primary mt-1 mt-md-0 ml-1 ml-md-3">{{ 'product.SebedeGos'|_ }}</a>
2023-10-15 20:26:14 +00:00
</div>
{% else %}
2023-12-05 20:03:21 +00:00
<div class="product_add_to_cart" data-id="{{ product.id }}" data-price="{{ product.getDiscountedPrice(product.vendor.web2) }}" data-image="{{ product.images[0].path }}" data-name="{{ product.name }}" data-vendor="{{ product.vendor.id }}">
2023-10-25 16:09:40 +00:00
<a href="{{ 'login'|page }}" class="btn btn-primary mt-1 mt-md-0 ml-1 ml-md-3">{{ 'product.SebedeGos'|_ }}</a>
2023-10-15 20:26:14 +00:00
</div>
{% endif %}
2023-10-03 12:00:10 +00:00
<!-- Wishlist -->
<div class="modal_pro_wishlist">
{% if user %}
2023-10-22 13:08:31 +00:00
<a
data-request="onCreateFav"
data-request-flash
data-request-validate
data-request-data="product_id: {{ product.id }}"
href="#"><i class="icofont-heart"></i></a>
2023-10-03 12:00:10 +00:00
{% 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">
2023-10-25 16:09:40 +00:00
<h5>{{ 'breadcrumbHarytlar'|_ }}</h5>
2023-10-03 12:00:10 +00:00
<ol class="breadcrumb">
2023-10-25 16:09:40 +00:00
<li class="breadcrumb-item"><a href="{{ 'index'|page }}">{{ 'breadcrumbEsasySahypa'|_ }}</a></li>
<li class="breadcrumb-item active">{{ 'breadcrumbHarytGozleg'|_ }}</li>
2023-10-03 12:00:10 +00:00
<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">
2023-10-22 13:08:31 +00:00
{% 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">
2023-10-25 16:09:40 +00:00
<p>{{ 'product.BrandMagazinlarynHarytlaryYuklenyar'|_ }}</p>
2023-10-22 13:08:31 +00:00
</div>
</div>
</div>
</div>
{% else %}
2023-10-03 12:00:10 +00:00
<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">
2023-10-25 16:09:40 +00:00
<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>
2023-10-03 12:00:10 +00:00
</select>
</form>
</div>
</div>
</div>
<div class="shop_grid_product_area">
<div class="row justify-content-center">
{% for product in products %}
<!-- Single Product -->
2023-10-22 13:08:31 +00:00
<div class="col-6 col-xs-6 col-sm-6 col-md-4 col-lg-4">
2023-10-03 12:00:10 +00:00
<div class="single-product-area mb-30">
2023-10-15 20:26:14 +00:00
<a href="{{ 'product'|page({id: product.id}) }}">
<div class="product_image">
<!-- Product Image -->
2023-10-22 13:08:31 +00:00
<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 }}">
2023-10-15 20:26:14 +00:00
{% if product.images_count > 1 %}
2023-10-22 13:08:31 +00:00
<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 }}">
2023-10-03 12:00:10 +00:00
{% endif %}
2023-10-15 20:26:14 +00:00
<!-- Wishlist -->
<div class="product_wishlist">
{% if user %}
2023-10-22 13:08:31 +00:00
<a
data-request="onCreateFav"
data-request-flash
data-request-validate
data-request-data="product_id: {{ product.id }}"
href="#"><i class="icofont-heart"></i></a>
2023-10-15 20:26:14 +00:00
{% else %}
<a href="{{ 'login'|page }}"><i class="icofont-heart"></i></a>
{% endif %}
</div>
2023-10-03 12:00:10 +00:00
</div>
2023-10-15 20:26:14 +00:00
</a>
2023-10-03 12:00:10 +00:00
<!-- Product Description -->
<div class="product_description">
<!-- Add to cart -->
2023-10-12 20:59:00 +00:00
{% if user %}
2023-12-05 20:03:21 +00:00
<div class="product_add_to_cart addToCard" data-id="{{ product.id }}" data-price="{{ product.getDiscountedPrice(product.vendor.web2) }}" data-image="{{ product.images[0].path }}" data-name="{{ product.name }}" data-vendor="{{ product.vendor.id }}">
2023-10-12 20:59:00 +00:00
<input type="hidden" min="1" id="quantity{{ product.id }}" value="1">
2023-10-25 16:09:40 +00:00
<a href="#"><i class="icofont-shopping-cart"></i> {{ 'product.SebedeGos'|_ }}</a>
2023-10-12 20:59:00 +00:00
</div>
{% else %}
<div class="product_add_to_cart">
2023-10-25 16:09:40 +00:00
<a href="{{ 'login'|page }}"><i class="icofont-shopping-cart"></i> {{ 'product.SebedeGos'|_ }}</a>
2023-10-12 20:59:00 +00:00
</div>
{% endif %}
2023-10-03 12:00:10 +00:00
<!-- Quick View -->
<div class="product_quick_view">
2023-10-25 16:09:40 +00:00
<a href="#" data-toggle="modal" data-target="#quickview{{product.id}}"><i class="icofont-eye-alt"></i> {{ 'parallaxDolyMaglumat'|_ }}</a>
2023-10-03 12:00:10 +00:00
</div>
2023-10-15 20:26:14 +00:00
<p class="brand_name">{{product.vendor.shop_title}}</p>
<a href="{{ 'product'|page({id: product.id}) }}">{{ product.name }}</a>
2023-10-25 16:09:40 +00:00
<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>
2023-12-05 20:03:21 +00:00
{% if product.stock != 'not_selected' %}
<span class="badge mt-2 {{ product.stock == 0 ? 'badge-secondary' : 'badge-success' }}">{{ product.stock == 0 ? 'productAdd.ZakazaGelyar'|_ : 'productAdd.ElimizdeBar'|_ }}</span>
{% endif %}
2023-10-03 12:00:10 +00:00
</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 %}
2023-10-25 16:09:40 +00:00
<li class="page-item"><a class="page-link" href="{{ products.previousPageUrl }}{{params}}">{{ 'paginationOnki'|_ }}</a></li>
2023-10-03 12:00:10 +00:00
{% endif %}
2023-10-15 20:26:14 +00:00
2023-10-03 12:00:10 +00:00
{% for page in range(1, products.lastPage) %}
2023-10-15 20:26:14 +00:00
{% 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 %}
2023-10-03 12:00:10 +00:00
{% endfor %}
2023-10-15 20:26:14 +00:00
2023-10-03 12:00:10 +00:00
{% if products.lastPage > products.currentPage %}
2023-10-25 16:09:40 +00:00
<li class="page-item"><a class="page-link" href="{{ products.nextPageUrl }}{{params}}">{{ 'paginationIndiki'|_ }}</a></li>
2023-10-03 12:00:10 +00:00
{% endif %}
</ul>
</nav>
</div>
{% endif %}
</div>
</div>
2023-10-22 13:08:31 +00:00
{% endif %}
2023-10-03 12:00:10 +00:00
</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 %}