|
1 | 1 | using Microsoft.AspNetCore.Mvc; |
2 | 2 | using Nop.Core; |
3 | 3 | using Nop.Core.Domain.Catalog; |
4 | | -using Nop.Core.Domain.Customers; |
5 | 4 | using Nop.Core.Domain.FilterLevels; |
6 | 5 | using Nop.Core.Domain.Media; |
7 | 6 | using Nop.Core.Domain.Vendors; |
@@ -119,12 +118,6 @@ public virtual async Task<IActionResult> Category(int categoryId, CatalogProduct |
119 | 118 |
|
120 | 119 | var store = await _storeContext.GetCurrentStoreAsync(); |
121 | 120 |
|
122 | | - //'Continue shopping' URL |
123 | | - await _genericAttributeService.SaveAttributeAsync(await _workContext.GetCurrentCustomerAsync(), |
124 | | - NopCustomerDefaults.LastContinueShoppingPageAttribute, |
125 | | - _webHelper.GetThisPageUrl(false), |
126 | | - store.Id); |
127 | | - |
128 | 121 | //display "edit" (manage) link |
129 | 122 | if (await _permissionService.AuthorizeAsync(StandardPermission.Security.ACCESS_ADMIN_PANEL) && await _permissionService.AuthorizeAsync(StandardPermission.Catalog.CATEGORIES_VIEW)) |
130 | 123 | DisplayEditLink(Url.Action("Edit", "Category", new { id = category.Id, area = AreaNames.ADMIN })); |
@@ -165,14 +158,6 @@ public virtual async Task<IActionResult> Manufacturer(int manufacturerId, Catalo |
165 | 158 | if (!await CheckManufacturerAvailabilityAsync(manufacturer)) |
166 | 159 | return InvokeHttp404(); |
167 | 160 |
|
168 | | - var store = await _storeContext.GetCurrentStoreAsync(); |
169 | | - |
170 | | - //'Continue shopping' URL |
171 | | - await _genericAttributeService.SaveAttributeAsync(await _workContext.GetCurrentCustomerAsync(), |
172 | | - NopCustomerDefaults.LastContinueShoppingPageAttribute, |
173 | | - _webHelper.GetThisPageUrl(false), |
174 | | - store.Id); |
175 | | - |
176 | 161 | //display "edit" (manage) link |
177 | 162 | if (await _permissionService.AuthorizeAsync(StandardPermission.Security.ACCESS_ADMIN_PANEL) && await _permissionService.AuthorizeAsync(StandardPermission.Catalog.MANUFACTURER_VIEW)) |
178 | 163 | DisplayEditLink(Url.Action("Edit", "Manufacturer", new { id = manufacturer.Id, area = AreaNames.ADMIN })); |
@@ -221,14 +206,6 @@ public virtual async Task<IActionResult> Vendor(int vendorId, CatalogProductsCom |
221 | 206 | if (!await CheckVendorAvailabilityAsync(vendor)) |
222 | 207 | return InvokeHttp404(); |
223 | 208 |
|
224 | | - var store = await _storeContext.GetCurrentStoreAsync(); |
225 | | - |
226 | | - //'Continue shopping' URL |
227 | | - await _genericAttributeService.SaveAttributeAsync(await _workContext.GetCurrentCustomerAsync(), |
228 | | - NopCustomerDefaults.LastContinueShoppingPageAttribute, |
229 | | - _webHelper.GetThisPageUrl(false), |
230 | | - store.Id); |
231 | | - |
232 | 209 | //display "edit" (manage) link |
233 | 210 | if (await _permissionService.AuthorizeAsync(StandardPermission.Security.ACCESS_ADMIN_PANEL) && await _permissionService.AuthorizeAsync(StandardPermission.Customers.VENDORS_VIEW)) |
234 | 211 | DisplayEditLink(Url.Action("Edit", "Vendor", new { id = vendor.Id, area = AreaNames.ADMIN })); |
@@ -380,14 +357,6 @@ public virtual async Task<IActionResult> NewProductsRss() |
380 | 357 |
|
381 | 358 | public virtual async Task<IActionResult> Search(SearchModel model, CatalogProductsCommand command) |
382 | 359 | { |
383 | | - var store = await _storeContext.GetCurrentStoreAsync(); |
384 | | - |
385 | | - //'Continue shopping' URL |
386 | | - await _genericAttributeService.SaveAttributeAsync(await _workContext.GetCurrentCustomerAsync(), |
387 | | - NopCustomerDefaults.LastContinueShoppingPageAttribute, |
388 | | - _webHelper.GetThisPageUrl(true), |
389 | | - store.Id); |
390 | | - |
391 | 360 | if (model == null) |
392 | 361 | model = new SearchModel(); |
393 | 362 |
|
@@ -528,14 +497,6 @@ public virtual async Task<IActionResult> SearchByFilterLevelValues(SearchFilterL |
528 | 497 | if (!_filterLevelSettings.FilterLevelEnabled) |
529 | 498 | return RedirectToRoute(NopRouteNames.General.HOMEPAGE); |
530 | 499 |
|
531 | | - var store = await _storeContext.GetCurrentStoreAsync(); |
532 | | - |
533 | | - //'Continue shopping' URL |
534 | | - await _genericAttributeService.SaveAttributeAsync(await _workContext.GetCurrentCustomerAsync(), |
535 | | - NopCustomerDefaults.LastContinueShoppingPageAttribute, |
536 | | - _webHelper.GetThisPageUrl(true), |
537 | | - store.Id); |
538 | | - |
539 | 500 | if (model == null) |
540 | 501 | model = new SearchFilterLevelValueModel(); |
541 | 502 |
|
|
0 commit comments