from server
This commit is contained in:
parent
1f46a90644
commit
53ff03349f
|
|
@ -266,6 +266,7 @@ class BlogPostsApiController extends Controller
|
|||
->with([
|
||||
'translations:locale,model_id,attribute_data',
|
||||
'images:attachment_id,attachment_type,disk_name,file_name',
|
||||
'place'
|
||||
])
|
||||
->approved()
|
||||
->paginate(9);
|
||||
|
|
@ -311,7 +312,7 @@ class BlogPostsApiController extends Controller
|
|||
{
|
||||
$data = $request->all();
|
||||
|
||||
$dataAccounts = User::select('id', 'name', 'email', 'username', 'type', 'logo', 'shop_title', 'slogan', 'work_time', 'short_description', 'description', 'map', 'banner', 'is_instagram')
|
||||
$dataAccounts = User::where('type', '!=', 'simple')->select('id', 'name', 'email', 'username', 'type', 'logo', 'shop_title', 'slogan', 'work_time', 'short_description', 'description', 'map', 'banner', 'is_instagram')
|
||||
->with('categories:id,name,slug,icon')
|
||||
->paginate(9);
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ class ProductsAPIController extends Controller
|
|||
$products = Product::where('name', 'like', "%".$data["key"]."%")->orWhere('slug','LIKE','%'.$data["key"].'%')->with(['translations:locale,model_id,attribute_data',
|
||||
'images:attachment_id,attachment_type,disk_name,file_name',
|
||||
'vendor:id,name,email,type,logo,banner,shop_title,slogan,is_instagram',
|
||||
'place',])->paginate(15);
|
||||
'place',])->where('status', 'approved')->paginate(15);
|
||||
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
|
|
|
|||
|
|
@ -345,7 +345,7 @@ class Account extends ComponentBase
|
|||
*/
|
||||
Event::fire('rainlab.user.beforeRegister', [&$data]);
|
||||
|
||||
$requireActivation = UserSettings::get('require_activation', true);
|
||||
$requireActivation = UserSettings::get('require_activation', false);
|
||||
$automaticActivation = UserSettings::get('activate_mode') == UserSettings::ACTIVATE_AUTO;
|
||||
$userActivation = UserSettings::get('activate_mode') == UserSettings::ACTIVATE_USER;
|
||||
$adminActivation = UserSettings::get('activate_mode') == UserSettings::ACTIVATE_ADMIN;
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ class FilteredProducts extends ComponentBase
|
|||
$products = $products->orderBy( $sort[0], $sort[1]);
|
||||
}
|
||||
|
||||
$products = $products->where('status', 'approved')->orderBy('updated_at', $sortOrder);
|
||||
$products = $products->where('status', 'approved')->withCount("images")->orderBy('updated_at', $sortOrder);
|
||||
|
||||
return $products ? $products->paginate($perPage) : null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ class Offers extends ComponentBase
|
|||
$productSlug = $this->property('productSlug');
|
||||
$offerId = $this->property('offerId');
|
||||
|
||||
$query = Product::where('status', 'approved')
|
||||
$query = Product::where('status', 'approved')->withCount("images")
|
||||
->orderBy('ends_at', $sortOrder);
|
||||
|
||||
if($cSlug != '') {
|
||||
|
|
|
|||
|
|
@ -48,9 +48,22 @@ class Singleoffer extends ComponentBase
|
|||
}
|
||||
|
||||
public function onRun() {
|
||||
$this->rating = $this->calculateRating();
|
||||
$this->offer = $this->loadOffer();
|
||||
}
|
||||
|
||||
protected function calculateRating(){
|
||||
$product = Product::with("comments")->find($this->property('offerId'));
|
||||
$totalRating = 0;
|
||||
if($product){
|
||||
foreach($product->comments as $item){
|
||||
$totalRating = $totalRating + $item->rating;
|
||||
}
|
||||
}
|
||||
return $totalRating == 0 ? $totalRating : round($totalRating/$product->comments->count());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
protected function loadOffer() {
|
||||
|
|
@ -62,5 +75,6 @@ class Singleoffer extends ComponentBase
|
|||
}
|
||||
return null;
|
||||
}
|
||||
public $rating;
|
||||
public $offer;
|
||||
}
|
||||
|
|
@ -115,9 +115,9 @@
|
|||
<div class="col-12 col-lg-5">
|
||||
<div class="quickview_pro_img">
|
||||
<img class="first_img" src="{{ product.images[0].path }}" alt="">
|
||||
<img class="hover_img" src="{{ product.images[1].path }}" alt="">
|
||||
<!-- Product Badge -->
|
||||
|
||||
{% if product.images_count > 1 %}
|
||||
<img class="hover_img" src="{{ product.images[1].path }}" alt="">
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-7">
|
||||
|
|
|
|||
|
|
@ -19,9 +19,9 @@
|
|||
<div class="col-12 col-lg-5">
|
||||
<div class="quickview_pro_img">
|
||||
<img class="first_img" src="{{ product.images[0].path }}" alt="">
|
||||
<img class="hover_img" src="{{ product.images[1].path }}" alt="">
|
||||
<!-- Product Badge -->
|
||||
|
||||
{% if product.images_count > 1 %}
|
||||
<img class="hover_img" src="{{ product.images[1].path }}" alt="">
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-7">
|
||||
|
|
@ -142,16 +142,6 @@
|
|||
placeholder="1350" value="{{input('max_price') ? input('max_price') : null}}">
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="widget-desc">-->
|
||||
<!-- <div class="slider-range">-->
|
||||
<!-- <div data-min="0" data-max="1350" data-unit=" TMT" class="slider-range-price ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all" data-value-min="0" data-value-max="1350" data-label-result="Baha:">-->
|
||||
<!-- <div class="ui-slider-range ui-widget-header ui-corner-all"></div>-->
|
||||
<!-- <span class="ui-slider-handle ui-state-default ui-corner-all" tabindex="0"></span>-->
|
||||
<!-- <span class="ui-slider-handle ui-state-default ui-corner-all" tabindex="0"></span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="range-price">Baha: 0 - 1350</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary" style="width: 100%"> Filterle </button>
|
||||
</form>
|
||||
|
|
@ -187,8 +177,9 @@
|
|||
<div class="product_image">
|
||||
<!-- Product Image -->
|
||||
<img class="normal_img" src="{{ product.images[0].path }}" alt="{{ product.name }}">
|
||||
<img class="hover_img" src="{{ product.images[1].path }}" alt="{{ product.name }}">
|
||||
<!-- Wishlist -->
|
||||
{% if product_images_count > 1 %}
|
||||
<img class="hover_img" src="{{ product.images[1].path }}" alt="">
|
||||
{% endif %}
|
||||
<div class="product_wishlist">
|
||||
{% if user %}
|
||||
<a href="wishlist.html"><i class="icofont-heart"></i></a>
|
||||
|
|
|
|||
|
|
@ -18,8 +18,9 @@
|
|||
<div class="col-12 col-lg-5">
|
||||
<div class="quickview_pro_img">
|
||||
<img class="first_img" src="{{ product.images[0].path }}" alt="">
|
||||
|
||||
<img class="hover_img" src="{{ product.images[1].path }}" alt="">
|
||||
{% if product.images_count > 1 %}
|
||||
<img class="hover_img" src="{{ product.images[1].path }}" alt="">
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-7">
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{% set product = __SELF__.offer %}
|
||||
{% set rating = __SELF__.rating %}
|
||||
|
||||
<!-- Breadcumb Area -->
|
||||
<div class="breadcumb_area">
|
||||
<div class="container h-100">
|
||||
|
|
@ -52,13 +54,11 @@
|
|||
<h4 class="title mb-2">{{ product.name }}</h4>
|
||||
<div class="single_product_ratings mb-2">
|
||||
{% if(product.comments_count > 0) %}
|
||||
{% for comment in product.comments %}
|
||||
<i class="fa fa-star {{ (comment.rating == 1 or comment.rating > 1) ? 'colorYellow' : '' }}" aria-hidden="true"></i>
|
||||
<i class="fa fa-star {{ (comment.rating == 2 or comment.rating > 1) ? 'colorYellow' : '' }}" aria-hidden="true"></i>
|
||||
<i class="fa fa-star {{ (comment.rating == 3 or comment.rating > 2) ? 'colorYellow' : '' }}" aria-hidden="true"></i>
|
||||
<i class="fa fa-star {{ (comment.rating == 4 or comment.rating > 3) ? 'colorYellow' : '' }}" aria-hidden="true"></i>
|
||||
<i class="fa fa-star {{ (comment.rating == 5 or comment.rating > 4) ? 'colorYellow' : '' }}" aria-hidden="true"></i>
|
||||
{% endfor %}
|
||||
<i class="fa fa-star {{ (rating == 1 or rating > 1) ? 'colorYellow' : '' }}" aria-hidden="true"></i>
|
||||
<i class="fa fa-star {{ (rating == 2 or rating > 1) ? 'colorYellow' : '' }}" aria-hidden="true"></i>
|
||||
<i class="fa fa-star {{ (rating == 3 or rating > 2) ? 'colorYellow' : '' }}" aria-hidden="true"></i>
|
||||
<i class="fa fa-star {{ (rating == 4 or rating > 3) ? 'colorYellow' : '' }}" aria-hidden="true"></i>
|
||||
<i class="fa fa-star {{ (rating == 5 or rating > 4) ? 'colorYellow' : '' }}" aria-hidden="true"></i>
|
||||
{% else %}
|
||||
<i class="fa fa-star" aria-hidden="true"></i>
|
||||
<i class="fa fa-star" aria-hidden="true"></i>
|
||||
|
|
|
|||
|
|
@ -19,9 +19,9 @@
|
|||
<div class="col-12 col-lg-5">
|
||||
<div class="quickview_pro_img">
|
||||
<img class="first_img" src="{{ product.images[0].path }}" alt="">
|
||||
<img class="hover_img" src="{{ product.images[1].path }}" alt="">
|
||||
<!-- Product Badge -->
|
||||
|
||||
{% if product.images_count > 1 %}
|
||||
<img class="hover_img" src="{{ product.images[1].path }}" alt="">
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-7">
|
||||
|
|
|
|||
|
|
@ -54,30 +54,18 @@ navigation:
|
|||
url: tps/birzha/city
|
||||
icon: icon-map-marker
|
||||
dictionary:
|
||||
label: Dictionary
|
||||
label: Maglumatlar
|
||||
url: tps/birzha/terms
|
||||
icon: icon-life-ring
|
||||
permissions:
|
||||
- term
|
||||
sideMenu:
|
||||
terms:
|
||||
label: Terms
|
||||
label: maglumat
|
||||
url: tps/birzha/terms
|
||||
icon: icon-delicious
|
||||
permissions:
|
||||
- term
|
||||
measure:
|
||||
label: Measure
|
||||
url: tps/birzha/measures
|
||||
icon: icon-tachometer
|
||||
permissions:
|
||||
- measure
|
||||
currency:
|
||||
label: Currencies
|
||||
url: tps/birzha/currencies
|
||||
icon: icon-money
|
||||
permissions:
|
||||
- currency
|
||||
contact-messages:
|
||||
label: 'Contact form'
|
||||
url: tps/birzha/messagescontact
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -57,6 +57,7 @@ pageNumber = "{{ :page }}"
|
|||
|
||||
[session]
|
||||
security = "all"
|
||||
redirect = "index"
|
||||
==
|
||||
{% set sliders = builderList.records %}
|
||||
{% set brandSliders = builderList2.records %}
|
||||
|
|
@ -72,17 +73,7 @@ security = "all"
|
|||
{% set detailsUrlParameter = builderList.detailsUrlParameter %}
|
||||
|
||||
|
||||
{% put styles %}
|
||||
<style>
|
||||
.owl-carousel .owl-item {
|
||||
min-height: 1px;
|
||||
float: left;
|
||||
height: 40% !important;
|
||||
-webkit-backface-visibility: hidden;
|
||||
-webkit-touch-callout: none;
|
||||
}
|
||||
</style>
|
||||
{% endput %}
|
||||
|
||||
|
||||
|
||||
<section class="welcome_area">
|
||||
|
|
@ -90,7 +81,7 @@ security = "all"
|
|||
<div class="welSlideTwo owl-carousel">
|
||||
<!-- Single Slide -->
|
||||
{% for slider in sliders %}
|
||||
<div class="single_slide home-3 bg-img" style="background-image: url({{ slider.img|media }});height: 70%;">
|
||||
<div class="single_slide home-3 bg-img" style="background-image: url({{ slider.img|media }});">
|
||||
<div class="container h-100">
|
||||
<div class="row h-100 align-items-center">
|
||||
<div class="col-12">
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ is_hidden = 0
|
|||
|
||||
[account]
|
||||
redirect = "index"
|
||||
paramCode = "code"
|
||||
paramCode = "{{ :code }}"
|
||||
forceSecure = 0
|
||||
requirePassword = 0
|
||||
==
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ requirePassword = 0
|
|||
<input type="text" class="form-control" name="name" id="registerName" placeholder="Ulanyjy">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" name="email" id="registerEmail" placeholder="Telefon belgi">
|
||||
<input type="hidden" class="form-control" name="username" id="registerUsername" value="Ulanyjy">
|
||||
<input type="text" class="form-control" name="username" id="registerEmail" placeholder="Telefon belgi">
|
||||
<input type="hidden" class="form-control" name="email" id="registerUsername" value="Ulanyjy">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="password" class="form-control" name="password" id="registerPassword" placeholder="Açar söz">
|
||||
|
|
|
|||
Loading…
Reference in New Issue