/// <summary> /// Registers the search event. /// </summary> /// <param name="storefront">The storefront.</param> /// <param name="searchKeyword">The search keyword.</param> /// <param name="numberOfHits">The number of hits.</param> /// <returns> /// The manager response /// </returns> public virtual ManagerResponse<SearchInitiatedResult, bool> RegisterSearchEvent([NotNull] CommerceStorefront storefront, string searchKeyword, int numberOfHits) { Assert.ArgumentNotNull(storefront, "storefront"); Assert.ArgumentNotNullOrEmpty(searchKeyword, "searchKeyword"); var request = new SearchInitiatedRequest(storefront.ShopName, searchKeyword, numberOfHits); var result = this.CatalogServiceProvider.SearchInitiated(request); if (!result.Success) { Helpers.LogSystemMessages(result.SystemMessages, result); } return new ManagerResponse<SearchInitiatedResult, bool>(result, result.Success); }
public virtual SearchInitiatedResult SearchInitiated([NotNull] SearchInitiatedRequest request) { return(this.RunPipeline <SearchInitiatedRequest, SearchInitiatedResult>(StorefrontConstants.PipelineNames.SearchInitiated, request)); }