Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.
C# aspnet-corecsharpdockerdotnetecommerceecommerce-platformmongodbmulti-storemulti-vendornosqlonline-shopshoppingcart
catalog - remove filters
DanielŻuławski6265296a9e08
diff --git a/src/Web/Grand.Web/Views/Catalog/_Filtering.cshtml b/src/Web/Grand.Web/Views/Catalog/_Filtering.cshtmlindex ebc52591d..7f86990d6 100644--- a/src/Web/Grand.Web/Views/Catalog/_Filtering.cshtml+++ b/src/Web/Grand.Web/Views/Catalog/_Filtering.cshtml@@ -46,7 +46,7 @@<div class="d-inline-flex flex-wrap w-100"><template v-for="spec in group">- <b-link class="d-flex align-items-center mr-2 mb-2 pb-0" @@click="catalog.loadProducts(spec.FilterUrl)">{{spec.SpecificationAttributeOptionName}}<b-icon class="ml-2 text-danger" icon="x-circle-fill"></b-icon></b-link>+ <b-link class="d-flex align-items-center mr-2 mb-2 pb-0" @@click="catalog.loadProducts(spec.FilterUrl, true)">{{spec.SpecificationAttributeOptionName}}<b-icon class="ml-2 text-danger" icon="x-circle-fill"></b-icon></b-link></template></div>@@ -54,7 +54,7 @@</template></ul><div class="remove-filter">- <b-button size="sm" variant="danger" @@click="catalog.loadProducts(catalog.Model.PagingFilteringContext.SpecificationFilter.RemoveFilterUrl)">+ <b-button size="sm" variant="danger" @@click="catalog.loadProducts(catalog.Model.PagingFilteringContext.SpecificationFilter.RemoveFilterUrl, true)">@Loc["Filtering.SpecificationFilter.Remove"]</b-button></div>diff --git a/src/Web/Grand.Web/Views/Catalog/_ModelScript.cshtml b/src/Web/Grand.Web/Views/Catalog/_ModelScript.cshtmlindex f01feeda2..0d93cbc04 100644--- a/src/Web/Grand.Web/Views/Catalog/_ModelScript.cshtml+++ b/src/Web/Grand.Web/Views/Catalog/_ModelScript.cshtml@@ -8,7 +8,7 @@}},methods: {- loadProducts(url) {+ loadProducts(url, remove) {var addurl = '';var state = null;@@ -24,6 +24,10 @@addurl = '&updated=1';}+ if (remove == true) {+ addurl = '?updated=1';+ }+window.history.pushState(state, null, Url + addurl);catalog.getResponse(Url);