diff --git a/packages/Webkul/Shop/src/Resources/views/products/list/layered-navigation.blade.php b/packages/Webkul/Shop/src/Resources/views/products/list/layered-navigation.blade.php index a623412f6..a2175bd6c 100755 --- a/packages/Webkul/Shop/src/Resources/views/products/list/layered-navigation.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/products/list/layered-navigation.blade.php @@ -6,11 +6,14 @@ getAll($category->id); $filterAttributes = $productFlatRepository->getFilterableAttributes($category, $products); + + $maxPrice = core()->convertPrice($productFlatRepository->getCategoryProductMaximumPrice($category)); } if (! count($filterAttributes) > 0) { @@ -161,7 +164,7 @@ props: ['index', 'attribute', 'appliedFilterValues'], data: function() { - let maxPrice = '{{ core()->convertPrice($productFlatRepository->getCategoryProductMaximumPrice($category)) }}'; + let maxPrice = @json($maxPrice); maxPrice = maxPrice ? ((parseInt(maxPrice) !== 0 || maxPrice) ? parseInt(maxPrice) : 500) : 500; 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 61ef99f65..debba31c1 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 @@ -4,12 +4,15 @@ getAll($category->id); $filterAttributes = $productFlatRepository->getFilterableAttributes($category, $products); - } + + $maxPrice = core()->convertPrice($productFlatRepository->getCategoryProductMaximumPrice($category)); + } if (! count($filterAttributes) > 0) { $filterAttributes = $attributeRepository->getFilterAttributes(); @@ -181,7 +184,7 @@ ], data: function() { - let maxPrice = '{{ core()->convertPrice($productFlatRepository->getCategoryProductMaximumPrice($category)) }}'; + let maxPrice = @json($maxPrice); maxPrice = maxPrice ? ((parseInt(maxPrice) !== 0 || maxPrice) ? parseInt(maxPrice) : 500) : 500;