Merge branch 'master' of https://github.com/bagisto/bagisto into development
This commit is contained in:
commit
3fe220428c
|
|
@ -427,37 +427,35 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
created: function () {
|
mounted: function () {
|
||||||
var this_this = this;
|
var this_this = this;
|
||||||
|
|
||||||
if (this_this.validations || (this_this.validations.indexOf("required") != -1)) {
|
if (this_this.validations || (this_this.validations.indexOf("required") != -1)) {
|
||||||
this_this.isRequire = true;
|
this_this.isRequire = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function () {
|
var dependentElement = document.getElementById(this_this.depand);
|
||||||
var dependentElement = document.getElementById(this_this.depand);
|
var depandValue = this_this.value;
|
||||||
var depandValue = this_this.value;
|
|
||||||
|
|
||||||
if (depandValue == 'true') {
|
if (depandValue == 'true') {
|
||||||
depandValue = 1;
|
depandValue = 1;
|
||||||
} else if (depandValue == 'false') {
|
} else if (depandValue == 'false') {
|
||||||
depandValue = 0;
|
depandValue = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
dependentElement.onchange = function() {
|
|
||||||
if (dependentElement.value == depandValue) {
|
|
||||||
this_this.isVisible = true;
|
|
||||||
} else {
|
|
||||||
this_this.isVisible = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
$("select.control").change(function() {
|
||||||
if (dependentElement.value == depandValue) {
|
if (dependentElement.value == depandValue) {
|
||||||
this_this.isVisible = true;
|
this_this.isVisible = true;
|
||||||
} else {
|
} else {
|
||||||
this_this.isVisible = false;
|
this_this.isVisible = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (dependentElement.value == depandValue) {
|
||||||
|
this_this.isVisible = true;
|
||||||
|
} else {
|
||||||
|
this_this.isVisible = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -35,4 +35,18 @@ class ProductFlatRepository extends Repository
|
||||||
{
|
{
|
||||||
return 'Webkul\Product\Contracts\ProductFlat';
|
return 'Webkul\Product\Contracts\ProductFlat';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Maximum Price of Prodcut
|
||||||
|
*
|
||||||
|
* @param int $categoryId
|
||||||
|
* return integer
|
||||||
|
*/
|
||||||
|
public function getMaximumPrice($categoryId)
|
||||||
|
{
|
||||||
|
return $this->model
|
||||||
|
->leftJoin('product_categories', 'product_flat.product_id', 'product_categories.product_id')
|
||||||
|
->where('product_categories.category_id', $categoryId)
|
||||||
|
->max('price');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -520,7 +520,7 @@ class ProductRepository extends Repository
|
||||||
if ($attribute->code != 'price') {
|
if ($attribute->code != 'price') {
|
||||||
$query2 = $query2->where($column, '>=', current($queryParams))->where($column, '<=', end($queryParams));
|
$query2 = $query2->where($column, '>=', current($queryParams))->where($column, '<=', end($queryParams));
|
||||||
} else {
|
} else {
|
||||||
$query2 = $query2->where($column, '>=', current($queryParams))->where($column, '<=', end($queryParams));
|
$query2 = $query2->where($column, '>=', core()->convertToBasePrice(current($queryParams)))->where($column, '<=', core()->convertToBasePrice(end($queryParams)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -86,12 +86,12 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span class="remove">
|
<span class="remove">
|
||||||
<a href="{{ route('shop.checkout.cart.remove', $item->id) }}" onclick="removeLink('Do you really want to do this?')">{{ __('shop::app.checkout.cart.remove-link') }}</a></span>
|
<a href="{{ route('shop.checkout.cart.remove', $item->id) }}" onclick="removeLink('{{ __('shop::app.checkout.cart.cart-remove-action') }}')">{{ __('shop::app.checkout.cart.remove-link') }}</a></span>
|
||||||
|
|
||||||
@auth('customer')
|
@auth('customer')
|
||||||
<span class="towishlist">
|
<span class="towishlist">
|
||||||
@if ($item->parent_id != 'null' ||$item->parent_id != null)
|
@if ($item->parent_id != 'null' ||$item->parent_id != null)
|
||||||
<a href="{{ route('shop.movetowishlist', $item->id) }}" onclick="removeLink('Do you really want to do this?')">{{ __('shop::app.checkout.cart.move-to-wishlist') }}</a>
|
<a href="{{ route('shop.movetowishlist', $item->id) }}" onclick="removeLink('{{ __('shop::app.checkout.cart.cart-remove-action') }}')">{{ __('shop::app.checkout.cart.move-to-wishlist') }}</a>
|
||||||
@else
|
@else
|
||||||
<a href="{{ route('shop.movetowishlist', $item->child->id) }}" onclick="removeLink('{{ __('shop::app.checkout.cart.cart-remove-action') }}')">{{ __('shop::app.checkout.cart.move-to-wishlist') }}</a>
|
<a href="{{ route('shop.movetowishlist', $item->child->id) }}" onclick="removeLink('{{ __('shop::app.checkout.cart.cart-remove-action') }}')">{{ __('shop::app.checkout.cart.move-to-wishlist') }}</a>
|
||||||
@endif
|
@endif
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
@inject ('attributeRepository', 'Webkul\Attribute\Repositories\AttributeRepository')
|
@inject ('attributeRepository', 'Webkul\Attribute\Repositories\AttributeRepository')
|
||||||
|
|
||||||
|
@inject ('productFlatRepository', 'Webkul\Product\Repositories\ProductFlatRepository')
|
||||||
|
|
||||||
<div class="layered-filter-wrapper">
|
<div class="layered-filter-wrapper">
|
||||||
|
|
||||||
{!! view_render_event('bagisto.shop.products.list.layered-nagigation.before') !!}
|
{!! view_render_event('bagisto.shop.products.list.layered-nagigation.before') !!}
|
||||||
|
|
@ -144,7 +146,7 @@
|
||||||
0,
|
0,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
max: 500,
|
max: {{ core()->convertPrice($productFlatRepository->getMaximumPrice($category->id)) }},
|
||||||
processStyle: {
|
processStyle: {
|
||||||
"backgroundColor": "#FF6472"
|
"backgroundColor": "#FF6472"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue