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;
|
||||
|
||||
if (this_this.validations || (this_this.validations.indexOf("required") != -1)) {
|
||||
this_this.isRequire = true;
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
var dependentElement = document.getElementById(this_this.depand);
|
||||
var depandValue = this_this.value;
|
||||
var dependentElement = document.getElementById(this_this.depand);
|
||||
var depandValue = this_this.value;
|
||||
|
||||
if (depandValue == 'true') {
|
||||
depandValue = 1;
|
||||
} else if (depandValue == 'false') {
|
||||
depandValue = 0;
|
||||
}
|
||||
|
||||
dependentElement.onchange = function() {
|
||||
if (dependentElement.value == depandValue) {
|
||||
this_this.isVisible = true;
|
||||
} else {
|
||||
this_this.isVisible = false;
|
||||
}
|
||||
}
|
||||
if (depandValue == 'true') {
|
||||
depandValue = 1;
|
||||
} else if (depandValue == 'false') {
|
||||
depandValue = 0;
|
||||
}
|
||||
|
||||
$("select.control").change(function() {
|
||||
if (dependentElement.value == depandValue) {
|
||||
this_this.isVisible = true;
|
||||
} else {
|
||||
this_this.isVisible = false;
|
||||
}
|
||||
});
|
||||
|
||||
if (dependentElement.value == depandValue) {
|
||||
this_this.isVisible = true;
|
||||
} else {
|
||||
this_this.isVisible = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -35,4 +35,18 @@ class ProductFlatRepository extends Repository
|
|||
{
|
||||
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') {
|
||||
$query2 = $query2->where($column, '>=', current($queryParams))->where($column, '<=', end($queryParams));
|
||||
} 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>
|
||||
|
||||
<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')
|
||||
<span class="towishlist">
|
||||
@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
|
||||
<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
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
@inject ('attributeRepository', 'Webkul\Attribute\Repositories\AttributeRepository')
|
||||
|
||||
@inject ('productFlatRepository', 'Webkul\Product\Repositories\ProductFlatRepository')
|
||||
|
||||
<div class="layered-filter-wrapper">
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.list.layered-nagigation.before') !!}
|
||||
|
|
@ -144,7 +146,7 @@
|
|||
0,
|
||||
0
|
||||
],
|
||||
max: 500,
|
||||
max: {{ core()->convertPrice($productFlatRepository->getMaximumPrice($category->id)) }},
|
||||
processStyle: {
|
||||
"backgroundColor": "#FF6472"
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue