diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/products/list/layered-navigation.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/products/list/layered-navigation.blade.php index a360196ed..4cec23dbb 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/products/list/layered-navigation.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/products/list/layered-navigation.blade.php @@ -176,18 +176,25 @@ data: function() { return { active: false, + appliedFilters: [], + sliderConfig: { max: 500, + value: [0, 0], + processStyle: { "backgroundColor": "#FF6472" }, + tooltipStyle: { "borderColor": "#FF6472", "backgroundColor": "#FF6472", }, + priceTo: 0, + priceFrom: 0, } } @@ -213,17 +220,16 @@ methods: { setMaxPrice: function () { + if (this.attribute['code'] != 'price') { + return; + } + axios .get(this.maxPriceSrc) .then((response) => { let maxPrice = response.data.max_price; this.sliderConfig.max = maxPrice ? ((parseInt(maxPrice) !== 0 || maxPrice) ? parseInt(maxPrice) : 500) : 500; - - if (! this.appliedFilterValues) { - this.sliderConfig.value = [0, this.sliderConfig.max]; - this.sliderConfig.priceTo = this.sliderConfig.max; - } }); },