/// Ticket 100006: [Topmedia] 3.1. Search – Product Finder
page.productfinderselection.js
$(function () { $('.btnProductFinderSearch').click(function () { var selectedType = $('#MainProductType').val(); var selectedVal = getAllSelectedDropDowns(); var actionUrl = $(".btnProductFinderSearch").attr('data_src'); var paramerters = "?type=" + selectedType + "&otherFilters=" + selectedVal; if (selectedVal != "") { // Sana.Urls.Home() var getUrl = actionUrl + paramerters; // ?type:SANAECOM_FILTER1:Apple,SANAECOM_FILTER4:ModelNR1&otherFilters:Series:3" //"ProductList/SearchByProductFinderSelection?" + "type" + selectedType "", otherFilters: selectedVal; // 'ProductFilter/SearchProduct' //window.location.href = getUrl; // data.RedirectUrl; //var productFiltersSection = $('#productFilters').html(); //alert(productFiltersSection); //localStorage.setItem("productFiltersSectionKey", productFiltersSection); localStorage.setItem("selectedTypeKey", selectedType); localStorage.setItem("selectedValKey", selectedVal); var $productFilters = $('#productFilters'); // $tournament.append($('#player').val() + '<br/>'); localStorage.setItem("#productFilters", $productFilters.html()); window.location.href = getUrl; } }); });
[HttpGet] [ActionName("SearchByProductFinderSelection")] public virtual async Task<ActionResult> SearchByProductFinderSelection(string type, string otherFilters, [PageIndex] int page, int count = 0, SortOption sort = null, string viewMode = null) { var q = ""; if (!ServiceManager.GetInstance<ConnectionManager>().IsErpConnectionConfigured()) return View(LayoutManager.GetView(PageLayoutTypes.SearchResultsPage), GetEmptySearchModel(q)); if (count > 0 && Shop.Settings.ProductListDefaultPagingType.iEquals(WebsiteSettings.ProductListPagingTypes.Links)) return Redirect(Url.Sana.Search(q)); var searchPageModel = ObjectFactory.Create<SearchPageModel>();
public class ExtendedProductListController : ProductListController { const int MaxPageSize = 500; protected override void RegisterSystemRoutes(SanaRouteCollection routes) { base.RegisterSystemRoutes(routes); /// Ticket 100006: [Topmedia] 3.1. Search – Product Finder routes.MapSystemPageRoute(Name, "SearchByProductFinderSelection", "SearchByProductFinderSelection"); }
$(function () {
$('.btnProductFinderSearch').click(function () { var selectedType = $('#MainProductType').val(); var selectedVal = getAllSelectedDropDowns(); var actionUrl = $(".btnProductFinderSearch").attr('data_src'); var paramerters = "?type=" + selectedType + "&otherFilters=" + selectedVal; if (selectedVal != "") { // Sana.Urls.Home() var getUrl = actionUrl + paramerters; // ?type:SANAECOM_FILTER1:Apple,SANAECOM_FILTER4:ModelNR1&otherFilters:Series:3" //"ProductList/SearchByProductFinderSelection?" + "type" + selectedType "", otherFilters: selectedVal; // 'ProductFilter/SearchProduct' //window.location.href = getUrl; // data.RedirectUrl; //var productFiltersSection = $('#productFilters').html(); //alert(productFiltersSection); //localStorage.setItem("productFiltersSectionKey", productFiltersSection); localStorage.setItem("selectedTypeKey", selectedType); localStorage.setItem("selectedValKey", selectedVal); var $productFilters = $('#productFilters'); // $tournament.append($('#player').val() + '<br/>'); localStorage.setItem("#productFilters", $productFilters.html()); window.location.href = getUrl; } }); });